Exemplo n.º 1
0
 private void InitContractInfo(string contractId)
 {
     if (!string.IsNullOrEmpty(contractId))
     {
         PayoutContractModel model = new PayoutContract().GetModel(contractId);
         this.txtContractCode.Text = model.ContractCode;
         this.txtContractName.Text = model.ContractName;
         PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
         string           prjCode          = pTPrjInfoService.GetById(model.PrjGuid).PrjCode;
         this.txtPrjCode.Text       = prjCode;
         this.txtProject.Text       = model.PrjName;
         this.txtContractMoney.Text = model.ModifiedMoney.ToString();
         this.txtSignDate.Text      = Convert.ToDateTime(model.SignDate).ToShortDateString();
         PayoutPayment payoutPayment = new PayoutPayment();
         decimal?      paySum        = payoutPayment.GetPaySum(contractId);
         decimal?      invoiceSum    = this.invoice.GetInvoiceSum(contractId);
         this.txtPaymentSum.Text = paySum.ToString();
         this.txtInvoiceSum.Text = invoiceSum.ToString();
         this.txtDiff.Text       = Convert.ToString(paySum - invoiceSum);
         this.txtPayer.Text      = model.AName;
         this.txtPayee.Text      = model.CorpName;
         XPMBasicContactCorp xPMBasicContactCorp = this.GetbasiCorp(model.BName);
         this.txtTaxNo.Text    = xPMBasicContactCorp.TaxCard;
         this.txtContact.Text  = xPMBasicContactCorp.Address + xPMBasicContactCorp.Telephone;
         this.txtBankCode.Text = xPMBasicContactCorp.AccountBank + xPMBasicContactCorp.BankAccounts;
     }
 }
Exemplo n.º 2
0
    protected void BindPage()
    {
        PayoutInvoiceInfo model = this.invoice.GetModel(base.Request["InvoiceId"]);

        if (model != null)
        {
            PayoutContractModel model2 = new PayoutContract().GetModel(model.ContractID);
            if (model2 != null)
            {
                this.lblContractCode.Text = model2.ContractCode;
                this.lblContractName.Text = model2.ContractName;
                PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
                string           prjCode          = pTPrjInfoService.GetById(model2.PrjGuid).PrjCode;
                this.lblPrjCode.Text       = prjCode;
                this.lblPrjName.Text       = model2.PrjName;
                this.lblContractMoney.Text = model2.ModifiedMoney.ToString();
                this.lblSignedDate.Text    = Convert.ToDateTime(model2.SignDate).ToShortDateString();
                PayoutPayment payoutPayment = new PayoutPayment();
                decimal?      paySum        = payoutPayment.GetPaySum(model2.ContractID);
                decimal?      invoiceSum    = this.invoice.GetInvoiceSum(model2.ContractID);
                this.lblPaymentSum.Text = paySum.ToString();
                this.lblInvoiceSum.Text = invoiceSum.ToString();
                this.lblDiff.Text       = Convert.ToString(paySum - invoiceSum);
            }
            this.lblAmountMoney.Text      = model.Amount.ToString();
            this.lblInvoiceNo.Text        = model.InvoiceNo;
            this.lblInvoiceCode.Text      = model.InvoiceCode;
            this.lblParty.Text            = model.Payer;
            this.lblSecond.Text           = model.Payee;
            this.lblInvoiceType.Text      = this.getInvoiceType(model.InvoiceType);
            this.lblTaxNo.Text            = model.TaxNo;
            this.lblTransactor.Text       = model.Transactor;
            this.lblInvoiceDate.Text      = model.InvoiceDate.ToString();
            this.lblAddress.Text          = model.Contact;
            this.lblBankCode.Text         = model.BankCode;
            this.lblInputUser.Text        = model.InputPerson;
            this.lblInputTime.Text        = Convert.ToDateTime(model.InputDate).ToShortDateString();
            this.lblNote.Text             = model.Notes;
            this.lblOrganizationCode.Text = model.OrganizationCode;
            this.lblUpFiled.Text          = FileView.FilesBind(1911, model.InvoiceID);
        }
    }