예제 #1
0
 public static void BindSecondaryProgramName(DropDownList ddlProgram, Guid SchoolYearId)
 {
     try
     {
         DayCareBAL.AddEditChildService proxyProgram         = new DayCareBAL.AddEditChildService();
         List <DayCarePL.ChildProgEnrollmentProperties> data = proxyProgram.LoadSecondaryProgram(SchoolYearId);
         if (data.Count > 0)
         {
             ddlProgram.DataSource     = data;
             ddlProgram.DataTextField  = "ProgramTitle";
             ddlProgram.DataValueField = "SchoolProgramId";
             ddlProgram.DataBind();
             ddlProgram.Items.Insert(0, new ListItem("--Select--", DayCarePL.Common.GUID_DEFAULT));
         }
     }
     catch (Exception ex)
     {
     }
 }
예제 #2
0
 public static void BindProgChildClassRoom(DropDownList ddlChildProgClassRoom, Guid SchoolProgramId)
 {
     try
     {
         DayCareBAL.AddEditChildService            proxyProgSchedule = new DayCareBAL.AddEditChildService();
         DayCarePL.ChildProgEnrollmentProperties[] data = proxyProgSchedule.LoadProgClassRoom(SchoolProgramId).FindAll(s => !s.ProgClassRoomTitle.Equals("N/A")).ToArray();
         ddlChildProgClassRoom.Items.Clear();
         if (data.Count() > 0)
         {
             ddlChildProgClassRoom.DataSource     = data;
             ddlChildProgClassRoom.DataTextField  = "ProgClassRoomTitle";
             ddlChildProgClassRoom.DataValueField = "Id";
             ddlChildProgClassRoom.DataBind();
         }
         ddlChildProgClassRoom.Items.Insert(0, new ListItem("--Select--", DayCarePL.Common.GUID_DEFAULT));
     }
     catch (Exception ex)
     {
     }
 }
예제 #3
0
        public static void BindProgSecondaryChildClassRoom(DropDownList ddlChildProgClassRoom, Guid SchoolProgramId)
        {
            try
            {
                DayCareBAL.AddEditChildService proxyProgSchedule = new DayCareBAL.AddEditChildService();
                List <DayCarePL.ChildProgEnrollmentProperties> lstChildProgEnrollment = proxyProgSchedule.LoadProgClassRoom(SchoolProgramId);
                ddlChildProgClassRoom.Items.Clear();
                Guid ProgClassRoomIdOfNAClassRoom = new Guid();
                if (lstChildProgEnrollment != null && lstChildProgEnrollment.Count > 0)
                {
                    ProgClassRoomIdOfNAClassRoom = lstChildProgEnrollment.Find(i => i.ProgClassRoomTitle.Equals("N/A")).Id;
                    ddlChildProgClassRoom.Items.Clear();

                    ddlChildProgClassRoom.DataSource     = lstChildProgEnrollment.FindAll(s => !s.ProgClassRoomTitle.Equals("N/A"));
                    ddlChildProgClassRoom.DataTextField  = "ProgClassRoomTitle";
                    ddlChildProgClassRoom.DataValueField = "Id";
                    ddlChildProgClassRoom.DataBind();
                }
                ddlChildProgClassRoom.Items.Insert(0, new ListItem("N/A", ProgClassRoomIdOfNAClassRoom.ToString()));
            }
            catch (Exception ex)
            {
            }
        }