Ejemplo n.º 1
0
 private void btAdds_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (string.IsNullOrEmpty(parentID))
     {
         MsgBox.ShowWarningMessageBox("请先选择一个变电所!");
         return;
     }
     frm_sgzayc frm = new frm_sgzayc();
     bdjl_sgzayc sgzayc = new bdjl_sgzayc();
     sgzayc.OrgCode = parentID;
     sgzayc.fssj = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
     frm.RowData = sgzayc;
     if (frm.ShowDialog() == DialogResult.OK)
     {
         Client.ClientHelper.PlatformSqlMap.Create<bdjl_sgzayc>(frm.RowData);
         RefreshGridData("");
     }
 }
Ejemplo n.º 2
0
 private void btEdits_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (gridView1.GetFocusedRow() == null)
         return;
     bdjl_sgzayc sgzayc = gridView1.GetFocusedRow() as bdjl_sgzayc;
     frm_sgzayc frm = new frm_sgzayc();
     frm.RowData = sgzayc;
     if (frm.ShowDialog() == DialogResult.OK)
     {
         Client.ClientHelper.PlatformSqlMap.Update<bdjl_sgzayc>(frm.RowData);
         RefreshGridData("");
     }
 }