Created
April 27, 2015 23:12
-
-
Save kuc-arc-f/e4b2370b5f6016120012 to your computer and use it in GitHub Desktop.
agri-blog1-3b-query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SensorApp.prototype.init_proc = function ( model ) { | |
var parent_app=this; | |
var query = new Parse.Query( model ); | |
var sDate = this.get_nowDate(); | |
var nBef =parseInt(sDate); | |
query.equalTo("mc_id", mMC_ID); | |
query.greaterThan("dtnum", nBef); | |
query.limit(300); | |
query.find({ | |
success: function(todos) { | |
if(todos.length < 1){ | |
parent_app.proc_stop_prog(); | |
alert('error, Nothing data.'); | |
}else{ | |
var dat1 = parent_app.get_array( todos ,1 ); | |
var dat2 = parent_app.get_array( todos ,2 ); | |
var dat3 = parent_app.get_array( todos ,3 ); | |
var dat4 = parent_app.get_array( todos ,4 ); | |
parent_app.make_chart(dat1, dat2, dat3, dat4); | |
parent_app.put_data( model ); | |
} | |
}, | |
error: function(object, error) { | |
parent_app.proc_stop_prog(); | |
alert('error'); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment