protected void rgProgClassCategory_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            DayCareBAL.ProgClassCategoryService proxyLoad = new DayCareBAL.ProgClassCategoryService();
            Guid SchoolId = new Guid();

            if (Session["SchoolId"] != null)
            {
                SchoolId = new Guid(Session["SchoolId"].ToString());
            }
            rgProgClassCategory.DataSource = proxyLoad.LoadProgClassCategory(new Guid(ViewState["SchoolProgramId"].ToString()), SchoolId);
        }
        protected void Assign_CheckedChanged(object sender, EventArgs e)
        {
            try
            {
                DayCareBAL.ProgClassCategoryService          proxyProgClassCategory = new DayCareBAL.ProgClassCategoryService();
                DayCarePL.ProgClassCategoryProperties        objProgClassCategory   = new DayCarePL.ProgClassCategoryProperties();
                List <DayCarePL.ProgClassCategoryProperties> lstProgClassCategory   = new List <DayCarePL.ProgClassCategoryProperties>();
                if (ViewState["SchoolProgramId"] != null)
                {
                    CheckBox     chkAssign = (CheckBox)sender;
                    GridDataItem dataItem  = (GridDataItem)chkAssign.NamingContainer;
                    chkAssign = dataItem["Assign"].FindControl("Assign") as CheckBox;
                    Label lblId             = dataItem["Id"].FindControl("lblClassCategoryId") as Label;
                    Label lblProgClassCatId = dataItem["ProgClassCatId"].FindControl("lblProgClassCatId") as Label;
                    objProgClassCategory.ClassCategoryId = new Guid(lblId.Text);
                    if (Session["StaffId"] != null)
                    {
                        objProgClassCategory.CreatedById      = new Guid(Session["StaffId"].ToString());
                        objProgClassCategory.LastModifiedById = new Guid(Session["StaffId"].ToString());
                        objProgClassCategory.Active           = chkAssign.Checked;
                        objProgClassCategory.Id = new Guid(lblProgClassCatId.Text);
                    }
                    objProgClassCategory.SchoolProgramId = new Guid(ViewState["SchoolProgramId"].ToString());
                    lstProgClassCategory.Add(objProgClassCategory);


                    if (proxyProgClassCategory.Save(objProgClassCategory, new Guid(ViewState["SchoolProgramId"].ToString())))
                    {
                        MasterAjaxManager = this.Page.FindControl("RadAjaxManager1") as Telerik.Web.UI.RadAjaxManager;
                        MasterAjaxManager.ResponseScripts.Add(string.Format("ShowMessage('{0}','{1}')", "Saved Successfully", "false"));
                        rgProgClassCategory.MasterTableView.Rebind();
                        return;
                    }
                    else
                    {
                        MasterAjaxManager = this.Page.FindControl("RadAjaxManager1") as Telerik.Web.UI.RadAjaxManager;
                        MasterAjaxManager.ResponseScripts.Add(string.Format("ShowMessage('{0}','{1}')", "Internal Error.!", "false"));
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                DayCarePL.Logger.Write(DayCarePL.LogType.EXCEPTION, DayCarePL.ModuleToLog.ProgClassCategory, "btnSave_Click", ex.Message.ToString(), DayCarePL.Common.GUID_DEFAULT);
            }
        }