/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private YieldRecord EntityGet() { YieldRecord entity = new YieldRecord(); entity.ID = HTDataID; entity.SelectByID(); entity.FormNo = txtFormNo.Text.Trim(); entity.FormDate = txtFormDate.DateTime.Date; entity.ProcessTypeID = SysConvert.ToInt32(txtProcessTypeID.Text.Trim()); entity.Remark = txtRemark.Text.Trim(); if (HTFormStatus == FormStatus.新增) { entity.MakeOPID = FParamConfig.LoginID; entity.MakeDate = DateTime.Now.Date; entity.MakeOPName = FParamConfig.LoginName; } return(entity); }
/// <summary> /// 设置 /// </summary> public override void EntitySet() { YieldRecord entity = new YieldRecord(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtFormNo.Text = entity.FormNo.ToString(); txtFormDate.DateTime = entity.FormDate; txtProcessTypeID.Text = entity.ProcessTypeID.ToString(); txtMakeOPID.Text = entity.MakeOPID.ToString(); txtMakeDate.DateTime = entity.MakeDate; txtMakeOPName.Text = entity.MakeOPName.ToString(); txtRemark.Text = entity.Remark.ToString(); HTDataSubmitFlag = entity.SubmitFlag; HTDataDelFlag = entity.DelFlag; if (!findFlag) { } BindGridDts(); }