/// <summary> /// 设置 /// </summary> public override void EntitySet() { AuditPrice entity = new AuditPrice(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); HTDataFormNo = entity.Code; txtCode.Text = entity.Code.ToString(); txtProductCode.Text = entity.ProductCode.ToString(); drpItemCode.EditValue = entity.ItemCode; txtItemName.Text = entity.ItemName.ToString(); txtItemStd.Text = entity.ItemStd.ToString(); txtItemModel.Text = entity.ItemModel.ToString(); txtProductName.Text = entity.ProductName.ToString(); txtEquipment.Text = entity.Equipment.ToString(); txtProductGY.Text = entity.ProductGY.ToString(); txtProductRSGY.Text = entity.ProductRSGY.ToString(); txtMakeOPID.Text = Common.GetOPName(entity.MakeOPID.ToString()); txtMakeDate.DateTime = entity.MakeDate; drpJSOPID.EditValue = entity.JSOPID; drpSHOPID.EditValue = entity.SHOPID; txtRemark.Text = entity.Remark.ToString(); txtPPrice.Text = entity.PPrice.ToString(); txtPDatetime.DateTime = entity.PDatetime; txtSPrice.Text = entity.SPrice.ToString(); txtSDatetime.DateTime = entity.SDatetime; drpCompanyTypeID.EditValue = entity.CompanyTypeID; txtItemAmount.Text = entity.ItemAmount.ToString(); txtOthAmount.Text = entity.OthAmount.ToString(); txtColorAmount.Text = entity.ColorAmount.ToString(); txtDTAmount.Text = entity.DTAmount.ToString(); txtDTSHAmount.Text = entity.DTSHAmount.ToString(); txtSTPrice.Text = entity.STPrice.ToString(); HTDataSubmitFlag = entity.SubmitFlag; HTDataDelFlag = entity.DelFlag; if (!findFlag) { } BindGridDts(); }
/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private AuditPrice EntityGet() { AuditPrice entity = new AuditPrice(); entity.ID = HTDataID; entity.SelectByID(); entity.Code = txtCode.Text.Trim(); entity.ProductCode = txtProductCode.Text.Trim(); entity.ItemCode = SysConvert.ToString(drpItemCode.EditValue); entity.ItemName = txtItemName.Text.Trim(); entity.ItemStd = txtItemStd.Text.Trim(); entity.ItemModel = txtItemModel.Text.Trim(); entity.ProductName = txtProductName.Text.Trim(); entity.Equipment = txtEquipment.Text.Trim(); entity.ProductGY = txtProductGY.Text.Trim(); entity.ProductRSGY = txtProductRSGY.Text.Trim(); if (this.HTFormStatus == FormStatus.新增) { entity.MakeOPID = FParamConfig.LoginID; entity.MakeDate = txtMakeDate.DateTime.Date; } entity.JSOPID = SysConvert.ToString(drpJSOPID.EditValue); entity.SHOPID = SysConvert.ToString(drpSHOPID.EditValue); entity.Remark = txtRemark.Text.Trim(); entity.PPrice = SysConvert.ToDecimal(txtPPrice.Text.Trim()); entity.PDatetime = txtPDatetime.DateTime.Date; entity.SPrice = SysConvert.ToDecimal(txtSPrice.Text.Trim()); entity.SDatetime = txtSDatetime.DateTime.Date; entity.CompanyTypeID = SysConvert.ToInt32(drpCompanyTypeID.EditValue); entity.ItemAmount = SysConvert.ToDecimal(txtItemAmount.Text.Trim()); entity.OthAmount = SysConvert.ToDecimal(txtOthAmount.Text.Trim()); entity.ColorAmount = SysConvert.ToDecimal(txtColorAmount.Text.Trim()); entity.DTAmount = SysConvert.ToDecimal(txtDTAmount.Text.Trim()); entity.DTSHAmount = SysConvert.ToDecimal(txtDTSHAmount.Text.Trim()); entity.STPrice = SysConvert.ToDecimal(txtSTPrice.Text.Trim()); return(entity); }