private void Init() { _currentTable = bOrderHeader.GetOrderServiceMode(_slipNumber); if (_currentTable != null) { txtTitle.Text = _currentTable.TITLE; txtStartTime.Value = CConvert.ToDateTime(_currentTable.START_DATE_TIME); txtEndTime.Value = CConvert.ToDateTime(_currentTable.END_DATE_TIME); txtServiceUser.Text = _currentTable.SERVICE_USER; txtMemo.Text = _currentTable.MEMO; } }
/// <summary> /// /// </summary> private void btnSave_Click(object sender, EventArgs e) { if (_currentTable == null) { _currentTable = new BllOrderServiceTable(); _currentTable.CREATE_USER = UserTable.CODE; } _currentTable.SLIP_NUMBER = _slipNumber; _currentTable.TITLE = txtTitle.Text; _currentTable.START_DATE_TIME = txtStartTime.Value; _currentTable.END_DATE_TIME = txtEndTime.Value; _currentTable.SERVICE_USER = txtServiceUser.Text; _currentTable.MEMO = txtMemo.Text; _currentTable.STATUS_FLAG = CConstant.INIT; _currentTable.LAST_UPDATE_USER = UserTable.CODE; int ret = 0; try { if (_currentTable.ID > 0) { ret = bOrderHeader.UpdateOrderService(_currentTable); } else { ret = bOrderHeader.AddOrderService(_currentTable); } if (ret > 0) { MessageBox.Show("保存成功。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); _dialogResult = DialogResult.OK; this.Close(); } else { MessageBox.Show("保存失败。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show("保存失败,请重试或与管理员联系。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); Logger.Error("修理输入保存失败:", ex); } }
/// <summary> /// 修理输入记录的删除 /// </summary> public int DeleteOrderService(BllOrderServiceTable model) { return(dal.DeleteOrderService(model)); }
/// <summary> /// 修理输入记录的修正 /// </summary> public int UpdateOrderService(BllOrderServiceTable model) { return(dal.UpdateOrderService(model)); }
/// <summary> /// 修理输入记录的添加 /// </summary> public int AddOrderService(BllOrderServiceTable model) { return(dal.AddOrderService(model)); }