public void funSearch()
 {
     try
     {
         tbl_SubCasteBAL  objbal       = new tbl_SubCasteBAL();
         tbl_SubCasteProp objtbl_Caste = new tbl_SubCasteProp();
         int      PageCount            = 0;
         DataSet  ds       = objbal.Select_Data(objtbl_Caste, ref PageCount, 0);
         DataView dvSearch = ds.Tables[0].DefaultView;
         Global.strSearchSqlWidth = " 0:200 ";
         strCode = objGlobal.openSearch(dvSearch);
         if (strCode != "")
         {
             DisplayRecord(strCode, dvSearch);
             ((frmMain)this.MdiParent).setControlState(false, false, this);
             TpLast = ToolbarPositions.eTPDataDisplayed;
             ((frmMain)this.MdiParent).setToolbarPositions(TpLast);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmSubCaste.funSearch() " + exception.ToString());
     }
 }
 public void funSave()
 {
     try
     {
         int Intcout = 0;
         if (checkValidation())
         {
             tbl_SubCasteProp objtbl_SubCaste = new tbl_SubCasteProp();
             tbl_SubCasteBAL  objcasteBAL     = new tbl_SubCasteBAL();
             if (IsEdit)
             {
                 objtbl_SubCaste.SubCasteCode = Convert.ToInt32(txtSubCasteCode.Text);
                 objtbl_SubCaste.CasteCode    = Convert.ToInt32(cmbCaste.SelectedValue);
                 objtbl_SubCaste.SubCaste     = txtSubCaste.Text;
             }
             else
             {
                 objtbl_SubCaste.SubCasteCode = 0;
                 objtbl_SubCaste.CasteCode    = Convert.ToInt32(cmbCaste.SelectedValue);
                 objtbl_SubCaste.SubCaste     = txtSubCaste.Text;
             }
             Intcout = objcasteBAL.InsertUpdate_Data(objtbl_SubCaste);
             if (Intcout > 0)
             {
                 this.objGlobal.showMessage("SUB CASTE", "success", this.IsEdit, this.txtSubCaste);
                 ((frmMain)base.MdiParent).setToolbarPositions(ToolbarPositions.eTPOk);
                 ((frmMain)base.MdiParent).setControlState(false, true, this);
                 this.TpLast = ToolbarPositions.eTPOk;
                 ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
                 this.IsEdit = false;
             }
             else
             {
                 objGlobal.showMessage("SUB CASTE", "", IsEdit, txtSubCaste);
                 txtSubCaste.Focus();
             }
         }
         else
         {
             objGlobal.showMessage("SUB CASTE", "", IsEdit, txtSubCaste);
             txtSubCaste.Focus();
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmSubCaste.funSave() " + exception.ToString());
     }
 }