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); } }
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()); } }