private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { long id = 0; string cs = ""; object obj; if (OprFuction.GetClientType()) { if (mainGridView.FocusedRowHandle > -1) { obj = mainGridView.GetRowCellValue(mainGridView.FocusedRowHandle, mainGridView.Columns["id"]); if (obj != null && long.TryParse(obj.ToString(), out id)) { if (jc_b.ContainsKey(id)) { if (CSlist.ContainsKey(id)) { cs = CSlist[id]; } CSForm csf = new CSForm(id, cs); csf.ShowDialog(); if (StaticClass.Cs != cs) { if (CSlist.ContainsKey(id)) { CSlist[id] = StaticClass.Cs; } else { CSlist.Add(id, StaticClass.Cs); } lock (objShowDt) { for (int ij = 0; ij < showdt.Rows.Count; ij++) { if (long.Parse(showdt.Rows[ij]["id"].ToString()) == id) { showdt.Rows[ij]["cs"] = StaticClass.Cs; break; } } } Model.RealInterfaceFuction.UpdateCs(id.ToString(), jc_b[id].Stime, StaticClass.Cs); } StaticClass.Cs = ""; } } } } else { OprFuction.MessageBoxShow(0, "该客户端不为主操作客户端,无措施录入权限!"); } }