public void gvdBind_Consumption(int ObjectId, DateTime StartDate, DateTime EndDate)
 {
     if (StartDate.Date == DateTime.Now.Date)
     {
         List <DTReportModel>          li         = new List <DTReportModel>();
         List <SwitchesReportDayModel> li_current = obj.getConsumptionToday(ObjectId, "Current");
         if (li_current.Count > 0)
         {
             List <SwitchesReportDayModel> li_voltage = obj.getConsumptionToday(ObjectId, "Voltage");
             for (int i = 0; i < li_current.Count; i++)
             {
                 DTReportModel model = new DTReportModel();
                 model.Name    = li_current[i].Name;
                 model.Current = li_current[i].Value;
                 model.Voltage = li_voltage[i].Value;
                 model.Power   = string.Format("{0:0.00}", (li_current[i].Value * li_voltage[i].Value) / 1000);
                 li.Add(model);
             }
         }
         BindingClass.GridViewBind(Gvdconsumptionreport, li);
     }
     else
     {
         List <SwitchesReportConsumptionModel> li = obj.getConsumptionByDT(ObjectId, StartDate, EndDate);
         BindingClass.GridViewBind(Gvdconsumptionreport, li);
     }
     Gvdconsumptionreport.Visible = true;
 }