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; } }
private void ShowGuideLine(string paymentId) { try { if (!ContractParameter.IsPaymentAlarm) { this.trSate.Visible = false; } else { DataTable paymentMoney = this.AccountBll.GetPaymentMoney(paymentId); if (paymentMoney.Rows.Count > 0) { DataRow dataRow = paymentMoney.Rows[0]; decimal num = Convert.ToDecimal(dataRow["ModifiedMoney"].ToString()); this.lblContractAmount.Text = num.ToString("0.000"); decimal d = Convert.ToDecimal(dataRow["payoutMoney"].ToString()); this.lblPaymentedAmount.Text = d.ToString("0.000"); decimal num2 = Convert.ToDecimal(this.lblInMoney.Text.Trim()); this.lblPaymentAmount.Text = num2.ToString("0.000"); if (num != 0m) { decimal num3 = d / num; this.lblRate.Text = string.Format("{0:P}", num3); PayoutPayment payoutPayment = new PayoutPayment(); string stateByBalanceAmount = payoutPayment.GetStateByBalanceAmount(num3); this.lblState.Text = stateByBalanceAmount; this.SetLableColor(Common2.GetColorByState(stateByBalanceAmount)); } else { this.lblRate.Text = "无合同金额"; this.lblState.Text = "高"; this.SetLableColor(Common2.GetColorByState("高")); } } } } catch { } }
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); } }
private static void AddPayoutContractAlarm() { ConConfigContractService service = new ConConfigContractService(); PayoutPayment payment = new PayoutPayment(); using (List <PayoutPaymentModel> .Enumerator enumerator = payment.GetList().GetEnumerator()) { PayoutPaymentModel item; while (enumerator.MoveNext()) { item = enumerator.Current; if (!pTDbsjBll.Exists(item.ID)) { int?payoutAlarmDays = (from p in service where p.ContractId == item.ContractID select p).FirstOrDefault <ConConfigContract>().PayoutAlarmDays; PTDbsjModel model = new PTDbsjModel { C_OpenFlag = "0", DTM_DBSJ = DateTime.Now, I_XGID = item.ID }; StringBuilder builder = new StringBuilder(); builder.AppendFormat("付款编号为{0}", item.PaymentCode); builder.Append("的合同需要在"); builder.AppendFormat("{0}日", payoutAlarmDays); builder.Append("内付款"); model.V_Content = builder.ToString(); model.V_DBLJ = "StockManage/basicset/ShowView.aspx?i=" + item.ID; model.V_LXBM = "021"; model.V_TPLJ = "new_Mail.gif"; model.V_YHDM = "00000000"; pTDbsjBll.Add(model); } } } }
protected void btnPlan_Click(object sender, EventArgs e) { string value = this.hdnRPUID.Value; if (this.HdnSub.Value == "0") { PayoutPayment payoutPayment = new PayoutPayment(); PayoutPaymentModel model = payoutPayment.GetModel(value); this.txtRPCode.Text = model.PaymentCode.ToString(); this.txtPayMoney.Text = model.PaymentMoney.ToString(); this.txtPayOut.Text = this.AccountBll.getMoneyByPayCode(model.ID).ToString(); this.txtInMoney.Text = (model.PaymentMoney - Convert.ToDecimal(this.txtPayOut.Text)).ToString(); this.txtJianMoney.Text = this.txtInMoney.Text; this.txtHandler.Text = model.InputPerson; return; } this.txtPayOut.Text = this.AccountBll.getMoneyByPayCode(value).ToString(); string strwhere = " inDiaryId ='" + value + "' "; DataTable dtByWhere = OrganizationDiary.getDtByWhere(strwhere); if (dtByWhere.Rows.Count > 0) { if (string.IsNullOrEmpty(dtByWhere.Rows[0]["Total"].ToString())) { this.txtPayMoney.Text = "0.00"; } else { this.txtPayMoney.Text = dtByWhere.Rows[0]["Total"].ToString(); } this.txtRPCode.Text = dtByWhere.Rows[0]["Name"].ToString(); this.txtInMoney.Text = (Convert.ToDecimal(this.txtPayMoney.Text) - Convert.ToDecimal(this.txtPayOut.Text)).ToString(); this.txtJianMoney.Text = this.txtInMoney.Text; this.txtHandler.Text = dtByWhere.Rows[0]["issuedBy"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { this.hdnAccountID.Value = base.Request.QueryString["ic"].ToString(); this.accountModel = this.AccountBll.GetModel(new Guid(this.hdnAccountID.Value)); this.lblcode.Text = this.accountModel.PayOutCode.ToString(); this.lblInDate.Text = Convert.ToDateTime(this.accountModel.PayOutTime).ToString("yyyy-MM-dd"); this.lblInPeople.Text = com.jwsoft.pm.entpm.PageHelper.QueryUser(this, this.accountModel.PayOutPeople); PrjInfoModel modelByPrjGuid = this.ptPrjInfo.GetModelByPrjGuid(this.accountModel.prjGuid); if (modelByPrjGuid != null) { this.lblProject.Text = modelByPrjGuid.PrjName; } this.lblPayMoney.Text = this.AccountBll.getMoneyByPayCode(this.accountModel.RPGuid.ToString()).ToString(); PayoutPayment payoutPayment = new PayoutPayment(); PayoutPaymentModel model = payoutPayment.GetModel(this.accountModel.RPGuid.ToString()); if (model != null) { this.lblContPayCode.Text = model.PaymentCode.ToString(); this.lblContMoney.Text = model.PaymentMoney.ToString(); } else { this.lblWord.Text = "费用名称"; string strwhere = " inDiaryId ='" + this.accountModel.RPGuid.ToString() + "' "; DataTable dtByWhere = OrganizationDiary.getDtByWhere(strwhere); if (dtByWhere.Rows.Count > 0) { if (string.IsNullOrEmpty(dtByWhere.Rows[0]["Total"].ToString())) { this.lblContMoney.Text = "0.00"; } else { this.lblContMoney.Text = dtByWhere.Rows[0]["Total"].ToString(); } this.lblContPayCode.Text = dtByWhere.Rows[0]["Name"].ToString(); } } this.lblInMoney.Text = this.accountModel.PayOutMoney.ToString(); this.lblHandler.Text = this.accountModel.Handler.ToString(); this.lblRemark.Text = this.accountModel.Remark.ToString(); this.lblContractName.Text = this.accountModel.ContractName.ToString(); this.upload.InnerHtml = this.FilesBind(this.hdnAccountID.Value); this.lblPrintDate.Text = DateTime.Now.ToShortDateString(); this.lblPrintPeople.Text = com.jwsoft.pm.entpm.action.PageHelper.QueryUser(this, base.UserCode); this.lblContMoney.Text = (string.IsNullOrEmpty(this.lblContMoney.Text) ? "0.00" : this.lblContMoney.Text); if (this.accountModel.PayOutMoney > Convert.ToDecimal(this.lblContMoney.Text) - Convert.ToDecimal(this.lblPayMoney.Text)) { this.lblInMoney.Attributes.Add("style", "Color:red"); } this.lbljianMoney.Text = (Convert.ToDecimal(this.lblContMoney.Text) - Convert.ToDecimal(this.lblPayMoney.Text)).ToString(); Fund_Prj_Accoun fund_Prj_Accoun = new Fund_Prj_Accoun(); string strwhere2 = " and AccountID='" + fund_Prj_Accoun.getAccountByPrjGuid(this.accountModel.prjGuid.ToString()) + "' "; DataTable accounSumInfo = fund_Prj_Accoun.getAccounSumInfo(strwhere2); this.lblAccountYue.Text = accounSumInfo.Rows[0]["JE"].ToString(); if (base.Request.QueryString["see"] != null && base.Request.QueryString["see"].ToString() == "see") { this.lblAccountYue.Attributes.Add("style", "font-weight:bold"); } else { this.bllProducer.Visible = false; this.btnPrnt.Visible = false; if (Convert.ToDecimal(this.lblAccountYue.Text.ToString()) < Convert.ToDecimal(this.lblInMoney.Text.ToString())) { Label expr_4D5 = this.lblAccountYue; expr_4D5.Text += " 本次记账金额大于账户余额!"; this.lblAccountYue.Attributes.Add("style", "font-weight:bold;color:red"); } } this.ShowGuideLine(this.accountModel.RPGuid.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { this.hdnZHID.Value = base.Request.QueryString["ZHID"].ToString(); this.HdnSub.Value = base.Request.QueryString["Sub"].ToString(); string strwhere = " and AccountID='" + base.Request["ZHID"].ToString() + "' "; Fund_Prj_Accoun fund_Prj_Accoun = new Fund_Prj_Accoun(); DataTable accounSumInfo = fund_Prj_Accoun.getAccounSumInfo(strwhere); this.hdnyue.Value = accounSumInfo.Rows[0]["JE"].ToString(); if (this.HdnSub.Value == "0") { this.lblSel.Text = "资金支付申请"; } else { this.lblSel.Text = "费用名称"; } if (base.Request.QueryString["Action"] == "Add") { this.txtAccCode.Text = DateTime.Now.ToString("yyyyMMddHHmmssfff"); this.hdnAccountID.Value = Guid.NewGuid().ToString(); this.txtInDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); this.txtInPeople.Text = com.jwsoft.pm.entpm.PageHelper.QueryUser(this, base.UserCode); this.hdnPeopleCode.Value = base.UserCode; this.aM = this.al.GetModel(this.hdnZHID.Value); if (!this.aM.PrjGuid.StartsWith("'")) { PrjInfoModel modelByPrjGuid = this.ptPrjInfo.GetModelByPrjGuid(this.aM.PrjGuid); if (modelByPrjGuid != null) { this.txtPrjName.Text = modelByPrjGuid.PrjName; this.hdnProjectCode.Value = this.aM.PrjGuid; } } } else { this.hdnAccountID.Value = base.Request.QueryString["AccountID"].ToString(); this.accountModel = this.AccountBll.GetModel(new Guid(this.hdnAccountID.Value)); this.txtAccCode.Text = this.accountModel.PayOutCode.ToString(); this.txtInDate.Text = Convert.ToDateTime(this.accountModel.PayOutTime).ToString("yyyy-MM-dd"); this.txtInPeople.Text = com.jwsoft.pm.entpm.PageHelper.QueryUser(this, this.accountModel.PayOutPeople); this.hdnPeopleCode.Value = this.accountModel.PayOutPeople; this.hdnProjectCode.Value = this.accountModel.prjGuid.ToString(); PrjInfoModel modelByPrjGuid2 = this.ptPrjInfo.GetModelByPrjGuid(this.accountModel.prjGuid); if (modelByPrjGuid2 != null) { this.txtPrjName.Text = modelByPrjGuid2.PrjName; } this.txtRemark.Text = this.accountModel.Remark.ToString(); this.txtInMoney.Text = this.accountModel.PayOutMoney.ToString(); this.txtHandler.Text = this.accountModel.Handler.ToString(); this.hdnRPUID.Value = this.accountModel.RPGuid.ToString(); this.txtPayOut.Text = this.AccountBll.getMoneyByPayCode(this.accountModel.RPGuid.ToString()).ToString(); this.txtPayMoney.Text = "0.00"; if (this.HdnSub.Value == "0") { PayoutPayment payoutPayment = new PayoutPayment(); PayoutPaymentModel model = payoutPayment.GetModel(this.accountModel.RPGuid.ToString()); if (model != null) { this.txtRPCode.Text = model.PaymentCode.ToString(); this.txtPayMoney.Text = model.PaymentMoney.ToString(); } } else { string strwhere2 = " inDiaryId ='" + this.accountModel.RPGuid.ToString() + "' "; DataTable dtByWhere = OrganizationDiary.getDtByWhere(strwhere2); if (dtByWhere.Rows.Count > 0) { if (string.IsNullOrEmpty(dtByWhere.Rows[0]["Total"].ToString())) { this.txtPayMoney.Text = "0.00"; } else { this.txtPayMoney.Text = dtByWhere.Rows[0]["Total"].ToString(); } this.txtRPCode.Text = dtByWhere.Rows[0]["Name"].ToString(); } } this.txtJianMoney.Text = (Convert.ToDecimal(this.txtPayMoney.Text) - Convert.ToDecimal(this.txtPayOut.Text)).ToString(); } this.FileUpload1.Class = "AccountPayOut"; this.FileUpload1.RecordCode = this.hdnAccountID.Value; } }