public void GvdBindObjdetail(int objectId, int DayID) { if (DayID == 8) { List <SchedulingModel> li = SS.GetSchedulingByObjectAndOBSIDweekly(objectId, Convert.ToInt32(ddlSensor.SelectedValue)); if (li != null) { for (int i = 0; i < li.Count; i++) { if (li[i].Name == null) { li[i].Name = "ALL"; } } GvdAllScheduling.DataSource = li; GvdAllScheduling.DataBind(); } else { GvdAllScheduling.DataSource = li; GvdAllScheduling.DataBind(); } } else { List <SchedulingModel> li = SS.GetSchedulingByObjectId(objectId, DayID); if (li != null) { if (li[0].Name == null) { li[0].Name = "ALL"; } GvdAllScheduling.DataSource = li; GvdAllScheduling.DataBind(); } else { GvdAllScheduling.DataSource = li; GvdAllScheduling.DataBind(); } } allowStaticMethods("staticMethod();"); }