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