/// <summary> /// 设置 /// </summary> public override void EntitySet() { OrderStep entity = new OrderStep(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtCode.Text = entity.Code.ToString(); txtName.Text = entity.Name.ToString(); ColorConverter cc = new ColorConverter(); this.drpSelectColor.EditValue = cc.ConvertFromString(entity.ColorStr); drpNextStepID.EditValue = entity.NextStepID; drpSaleProduceID.EditValue = entity.SaleProcedureID; drpFormListID.EditValue = entity.FormListID; drpSaleProduceID2.EditValue = entity.SaleProcedureID2; drpFormListID2.EditValue = entity.FormListID2; chkDZFlag.Checked = SysConvert.ToBoolean(entity.DZFlag); chkInvoiceFlag.Checked = SysConvert.ToBoolean(entity.InvoiceFlag); chkRecAmountFlag.Checked = SysConvert.ToBoolean(entity.RecAmountFlag); chkFinishFlag.Checked = SysConvert.ToBoolean(entity.FinishFlag); chkCancelFlag.Checked = SysConvert.ToBoolean(entity.CancelFlag); chkCheckItemFlag.Checked = SysConvert.ToBoolean(entity.CheckItemFlag); chkCheckColorFlag.Checked = SysConvert.ToBoolean(entity.CheckColorFlag); txtRemark.Text = entity.Remark.ToString(); if (!findFlag) { } }
/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private OrderStep EntityGet() { OrderStep entity = new OrderStep(); entity.ID = HTDataID; entity.SelectByID(); entity.Code = txtCode.Text.Trim(); entity.Name = txtName.Text.Trim(); ColorConverter cc = new ColorConverter(); entity.ColorStr = cc.ConvertToString(drpSelectColor.Color);//颜色 entity.NextStepID = SysConvert.ToInt32(drpNextStepID.EditValue); entity.SaleProcedureID = SysConvert.ToInt32(drpSaleProduceID.EditValue); entity.FormListID = SysConvert.ToInt32(drpFormListID.EditValue); entity.SaleProcedureID2 = SysConvert.ToInt32(drpSaleProduceID2.EditValue); entity.FormListID2 = SysConvert.ToInt32(drpFormListID2.EditValue); entity.DZFlag = SysConvert.ToInt32(chkDZFlag.Checked); entity.InvoiceFlag = SysConvert.ToInt32(chkInvoiceFlag.Checked); entity.RecAmountFlag = SysConvert.ToInt32(chkRecAmountFlag.Checked); entity.FinishFlag = SysConvert.ToInt32(chkFinishFlag.Checked); entity.CancelFlag = SysConvert.ToInt32(chkCancelFlag.Checked); entity.CheckItemFlag = SysConvert.ToInt32(chkCheckItemFlag.Checked); entity.CheckColorFlag = SysConvert.ToInt32(chkCheckColorFlag.Checked); entity.Remark = txtRemark.Text.Trim(); return(entity); }