コード例 #1
0
ファイル: Reports.aspx.cs プロジェクト: salmansajid/t-iot-api
 public void GvdBind_Controlling(int ObjectId, DateTime StartDate, DateTime EndDate)
 {
     if (StartDate.Date == DateTime.Now.Date)
     {
         List <SwitchesReportControllingModel> Li = SRS.GetCurrentdateSwitchesReportControling(ObjectId);
         lblname2.Text = "";
         lblname2.Text = ddlObject.SelectedItem.Text;
         BindingClass.GridViewBind(gv_ControllingReport, Li);
     }
     else
     {
         List <SwitchesReportControllingModel> Li = obj.getControllingByDT(ObjectId, StartDate, EndDate);
         lblname2.Text = "";
         lblname2.Text = ddlObject.SelectedItem.Text;
         BindingClass.GridViewBind(gv_ControllingReport, Li);
     }
 }
コード例 #2
0
 public void gvdBind_Controlling(int ObjectId, DateTime StartDate, DateTime EndDate)
 {
     try
     {
         if (StartDate.Date == DateTime.Now.Date)
         {
             List <SwitchesReportControllingModel> Li = obj.getControllingToday(ObjectId);
             BindingClass.GridViewBind(gvdcontrollingReport, Li);
             gvdcontrollingReport.Visible = true;
         }
         else
         {
             List <SwitchesReportControllingModel> Li = obj.getControllingByDT(ObjectId, StartDate, EndDate);
             BindingClass.GridViewBind(gvdcontrollingReport, Li);
             gvdcontrollingReport.Visible = true;
         }
     }
     catch (Exception)
     { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }
 }