protected void ddlProg_SelectedIndexChanged(object sender, EventArgs e)
        {
            //DropDownList ddlProg = Items["ddlProg"] as DropDownList;
            DayCareBAL.ChildProgEnrollmentService proxyFee = new DayCareBAL.ChildProgEnrollmentService();
            txtFee.Text = Convert.ToString(proxyFee.GetFees(new Guid(ddlProg.SelectedValue)));
            Common.BindProgChildClassRoom(ddlChildProgClassRoom, new Guid(ddlProg.SelectedValue));
            Common.BindProgChildClassRoom(ddlChildProgClassRoom1, new Guid(ddlProg.SelectedValue));
            Common.BindProgChildClassRoom(ddlChildProgClassRoom2, new Guid(ddlProg.SelectedValue));
            Common.BindProgChildClassRoom(ddlChildProgClassRoom3, new Guid(ddlProg.SelectedValue));
            Common.BindProgChildClassRoom(ddlChildProgClassRoom4, new Guid(ddlProg.SelectedValue));

            ChkMon.Checked = false; ChkTue.Checked = false; ChkWen.Checked = false; ChkThus.Checked = false; ChkFri.Checked = false;

            ddlDayType1.SelectedIndex = 0;
            ddlDayType2.SelectedIndex = 0;
            ddlDayType3.SelectedIndex = 0;
            ddlDayType4.SelectedIndex = 0;
            ddlDayType5.SelectedIndex = 0;

            ddlChildProgClassRoom.SelectedIndex  = 0;
            ddlChildProgClassRoom1.SelectedIndex = 0;
            ddlChildProgClassRoom2.SelectedIndex = 0;
            ddlChildProgClassRoom3.SelectedIndex = 0;
            ddlChildProgClassRoom4.SelectedIndex = 0;


            hdnFri.Value  = "";
            hdnMon.Value  = "";
            hdnThus.Value = "";
            hdnTue.Value  = "";
            hdnWen.Value  = "";

            BindEditProgramEnrollment(new Guid(Request.QueryString["ChildDataId"].ToString()), new Guid(ddlProg.SelectedValue.ToString()));
            if (ViewState["SchoolProgramId"] != null)
            {
                if (!ViewState["SchoolProgramId"].ToString().Equals(ddlProg.SelectedValue.ToString()))
                {
                }
            }
        }
        public void BindEditProgramEnrollment(Guid ChildDataId, Guid SchoolProgramId)
        {
            if (Session["CurrentSchoolYearId"] == null)
            {
                return;
            }

            Guid ChildSchoolYearId = Common.GetChildSchoolYearId(ChildDataId, new Guid(Session["CurrentSchoolYearId"].ToString()));

            DayCareBAL.ChildProgEnrollmentService          proxy = new DayCareBAL.ChildProgEnrollmentService();
            List <DayCarePL.ChildProgEnrollmentProperties> lstChilProgEnrollment = proxy.LoadProgEnrollment(ChildSchoolYearId, SchoolProgramId);

            if (lstChilProgEnrollment.Count > 0)
            {
                ddlProg.SelectedValue = SchoolProgramId.ToString();

                //Classroom and fees bind as per selected "Program"
                DayCareBAL.ChildProgEnrollmentService proxyFee = new DayCareBAL.ChildProgEnrollmentService();
                txtFee.Text = Convert.ToString(proxyFee.GetFees(new Guid(ddlProg.SelectedValue)));
                Common.BindProgChildClassRoom(ddlChildProgClassRoom, new Guid(ddlProg.SelectedValue));
                Common.BindProgChildClassRoom(ddlChildProgClassRoom1, new Guid(ddlProg.SelectedValue));
                Common.BindProgChildClassRoom(ddlChildProgClassRoom2, new Guid(ddlProg.SelectedValue));
                Common.BindProgChildClassRoom(ddlChildProgClassRoom3, new Guid(ddlProg.SelectedValue));
                Common.BindProgChildClassRoom(ddlChildProgClassRoom4, new Guid(ddlProg.SelectedValue));
                //end bing fee and classroom

                ClearFields();
                foreach (DayCarePL.ChildProgEnrollmentProperties objChildProgEnrollment in lstChilProgEnrollment)
                {
                    if (objChildProgEnrollment.DayIndex == 1)
                    {
                        ChkMon.Checked                      = true;
                        ddlDayType1.SelectedValue           = objChildProgEnrollment.DayType;
                        ddlChildProgClassRoom.SelectedValue = objChildProgEnrollment.ProgClassRoomId.ToString();
                        hdnMon.Value = objChildProgEnrollment.Id.ToString();
                    }
                    if (objChildProgEnrollment.DayIndex == 2)
                    {
                        ChkTue.Checked                       = true;
                        ddlDayType2.SelectedValue            = objChildProgEnrollment.DayType;
                        ddlChildProgClassRoom1.SelectedValue = objChildProgEnrollment.ProgClassRoomId.ToString();
                        hdnTue.Value = objChildProgEnrollment.Id.ToString();
                    }
                    if (objChildProgEnrollment.DayIndex == 3)
                    {
                        ChkWen.Checked                       = true;
                        ddlDayType3.SelectedValue            = objChildProgEnrollment.DayType;
                        ddlChildProgClassRoom2.SelectedValue = objChildProgEnrollment.ProgClassRoomId.ToString();
                        hdnWen.Value = objChildProgEnrollment.Id.ToString();
                    }
                    if (objChildProgEnrollment.DayIndex == 4)
                    {
                        ChkThus.Checked                      = true;
                        ddlDayType4.SelectedValue            = objChildProgEnrollment.DayType;
                        ddlChildProgClassRoom3.SelectedValue = objChildProgEnrollment.ProgClassRoomId.ToString();
                        hdnThus.Value = objChildProgEnrollment.Id.ToString();
                    }
                    if (objChildProgEnrollment.DayIndex == 5)
                    {
                        ChkFri.Checked                       = true;
                        ddlDayType5.SelectedValue            = objChildProgEnrollment.DayType;
                        ddlChildProgClassRoom4.SelectedValue = objChildProgEnrollment.ProgClassRoomId.ToString();
                        hdnFri.Value = objChildProgEnrollment.Id.ToString();
                    }
                }
            }
        }