/// <summary> /// 设置 /// </summary> public override void EntitySet() { HandleEvent entity = new HandleEvent(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtFormNo.Text = entity.FormNo.ToString(); txtFormDate.DateTime = entity.FormDate; drpEventType.EditValue = entity.EventType.ToString(); //txtVedorID.Text = entity.VedorID.ToString(); drpVendorID.EditValue = entity.VedorID.ToString(); txtOrderFormNo.Text = entity.OrderFormNo.ToString(); txtRemark1.Text = entity.Remark1.ToString(); txtRemark2.Text = entity.Remark2.ToString(); txtRemark3.Text = entity.Remark3.ToString(); txtRemark4.Text = entity.Remark4.ToString(); txtRemark5.Text = entity.Remark5.ToString(); txtRemark.Text = entity.Remark.ToString(); txtMakeOPID.Text = entity.MakeOPID.ToString(); txtMakeDate.DateTime = entity.MakeDate; txtEventStatus.EditValue = SysConvert.ToInt32(entity.EventStatus); txtRDate.Text = entity.RDate.ToString(); if (!findFlag) { } }
public void btnSaveStatus_Click(object sender, EventArgs e) { try { this.BaseFocusLabel.Focus(); int ID = SysConvert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "ID")); int Status = SysConvert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "EventStatus")); HandleEventRule rule = new HandleEventRule(); HandleEvent entity = new HandleEvent(); entity.ID = ID; entity.SelectByID(); if (entity.EventStatus != Status) { entity.EventStatus = Status; rule.RUpdate(entity); this.ShowInfoMessage("状态更新成功"); } } catch (Exception E) { this.ShowMessage(E.Message); } }
/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private HandleEvent EntityGet() { HandleEvent entity = new HandleEvent(); entity.ID = HTDataID; entity.SelectByID(); entity.FormNo = txtFormNo.Text.Trim(); entity.FormDate = txtFormDate.DateTime.Date; entity.EventType = SysConvert.ToString(drpEventType.EditValue); //entity.VedorID = txtVedorID.Text.Trim(); entity.VedorID = SysConvert.ToString(drpVendorID.EditValue); entity.OrderFormNo = txtOrderFormNo.Text.Trim(); entity.Remark1 = txtRemark1.Text.Trim(); entity.Remark2 = txtRemark2.Text.Trim(); entity.Remark3 = txtRemark3.Text.Trim(); entity.Remark4 = txtRemark4.Text.Trim(); entity.Remark5 = txtRemark5.Text.Trim(); entity.Remark = txtRemark.Text.Trim(); entity.MakeOPID = txtMakeOPID.Text.Trim(); entity.MakeDate = txtMakeDate.DateTime.Date; entity.EventStatus = SysConvert.ToInt32(txtEventStatus.EditValue); entity.RDate = txtRDate.DateTime.Date; return(entity); }