private void btnDelete_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try
     {
         var dlgResult = XtraMessageBox.Show("Are you sure want to delete?", "Confirmation!", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
         if (Convert.ToString(dlgResult) == "OK" && gvBranch.FocusedRowHandle >= 0)
         {
             ObjBranch          = new Branch();
             ObjBranch.BRANCHID = gvBranch.GetFocusedRowCellValue("BRANCHID");
             ObjBranch.UserID   = Utility.UserID;
             objMasterRep.DeleteBranch(ObjBranch);
             gvBranch.DeleteRow(gvBranch.FocusedRowHandle);
         }
     }
     catch (Exception ex)
     {
         ErrorMgmt.ShowError(ex);
         ErrorMgmt.Errorlog.Error(ex);
     }
 }