/// <summary> /// 设置 /// </summary> public override void EntitySet() { CheckOrder entity = new CheckOrder(); entity.ID = HTDataID; bool findFlag = entity.SelectByID(); txtFormNo.Text = entity.FormNo.ToString(); txtFormDate.DateTime = entity.FormDate; txtAutoCreateFlag.Text = entity.AutoCreateFlag.ToString(); txtSaleProcedureID.Text = entity.SaleProcedureID.ToString(); txtSaleProcedureFormNo.Text = entity.SaleProcedureFormNo.ToString(); txtVendorID.Text = entity.VendorID.ToString(); txtItemCode.Text = entity.ItemCode.ToString(); txtItemName.Text = entity.ItemName.ToString(); txtItemStd.Text = entity.ItemStd.ToString(); txtItemModel.Text = entity.ItemModel.ToString(); txtMWidth.Text = entity.MWidth.ToString(); txtMWeight.Text = entity.MWeight.ToString(); txtRemark.Text = entity.Remark.ToString(); txtMakeOPID.Text = entity.MakeOPID.ToString(); txtMakeOPName.Text = entity.MakeOPName.ToString(); txtMakeDate.DateTime = entity.MakeDate; HTDataSubmitFlag = entity.SubmitFlag; HTDataDelFlag = entity.DelFlag; if (!findFlag) { } BindGridDts(); }
/// <summary> /// 获得实体 /// </summary> /// <returns></returns> private CheckOrder EntityGet() { CheckOrder entity = new CheckOrder(); entity.ID = HTDataID; entity.SelectByID(); entity.FormNo = txtFormNo.Text.Trim(); entity.FormDate = txtFormDate.DateTime.Date; entity.AutoCreateFlag = SysConvert.ToInt32(txtAutoCreateFlag.Text.Trim()); entity.SaleProcedureID = SysConvert.ToInt32(txtSaleProcedureID.Text.Trim()); entity.SaleProcedureFormNo = txtSaleProcedureFormNo.Text.Trim(); entity.VendorID = txtVendorID.Text.Trim(); entity.ItemCode = txtItemCode.Text.Trim(); entity.ItemName = txtItemName.Text.Trim(); entity.ItemStd = txtItemStd.Text.Trim(); entity.ItemModel = txtItemModel.Text.Trim(); entity.MWidth = txtMWidth.Text.Trim(); entity.MWeight = txtMWeight.Text.Trim(); entity.Remark = txtRemark.Text.Trim(); if (HTFormStatus == FormStatus.新增) { entity.MakeOPID = FParamConfig.LoginID; entity.MakeOPName = FParamConfig.LoginName; entity.MakeDate = DateTime.Now; } return(entity); }
/// <summary> /// 获得布实体 /// </summary> /// <returns></returns> public CheckOrderISN EntityGet() { CheckOrderISN enity = new CheckOrderISN(); enity.ID = ISNID; enity.SelectByID(); CheckOrderDts entityp = new CheckOrderDts();//检验指示单明细表信息 entityp.ID = DtsID; entityp.SelectByID(); CheckOrder entityM = new CheckOrder();//检验指示单主表信息 entityM.ID = entityp.MainID; entityM.SelectByID(); enity.ItemCode = entityM.ItemCode; enity.ItemName = entityM.ItemName; enity.ItemStd = entityM.ItemStd; enity.ItemModel = entityM.ItemModel; enity.MWeight = entityM.MWeight; enity.MWidth = entityM.MWidth; enity.ColorNum = entityp.ColorNum; enity.ColorName = entityp.ColorName; enity.Batch = entityp.Batch; enity.VendorBatch = entityp.VendorBatch; //enity.JarNum = entityp.JarNum; enity.JarNum = lblJarNum.Text.Trim(); enity.YQty = entityp.Qty;//原米数 if (SysConvert.ToDecimal(lblQty.Text.Trim()) != 0m) { enity.ChkQty = SysConvert.ToDecimal(lblQty.Text.Trim()); } else { throw new Exception("数据异常,未读取到码表数据,请稍后重新点击"); } enity.ChkMWeight = entityM.MWeight; //检验的克重 enity.ChkMWidth = entityM.MWidth; //检验的门幅 enity.CheckDate = DateTime.Now; enity.CheckOPID = FParamConfig.LoginID; //EndityGetSetValue(enity);//继承类附加属性 return(enity); }
/// <summary> /// 设置数值 /// </summary> private void SetEntity(int p_Type) { if (p_Type == 1)//窗体加载初始化 { string CompactInfo = string.Empty; CheckOrder entity = new CheckOrder(); entity.ID = m_ID; entity.SelectByID(); CheckOrderDts entityDts = new CheckOrderDts(); entityDts.ID = m_DtsID; entityDts.SelectByID(); CompactInfo += "产品编号:" + entity.ItemCode; CompactInfo += " 品名:" + entity.ItemModel; CompactInfo += " 色号:" + entityDts.ColorNum; CompactInfo += " 颜色:" + entityDts.ColorName; CompactInfo += " 缸号:" + entityDts.JarNum; lbShowCompactInfo.Text = CompactInfo; lblJarNum.Text = entityDts.JarNum;//缸号赋值 } }