public string gvdBind(int ObjectID, DateTime StartDate, DateTime EndDate) { try { var jsonC = ""; var jsonV = ""; List <ObjectSensorIDName> List_Current = cObj.getRelaySensorByObject(ObjectID, "amp"); List <ObjectSensorIDName> List_Volt = cObj.getRelaySensorByObject(ObjectID, "volt"); string[] itemListC = new string[List_Current.Count]; string[] itemListV = new string[List_Current.Count]; if (List_Current.Count > 0) { for (int i = 0; i < List_Current.Count; i++) { object Name = i; List <IndividualSensorModel> LiC = obj.getIndividualSensorReport(List_Current[i].ObjectSensorID, StartDate, EndDate, 0, 4); List <IndividualSensorModel> LiV = obj.getIndividualSensorReport(List_Volt[i].ObjectSensorID, StartDate, EndDate, 150, 300); jsonC = JsonConvert.SerializeObject(LiC); itemListC[i] = (jsonC); jsonV = JsonConvert.SerializeObject(LiV); itemListV[i] = (jsonV); } string resultC = string.Join("&", itemListC); string resultV = string.Join("&", itemListV); string result = resultC + '*' + resultV; return(result); } } catch (Exception) { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); } return(""); }
public void gvdBind(int ObjectSensorID, DateTime StartDate, DateTime EndDate, double min, double max) { List <IndividualSensorModel> Li = obj.getIndividualSensorReport(ObjectSensorID, StartDate, EndDate, min, max); if (Li.Count > 0) { BindingClass.GridViewBind(gvdReport, Li); } else { BindingClass.ClearGridView(gvdReport); } }
public void gvdBind(int ObjectSensorID, DateTime StartDate, DateTime EndDate, double min, double max) { try { List <IndividualSensorModel> Li = obj.getIndividualSensorReport(ObjectSensorID, StartDate, EndDate, min, max); if (Li.Count > 0) { BindingClass.GridViewBind(gvdReport, Li); btngraph.Visible = true; } else { BindingClass.ClearGridView(gvdReport); } gvdReport.Visible = true; } catch (Exception) { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); } }