Example #1
0
 private void btnAddTBLBuyorder_Click(object sender, EventArgs e)
 {
     try
     {
         TBLTBBuyorderdetailsEditorDlg frm = new TBLTBBuyorderdetailsEditorDlg(-1, true);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             XPSCSTBLBuyorder.FixedFilterString = "BuyorderId = " + frm._m_BuyorderId;
             XPSCSTBLBuyorder.Session.DropIdentityMap();
             XPSCSTBLBuyorder.Reload();
             gridViewTBLBuyorder.RefreshData();
             gridViewTBLBuyorder.FocusedRowHandle = 1;
             tBLTBBuyorderdetailsTableAdapter.FillByBuyorderId(dsData.TBLTBBuyorderdetails, frm._m_BuyorderId);
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }
Example #2
0
 private void btnEditTBLBuyorder_Click(object sender, EventArgs e)
 {
     try
     {
         XPDataTableObject row = (XPDataTableObject)gridViewTBLBuyorder.GetRow(gridViewTBLBuyorder.FocusedRowHandle);
         if (row == null)
         {
             return;
         }
         TBLTBBuyorderdetailsEditorDlg frm = new TBLTBBuyorderdetailsEditorDlg(Convert.ToInt32(row.GetMemberValue("BuyorderId")), false);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             XPSCSTBLBuyorder.Session.DropIdentityMap();
             XPSCSTBLBuyorder.Reload();
             gridViewTBLBuyorder.RefreshData();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }