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

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

            txtFormNo.Text         = entity.FormNo.ToString();
            txtFormDate.DateTime   = entity.FormDate;
            drpVendorID.EditValue  = entity.VendorID.ToString();
            txtOrderFormNo.Text    = entity.OrderFormNo.ToString();
            drpCostType.EditValue  = entity.CostType.ToString();
            txtAmount.Text         = entity.Amount.ToString();
            txtRemark.Text         = entity.Remark.ToString();
            txtMakeOPID.Text       = entity.MakeOPID.ToString();
            txtMakeOPName.Text     = entity.MakeOPName.ToString();
            txtMakeDate.DateTime   = entity.MakeDate;
            txtSinglePrice.Text    = entity.SinglePrice.ToString();
            txtQty.Text            = entity.Qty.ToString();
            txtCostContent.Text    = entity.CostContent.ToString();
            txtAidNo.Text          = entity.AidNo.ToString();
            txtUnit.Text           = entity.Unit.ToString();
            txtSJAmount.Text       = entity.SJAmount.ToString();
            txtInvoiceAmount.Text  = entity.InvoiceAmount.ToString();
            txtInvoiceBalance.Text = entity.InvoiceBalance.ToString();
            txtInvoiceNo.Text      = entity.InvoiceNo.ToString();
            drpPayment.Text        = SysConvert.ToString(entity.Payment);

            HTDataSubmitFlag = entity.SubmitFlag;
            HTDataDelFlag    = entity.DelFlag;

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

            entity.ID = HTDataID;
            entity.SelectByID();
            entity.FormNo         = txtFormNo.Text.Trim();
            entity.FormDate       = txtFormDate.DateTime.Date;
            entity.VendorID       = SysConvert.ToString(drpVendorID.EditValue);
            entity.OrderFormNo    = txtOrderFormNo.Text.Trim();
            entity.CostType       = SysConvert.ToString(drpCostType.EditValue);
            entity.Remark         = txtRemark.Text.Trim();
            entity.SinglePrice    = SysConvert.ToDecimal(txtSinglePrice.Text.Trim());
            entity.Qty            = SysConvert.ToDecimal(txtQty.Text.Trim());
            entity.CostContent    = txtCostContent.Text.Trim();
            entity.Amount         = SysConvert.ToDecimal(txtAmount.Text.Trim());
            entity.AidNo          = txtAidNo.Text.Trim();
            entity.Unit           = txtUnit.Text.Trim();
            entity.SJAmount       = SysConvert.ToDecimal(txtSJAmount.Text.Trim());
            entity.InvoiceAmount  = SysConvert.ToDecimal(txtInvoiceAmount.Text.Trim());
            entity.InvoiceBalance = SysConvert.ToDecimal(txtInvoiceBalance.Text.Trim());
            entity.InvoiceNo      = txtInvoiceNo.Text.Trim();
            entity.Payment        = SysConvert.ToString(drpPayment.Text);
            if (HTFormStatus == FormStatus.新增)
            {
                entity.MakeOPID   = FParamConfig.LoginID;
                entity.MakeOPName = FParamConfig.LoginName;
                entity.MakeDate   = DateTime.Now.Date;
            }

            return(entity);
        }