private void btnEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try
     {
         if (gvDealer.FocusedRowHandle >= 0)
         {
             ObjDealer            = new Dealer();
             ObjDealer.DEALERID   = gvDealer.GetFocusedRowCellValue("DEALERID");
             ObjDealer.DEALERNAME = gvDealer.GetFocusedRowCellValue("DEALERNAME");
             ObjDealer.ADDRESS    = gvDealer.GetFocusedRowCellValue("ADDRESS");
             ObjDealer.STATEID    = gvDealer.GetFocusedRowCellValue("STATEID");
             ObjDealer.PHONENO    = gvDealer.GetFocusedRowCellValue("PHONENO");
             ObjDealer.EMAILID    = gvDealer.GetFocusedRowCellValue("EMAILID");
             ObjDealer.GSTIN      = gvDealer.GetFocusedRowCellValue("GSTIN");
             ObjDealer.PANNUMBER  = gvDealer.GetFocusedRowCellValue("PANNUMBER");
             frmDealer obj = new frmDealer(ObjDealer);
             obj.ShowInTaskbar        = false;
             obj.StartPosition        = FormStartPosition.CenterScreen;
             obj.IconOptions.ShowIcon = false;
             obj.ShowDialog();
             if (ObjDealer.IsSave)
             {
                 gcDealer.DataSource = objMasterRep.GetDealer();
                 Utility.Setfocus(gvDealer, "DEALERID", ObjDealer.DEALERID);
             }
         }
     }
     catch (Exception ex)
     {
         ErrorMgmt.ShowError(ex);
         ErrorMgmt.Errorlog.Error(ex);
     }
 }
        private void btnNew_Click(object sender, EventArgs e)
        {
            ObjDealer = new Dealer();
            frmDealer obj = new frmDealer(ObjDealer);

            obj.ShowInTaskbar        = false;
            obj.StartPosition        = FormStartPosition.CenterScreen;
            obj.IconOptions.ShowIcon = false;
            obj.ShowDialog();
            if (ObjDealer.IsSave)
            {
                gcDealer.DataSource = objMasterRep.GetDealer();
                Utility.Setfocus(gvDealer, "DEALERID", ObjDealer.DEALERID);
            }
        }