コード例 #1
0
 private void btnEditAsset_Click(object sender, EventArgs e)
 {
     try
     {
         XPDataTableObject row = (XPDataTableObject)gridViewItem.GetRow(gridViewItem.FocusedRowHandle);
         if (row == null)
         {
             return;
         }
         TblAsnafEditorDlg frm = new TblAsnafEditorDlg(Convert.ToInt32(row.GetMemberValue("SanfID")), false);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             sessionItem.DropIdentityMap();
             XPCSItem.Reload();
             gridViewItem.RefreshData();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }
コード例 #2
0
 private void btnAddAsset_Click(object sender, EventArgs e)
 {
     try
     {
         object id = null;
         if (treeListMain.FocusedNode == null)
         {
             return;
         }
         id = treeListMain.FocusedNode.GetValue("SanfCategoryID");
         TblAsnafEditorDlg frm = new TblAsnafEditorDlg((int)id, true);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             sessionItem.DropIdentityMap();
             XPCSItem.Reload();
             gridViewItem.RefreshData();
         }
     }
     catch (Exception ex)
     {
         MsgDlg.Show(ex.Message, MsgDlg.MessageType.Error, ex);
     }
 }