protected void ddlSensor_SelectedIndexChanged(object sender, EventArgs e) { int DayId = Convert.ToInt32(ddlDays.SelectedValue); int ObjectId = Convert.ToInt32(ddlObject.SelectedValue); int objSenID = Convert.ToInt32(ddlSensor.SelectedValue); if (DayId == 8) { List <SchedulingModel> li = SS.GetSchedulingByObjectAndOBSIDweekly(ObjectId, objSenID); 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.GetSchedulingByObject_Day_OBSID(ObjectId, DayId, objSenID); 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();"); }
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();"); }