コード例 #1
0
        /// <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);
        }
コード例 #2
0
        /// <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;//缸号赋值
            }
        }