Example #1
0
 private void btAdds_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (string.IsNullOrEmpty(parentID))
     {
         MsgBox.ShowWarningMessageBox("请先选择一个变电所!");
         return;
     }
     frm_sgyxjlb frm = new frm_sgyxjlb();
     bdjl_sgyxjlb sgyxjlb = new bdjl_sgyxjlb();
     sgyxjlb.OrgCode = parentID;
     sgyxjlb.c1 = DateTime.Now.ToShortDateString();
     frm.RowData = sgyxjlb;
     if (frm.ShowDialog() == DialogResult.OK)
     {
         Client.ClientHelper.PlatformSqlMap.Create<bdjl_sgyxjlb>(frm.RowData);
         RefreshGridData("");
     }
 }
Example #2
0
 private void btEdits_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (gridView1.GetFocusedRow() == null)
         return;
     bdjl_sgyxjlb sgyxjlb = gridView1.GetFocusedRow() as bdjl_sgyxjlb;
     frm_sgyxjlb frm = new frm_sgyxjlb();
     frm.RowData = sgyxjlb;
     if (frm.ShowDialog() == DialogResult.OK)
     {
         Client.ClientHelper.PlatformSqlMap.Update<bdjl_sgyxjlb>(frm.RowData);
         RefreshGridData("");
     }
 }