/// <summary> /// 修改 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { int rowHandle = gridView1.FocusedRowHandle; if (rowHandle < 0) { return; } Checkin_ds checkin_ds = new Checkin_ds(); Frm_fireCheckin frm_edit = new Frm_fireCheckin(); frm_edit.swapdata["AC001"] = gridView1.GetRowCellValue(rowHandle, "AC001").ToString(); //frm_edit.swapdata["BusinessObject"] = this; frm_edit.swapdata["dataset"] = checkin_ds; frm_edit.swapdata["action"] = "edit"; if (frm_edit.ShowDialog() == DialogResult.OK) { this.RefreshData(); } frm_edit.Dispose(); }
/// <summary> /// 编辑记录 /// </summary> /// <param name="rowHandle"></param> private void Modify(int rowHandle) { if (rowHandle < 0) { return; } Frm_fireCheckin frm_ac01 = new Frm_fireCheckin(); frm_ac01.swapdata["action"] = "edit"; frm_ac01.swapdata["dataset"] = this.checkin_ds; frm_ac01.swapdata["businessObject"] = this; string s_ac001 = gridView1.GetRowCellValue(rowHandle, "AC001").ToString(); frm_ac01.swapdata["AC001"] = s_ac001; if (frm_ac01.ShowDialog() == DialogResult.OK) { frm_ac01.Dispose(); adapter.SelectCommand.CommandText = "select * from ac01 where ac001='" + s_ac001 + "'"; adapter.Fill(shadow_dt); checkin_ds.Ac01.Merge(this.shadow_dt); } //TODO 3.同步ac01与 rc01 }
/// <summary> /// 新增 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Frm_fireCheckin frm_ac01 = new Frm_fireCheckin(); frm_ac01.swapdata["action"] = "add"; frm_ac01.swapdata["dataset"] = this.checkin_ds; frm_ac01.swapdata["businessObject"] = this; if (frm_ac01.ShowDialog() == DialogResult.OK) { string s_ac001 = this.swapdata["AC001"].ToString(); adapter.SelectCommand.CommandText = "select * from ac01 where ac001='" + s_ac001 + "'"; adapter.Fill(this.shadow_dt); checkin_ds.Ac01.Merge(this.shadow_dt); } }
/// <summary> /// 进灵登记 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void barButtonItem1_ItemClick(object sender, ItemClickEventArgs e) { if (!AppAction.CheckRight("进灵登记")) { return; } Frm_fireCheckin frm_checkin = new Frm_fireCheckin(); frm_checkin.swapdata["action"] = "add"; Checkin_ds checkin_ds = new Checkin_ds(); frm_checkin.swapdata["dataset"] = checkin_ds; frm_checkin.ShowDialog(); frm_checkin.Dispose(); }