private void btnAddTBLBuyorder_Click(object sender, EventArgs e)
 {
     try
     {
         TBLEznEdafaEditorDlg frm = new TBLEznEdafaEditorDlg(-1, true);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             XPSCSMain.FixedFilterString = "EznEdafaId = " + frm._m_EznEdafaId;
             XPSCSMain.Session.DropIdentityMap();
             XPSCSMain.Reload();
             gridViewMain.RefreshData();
             gridViewMain.FocusedRowHandle = 1;
             tBLEznEdafaDetailsTableAdapter.FillByEznEdafaId(dsData.TBLEznEdafaDetails, frm._m_EznEdafaId);
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }
 private void btnEditTBLBuyorder_Click(object sender, EventArgs e)
 {
     try
     {
         XPDataTableObject row = (XPDataTableObject)gridViewMain.GetRow(gridViewMain.FocusedRowHandle);
         if (row == null)
         {
             return;
         }
         TBLEznEdafaEditorDlg frm = new TBLEznEdafaEditorDlg(Convert.ToInt32(row.GetMemberValue("EznEdafaId")), false);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             XPSCSMain.Session.DropIdentityMap();
             XPSCSMain.Reload();
             gridViewMain.RefreshData();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }