/// <summary> /// 设置 /// </summary> public override void EntitySet() { CostRegister entity = new CostRegister(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtFormNo.Text = entity.FormNo.ToString(); txtCheckOPID.Text = entity.CheckOPID.ToString(); txtCheckDate.DateTime = entity.CheckDate; txtMakeOPID.Text = entity.MakeOPID.ToString(); txtMakeOPName.Text = entity.MakeOPName.ToString(); txtMakeDate.DateTime = entity.MakeDate; txtRemark.Text = entity.Remark.ToString(); txtTotalAmount.Text = entity.TotalAmount.ToString(); HTDataSubmitFlag = entity.SubmitFlag; HTDataDelFlag = entity.DelFlag; if (!findFlag) { } BindGridDts(); }
/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private CostRegister EntityGet() { CostRegister entity = new CostRegister(); entity.ID = HTDataID; entity.SelectByID(); entity.FormNo = txtFormNo.Text.Trim(); entity.CheckOPID = txtCheckOPID.Text.Trim(); entity.CheckDate = txtCheckDate.DateTime.Date; entity.MakeOPID = txtMakeOPID.Text.Trim(); entity.MakeOPName = txtMakeOPName.Text.Trim(); entity.MakeDate = txtMakeDate.DateTime.Date; entity.Remark = txtRemark.Text.Trim(); entity.TotalAmount = SysConvert.ToDecimal(txtTotalAmount.Text.Trim()); return(entity); }