Example #1
0
        //Save Data
        #region SaveData

        protected void btnSave_Click(object sender, EventArgs e)
        {
            BL_CasteCategory  objBL  = new BL_CasteCategory();
            EWA_CasteCategory objEWA = new EWA_CasteCategory();

            try
            {
                lock (this)
                {
                    if (ddlOrganization.SelectedItem.Text == "Select")
                    {
                        msgBox.ShowMessage("Select Organization !!!", "Information", UserControls.MessageBox.MessageStyle.Information);
                    }
                    else if (txtCasteCategoryName.Text == "")
                    {
                        msgBox.ShowMessage("Please Enter Caste Category Name !!!", "Information", UserControls.MessageBox.MessageStyle.Information);
                    }

                    else
                    {
                        //ViewState["DocumentId"] = 0;
                        int chk = CheckData();
                        if (chk > 0)
                        {
                            msgBox.ShowMessage("Record Allready Exist !!!", "Information", UserControls.MessageBox.MessageStyle.Information);
                        }
                        else
                        {
                            Action("Save");
                            GrdCasteCategoryBind();
                            LoadForm();
                        }
                    }
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }