/// <summary> /// 保存按钮点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave_Click(object sender, EventArgs e) { // 输入内容检查 if (!CheckCondition()) { return; } if (this.op == 2)// 修改消费备注 { if (this.tcc == null) { ShowWarnMsgBox(MessageConst.errMsg_DataError); this.Dispose(); this.Close(); return; } } else // 新增消费备注 { this.tcc = new t_Consume_Content(); } // 消费备注 tcc.Content = this.textItem.Text.Trim(); // 备注类别 tcc.Content_Type = ContentType.Consume; // 更新时间 tcc.Update_DateTime = DateTime.Now; // 记录状态 tcc.State = RecordState.Normal; // 更新者 tcc.Operator_No = SysParam.OperatorNo; tcc.Save(); this.Close(); }
//页面Load private void Form079_ConsumeItem_Load(object sender, EventArgs e) { if (this.op == 2) { this.tcc = consumLogic.GetContentByID(this.cID, this.DBSession); if (tcc == null) { ShowWarnMsgBox(MessageConst.errMsg_DataError); this.Close(); return; } } }