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