protected void FillChildlist() { DayCarePL.ChildDataProperties ChildDataProperties = new DayCarePL.ChildDataProperties(); DayCareBAL.ChildListService proxyChild = new DayCareBAL.ChildListService(); List <DayCarePL.ChildDataProperties> lstChild = proxyChild.GetAllChildList(new Guid(Session["SchoolId"].ToString()), new Guid(Session["CurrentSchoolYearId"].ToString())); ChildDataProperties.ChildDataId = new Guid("00000000-0000-0000-0000-000000000000"); ChildDataProperties.FullName = "--Select All--"; lstChild.Insert(0, ChildDataProperties); rcbchildList.DataSource = lstChild; rcbchildList.DataTextField = "FullName"; rcbchildList.DataValueField = "ChildDataId"; rcbchildList.DataBind(); rcbchildList.EmptyMessage = "---Select---"; }
protected void rgChildList_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { try { DayCareBAL.ChildListService proxyChild = new DayCareBAL.ChildListService(); List <DayCarePL.ChildDataProperties> lstChild = proxyChild.GetAllChildList(new Guid(Session["SchoolId"].ToString()), new Guid(Session["CurrentSchoolYearId"].ToString())); if (lstChild == null) { lstChild = new List <DayCarePL.ChildDataProperties>(); } rgChildList.DataSource = lstChild; } catch (Exception ex) { DayCarePL.Logger.Write(DayCarePL.LogType.EXCEPTION, DayCarePL.ModuleToLog.ChildList, "rgChildFamily_NeedDataSource", ex.Message.ToString(), DayCarePL.Common.GUID_DEFAULT); } }