Exemplo n.º 1
0
        /// <summary>
        /// 设置
        /// </summary>
        public override void EntitySet()
        {
            ColorCard entity = new ColorCard();

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

            txtFormNO.Text             = entity.FormNO.ToString();
            txtFormDate.DateTime       = entity.FormDate;
            txtReqDate.DateTime        = entity.ReqDate;
            drpSaleOPID.EditValue      = entity.SaleOPID.ToString();
            drpVendorID.EditValue      = entity.VendorID.ToString();
            drpShopID.EditValue        = entity.ShopID.ToString();
            txtMakeOPID.Text           = entity.MakeOPID.ToString();
            txtMakeOPName.Text         = entity.MakeOPName.ToString();
            txtMakeDate.DateTime       = entity.MakeDate;
            txtCheckOPID.Text          = entity.CheckOPID.ToString();
            txtCheckDate.DateTime      = entity.CheckDate;
            txtRemark.Text             = entity.Remark.ToString();
            drpSampleType.EditValue    = entity.SampleType;
            chkFirstLightSource.Text   = entity.FirstLightSource;
            chkSencondLightSource.Text = entity.SencondLightSource;
            drpVendorOPID.EditValue    = entity.VendorOPID;
            drpFactoryOPID.EditValue   = entity.FactoryOPID;
            txtHG.Text        = entity.HG;
            txtFactoryID.Text = entity.FactoryID;

            HTDataSubmitFlag = entity.SubmitFlag;
            HTDataDelFlag    = entity.DelFlag;
            if (!findFlag)
            {
            }

            BindGridDts();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获得实体
        /// </summary>
        /// <returns></returns>
        private ColorCard EntityGet()
        {
            ColorCard entity = new ColorCard();

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

            entity.FormNO             = txtFormNO.Text.Trim();
            entity.FormDate           = txtFormDate.DateTime.Date;
            entity.ReqDate            = txtReqDate.DateTime.Date;
            entity.SaleOPID           = SysConvert.ToString(drpSaleOPID.EditValue);
            entity.VendorID           = SysConvert.ToString(drpVendorID.EditValue);
            entity.ShopID             = SysConvert.ToString(drpShopID.EditValue);
            entity.MakeOPID           = txtMakeOPID.Text.Trim();
            entity.MakeOPName         = txtMakeOPName.Text.Trim();
            entity.MakeDate           = txtMakeDate.DateTime.Date;
            entity.CheckOPID          = txtCheckOPID.Text.Trim();
            entity.CheckDate          = txtCheckDate.DateTime.Date;
            entity.Remark             = txtRemark.Text.Trim();
            entity.SampleType         = SysConvert.ToInt32(drpSampleType.EditValue);
            entity.FirstLightSource   = SysConvert.ToString(chkFirstLightSource.Text);
            entity.SencondLightSource = SysConvert.ToString(chkSencondLightSource.Text);
            entity.VendorOPID         = SysConvert.ToString(drpVendorOPID.EditValue);
            entity.FactoryOPID        = SysConvert.ToString(drpFactoryOPID.EditValue);
            entity.HG = txtHG.Text.Trim();

            entity.FactoryID = txtFactoryID.Text.Trim();

            return(entity);
        }