private void DataBindAccount() { string text = " "; if (this.txtCode.Text.Trim() != "" && this.txtCode.Text.Trim() != null) { text = text + " and accountNum like '%" + this.txtCode.Text.Trim().ToString() + "%' "; } if (this.hdnProjectCode.Value != "" && this.hdnProjectCode.Value != null) { text = text + " and PrjGuid like '%" + this.hdnProjectCode.Value + "%' "; } if (this.txtPrjName.Text.Trim() != "" && this.txtPrjName.Text.Trim() != null) { text = text + " and acountName like '%" + this.txtPrjName.Text.Trim().ToString() + "%' "; } if (base.UserCode != "00000000") { string text2 = text; text = string.Concat(new string[] { text2, " AND authorizer LIKE '%", base.UserCode, "%' OR [createMan]=", base.UserCode, " " }); } Fund_Prj_Accoun fund_Prj_Accoun = new Fund_Prj_Accoun(); if (this.DDSelType.SelectedValue == "2") { this.GVAccount.Style.Add("display", "none"); this.gvwAccount.Style.Add("display", ""); this.gvwAccount.DataSource = fund_Prj_Accoun.getAccounSumInfo(text); this.gvwAccount.DataBind(); return; } this.GVAccount.Style.Add("display", ""); this.gvwAccount.Style.Add("display", "none"); this.GVAccount.DataSource = fund_Prj_Accoun.getAccounSumInfo(text); this.GVAccount.DataBind(); }
private void DataBindAccount() { string text = " and authorizer like '%" + base.UserCode + "%' "; if (this.txtCode.Text.Trim() != "" && this.txtCode.Text.Trim() != null) { text = text + " and accountNum like '%" + this.txtCode.Text.Trim().ToString() + "%' "; } if (this.hdnProjectCode.Value != "" && this.hdnProjectCode.Value != null) { text = text + " and PrjGuid like '%" + this.hdnProjectCode.Value + "%' "; } if (this.txtPrjName.Text.Trim() != "" && this.txtPrjName.Text.Trim() != null) { text = text + " and acountName like '%" + this.txtPrjName.Text.Trim().ToString() + "%' "; } Fund_Prj_Accoun fund_Prj_Accoun = new Fund_Prj_Accoun(); this.gvwAccount.DataSource = fund_Prj_Accoun.getAccounSumInfo(text); this.gvwAccount.DataBind(); }
private void ToInitialize() { if (this._Ic != "" && this._Ic.Length == 36) { AccounModel accounModel = new AccounModel(); AccountLogic accountLogic = new AccountLogic(); accounModel = accountLogic.GetModel(this._ic); Fund_Prj_Accoun fund_Prj_Accoun = new Fund_Prj_Accoun(); string strwhere = " AND AccountID='" + this._ic + "'"; DataTable accounSumInfo = fund_Prj_Accoun.getAccounSumInfo(strwhere); if (accounModel != null) { this.txtaccountNum.Text = accounModel.accountNum; this.txtacountName.Text = accounModel.acountName; this.txtRemark.Text = accounModel.Remark; this.txtinitialFund.Text = accounModel.initialFund.ToString(); this.lblPrintDate.Text = DateTime.Now.ToShortDateString(); this.lblPrintPeople.Text = PageHelper.QueryUser(this, base.UserCode); this.lblPrj.Text = accountLogic.getPrjName(accounModel.PrjGuid); } if (accounSumInfo.Rows.Count > 0) { if (accounSumInfo.Rows[0]["UsableJE"] != null && accounSumInfo.Rows[0]["UsableJE"].ToString() != "") { this.keyongyue.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["UsableJE"].ToString())); } else { this.keyongyue.Text = "0.000"; } if (accounSumInfo.Rows[0]["JE"] != null && accounSumInfo.Rows[0]["JE"].ToString() != "") { this.zhanghuyue.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["JE"].ToString())); } else { this.zhanghuyue.Text = "0.000"; } if (accounSumInfo.Rows[0]["OtherIncome"] != null && accounSumInfo.Rows[0]["OtherIncome"].ToString() != "") { this.qitashouru.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["OtherIncome"].ToString())); } else { this.qitashouru.Text = "0.000"; } if (accounSumInfo.Rows[0]["ContIncomeRZ"] != null && accounSumInfo.Rows[0]["ContIncomeRZ"].ToString() != "") { this.ruzhang.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["ContIncomeRZ"].ToString())); } else { this.ruzhang.Text = "0.000"; } if (accounSumInfo.Rows[0]["Loan"] != null && accounSumInfo.Rows[0]["Loan"].ToString() != "") { this.jiekuan.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["Loan"].ToString())); } else { this.jiekuan.Text = "0.000"; } if (accounSumInfo.Rows[0]["ReturnLoanBJ"] != null && accounSumInfo.Rows[0]["ReturnLoanBJ"].ToString() != "") { this.benjin.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["ReturnLoanBJ"].ToString())); } else { this.benjin.Text = "0.000"; } if (accounSumInfo.Rows[0]["ReturnLoanOther"] != null && accounSumInfo.Rows[0]["ReturnLoanOther"] != "") { this.lixijiqita.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["ReturnLoanOther"].ToString())); } else { this.lixijiqita.Text = "0.000"; } if (accounSumInfo.Rows[0]["MustPaidCont"] != null && accounSumInfo.Rows[0]["MustPaidCont"].ToString() != "") { this.YZhetonge.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["MustPaidCont"].ToString())); } else { this.YZhetonge.Text = "0.000"; } if (accounSumInfo.Rows[0]["MustPaidOtherCost"] != null && accounSumInfo.Rows[0]["MustPaidOtherCost"].ToString() != "") { this.YZjianjiefeiyong.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["MustPaidOtherCost"].ToString())); } else { this.YZjianjiefeiyong.Text = "0.000"; } if (accounSumInfo.Rows[0]["UnpaidCont"] != null && accounSumInfo.Rows[0]["UnpaidCont"].ToString() != "") { this.WZhetonge.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["UnpaidCont"].ToString())); } else { this.WZhetonge.Text = "0.000"; } if (accounSumInfo.Rows[0]["UnpaidOtherCost"] != null && accounSumInfo.Rows[0]["UnpaidOtherCost"].ToString() != "") { this.WZjianjiefeiyong.Text = string.Format("{0:0.000}", double.Parse(accounSumInfo.Rows[0]["UnpaidOtherCost"].ToString())); return; } this.WZjianjiefeiyong.Text = "0.000"; } } }
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; } }