/// <summary> /// 修改项目 /// </summary> /// <param name="rowHandle"></param> private void Modify(int rowHandle) { if (rowHandle >= 0) { SA01 sa01 = xpCollection1[gridView1.GetDataSourceRowIndex(rowHandle)] as SA01; Frm_BusinessEdit frm_1 = new Frm_BusinessEdit(); frm_1.swapdata["sa01"] = sa01; if (frm_1.ShowDialog() == DialogResult.OK) { } frm_1.Dispose(); } }
/// <summary> /// 编辑项目 /// </summary> /// <param name="rowHandle"></param> private void Modify(int rowHandle) { if (rowHandle >= 0) { if (gridView1.GetRowCellValue(rowHandle, "SA008").ToString() == "1") { XtraMessageBox.Show("该项目已经结算,不能修改!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } SA01 sa01 = xpCollection1[gridView1.GetDataSourceRowIndex(rowHandle)] as SA01; Frm_BusinessEdit frm_1 = new Frm_BusinessEdit(); frm_1.swapdata["sa01"] = sa01; if (frm_1.ShowDialog() == DialogResult.OK) { sa01.Reload(); this.SetActivePanel(); } frm_1.Dispose(); } }