public void funSearch()
 {
     try
     {
         tbl_StateCityBAL  objbal     = new tbl_StateCityBAL();
         tbl_StateCityProp objtblProp = new tbl_StateCityProp();
         int      PageCount           = 0;
         DataSet  ds       = objbal.Select_Data(objtblProp, ref PageCount, 00);
         DataView dvSearch = ds.Tables[0].DefaultView;
         Global.strSearchSqlWidth = " 0:200: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.frmStateCity.funSearch() " + exception.ToString());
     }
 }
 public void funSave()
 {
     try
     {
         int Intcout = 0;
         if (checkValidation())
         {
             tbl_StateCityProp objtbl_Pro = new tbl_StateCityProp();
             tbl_StateCityBAL  objBAL     = new tbl_StateCityBAL();
             if (IsEdit)
             {
                 objtbl_Pro.StateCityCode = Convert.ToInt32(txtStateCityCode.Text);
                 objtbl_Pro.CountryCode   = Convert.ToInt32(cmbCounteryStateCity.SelectedValue);
                 objtbl_Pro.StateCity     = txtStateCity.Text;
             }
             else
             {
                 objtbl_Pro.StateCityCode = 0;
                 objtbl_Pro.CountryCode   = Convert.ToInt32(cmbCounteryStateCity.SelectedValue);
                 objtbl_Pro.StateCity     = txtStateCity.Text;
             }
             Intcout = objBAL.InsertUpdate_Data(objtbl_Pro);
             if (Intcout > 0)
             {
                 this.objGlobal.showMessage("State/City", "success", this.IsEdit, this.txtStateCity);
                 ((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("State/City", "", IsEdit, txtStateCity);
                 txtStateCity.Focus();
             }
         }
         else
         {
             objGlobal.showMessage("State/City", "", IsEdit, txtStateCity);
             txtStateCity.Focus();
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmStateCity.funSave() " + exception.ToString());
     }
 }