コード例 #1
0
ファイル: Ucm_czpdjb.cs プロジェクト: s7loves/mypowerscgl
 private void btAdds_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (string.IsNullOrEmpty(parentID))
     {
         MsgBox.ShowWarningMessageBox("请先选择一个变电所!");
         return;
     }
     frm_czpdjb frm = new frm_czpdjb();
     bdjl_czpdjb czpdjb = new bdjl_czpdjb();
     czpdjb.OrgCode = parentID;
     czpdjb.dDate = DateTime.Now;
     try
     {
         czpdjb.c1 = Client.ClientHelper.PlatformSqlMap.GetOne<mOrg>("where OrgCode='" + parentID + "'").OrgName;
         frm.RowData = czpdjb;
     }
     catch
     {
         MsgBox.ShowWarningMessageBox("单位代码错误!");
         return;
     }
     if (frm.ShowDialog() == DialogResult.OK)
     {
         Client.ClientHelper.PlatformSqlMap.Create<bdjl_czpdjb>(frm.RowData);
         RefreshGridData("");
     }
 }
コード例 #2
0
ファイル: Ucm_czpdjb.cs プロジェクト: s7loves/mypowerscgl
 private void btEdits_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (gridView1.GetFocusedRow() == null)
         return;
     bdjl_czpdjb czpdjb = gridView1.GetFocusedRow() as bdjl_czpdjb;
     frm_czpdjb frm = new frm_czpdjb();
     frm.RowData = czpdjb;
     if (frm.ShowDialog() == DialogResult.OK)
     {
         Client.ClientHelper.PlatformSqlMap.Update<bdjl_czpdjb>(frm.RowData);
         RefreshGridData("");
     }
 }