示例#1
0
        /// <summary>
        /// 获得实体
        /// </summary>
        /// <returns></returns>
        private SOPlan EntityGet()
        {
            SOPlan entity = new SOPlan();

            entity.ID = HTDataID;
            entity.SelectByID();
            entity.CompanyTypeID = SysConvert.ToInt32(drpCompanyTypeID.EditValue);
            entity.Code          = txtCode.Text.Trim();
            entity.VendorID      = SysConvert.ToString(drpVendorID.EditValue);
            entity.InDate        = txtInDate.DateTime.Date;

            if (txtNeedDate.DateTime.Date != SystemConfiguration.DateTimeDefaultValue && txtNeedDate.Text.Trim() != "")
            {
                entity.NeedDate = txtNeedDate.DateTime.Date;
            }
            entity.SO         = txtSO.Text.Trim();
            entity.ItemCode   = SysConvert.ToString(drpItemCode.EditValue);
            entity.ItemName   = txtItemName.Text.Trim();
            entity.ItemStd    = txtItemStd.Text.Trim();
            entity.ItemModel  = txtItemModel.Text.Trim();
            entity.CompactQty = SysConvert.ToDecimal(txtCompactQty.Text.Trim());
            entity.Qty        = SysConvert.ToDecimal(txtQty.Text.Trim());
            entity.ItemUnit   = SysConvert.ToString(drpItemUnit.EditValue);
            if (HTFormStatus == FormStatus.新增)
            {
                entity.MakeOPID = FParamConfig.LoginID;
                entity.MakeDate = txtMakeDate.DateTime.Date;
            }
            entity.Remark = txtRemark.Text.Trim();

            return(entity);
        }
示例#2
0
        /// <summary>
        /// 设置
        /// </summary>
        public override void EntitySet()
        {
            SOPlan entity = new SOPlan();

            entity.ID = HTDataID;
            bool findFlag = entity.SelectByID();

            HTDataFormNo = entity.Code;

            drpCompanyTypeID.EditValue = entity.CompanyTypeID;
            txtCode.Text          = entity.Code.ToString();
            drpVendorID.EditValue = entity.VendorID.ToString();
            txtInDate.DateTime    = entity.InDate;
            if (entity.NeedDate != SystemConfiguration.DateTimeDefaultValue && SysConvert.ToString(entity.NeedDate) != "")
            {
                txtNeedDate.DateTime = entity.NeedDate;
            }
            else
            {
                txtNeedDate.Text = "";
            }
            txtSO.Text            = entity.SO.ToString();
            drpItemCode.EditValue = entity.ItemCode.ToString();
            txtItemName.Text      = entity.ItemName.ToString();
            txtItemStd.Text       = entity.ItemStd.ToString();
            txtItemModel.Text     = entity.ItemModel.ToString();
            txtCompactQty.Text    = entity.CompactQty.ToString();
            txtQty.Text           = entity.Qty.ToString();
            drpItemUnit.EditValue = entity.ItemUnit;
            txtMakeOPID.Text      = Common.GetOPName(entity.MakeOPID.ToString());
            txtMakeDate.DateTime  = entity.MakeDate;
            txtRemark.Text        = entity.Remark.ToString();


            if (!findFlag)
            {
            }
        }