public string GetContName(string ContID) { IncometContractBll incometContractBll = new IncometContractBll(); IncometContractModel model = incometContractBll.GetModel(ContID); return(model.ContractName); }
private void InitContractInfo(string conId) { IncometContractBll incometContractBll = new IncometContractBll(); IncometContractModel model = incometContractBll.GetModel(conId); this.lblContractCode.Text = model.ContractCode; this.lblContractName.Text = model.ContractName; this.lblPrintDate.Text = DateTime.Now.ToShortDateString(); string userCode = this.Session["yhdm"].ToString(); DataTable dataTable = PersonnelAction.QueryPersonnelById(userCode); if (dataTable != null && dataTable.Rows.Count == 1) { this.lblBllProducer.Text = dataTable.Rows[0]["v_xm"].ToString(); } new PayoutBalance().GetBalancedAmount(conId, false); this.lblBalancedSum.Text = WebUtil.GetPaymentSum(model.ContractID, "Con_Incomet_Payment", "CllectionPrice"); bool containPending = this.paymentApply.GetById(this.ViewState["PaymentId"].ToString()).ContainPending; decimal paySum = this.paymentApply.GetPaySum(conId, containPending); this.lblPaySum.Text = paySum.ToString(); decimal num = Convert.ToDecimal(this.lblBalancedSum.Text) - paySum; this.lblDiff.Text = num.ToString(); this.lblContractMoney.Text = model.ContractPrice.ToString(); this.lblSignedDate.Text = model.SignedTime.Value.ToShortDateString(); }
protected void btnRe_Click(object sender, EventArgs e) { IncometContractModel model = new IncometContractBll().GetModel(this.hdContractId.Value); this.txtContractCode.Text = model.ContractCode; this.txtContractPrice.Text = model.ContractPrice.ToString(); this.txtSignedTime.Text = Common2.GetTime(model.SignedTime.ToString()); this.txtContractName.Text = model.ContractName; this.hdContractId.Value = model.ContractID; }
private void InitContractInfo(string conId) { IncometContractBll incometContractBll = new IncometContractBll(); IncometContractModel model = incometContractBll.GetModel(conId); this.txtContractCode.Text = model.ContractCode; this.txtContractName.Text = model.ContractName; new PayoutBalance().GetBalancedAmount(conId, false); this.lblPaymentSum.Text = WebUtil.GetPaymentSum(model.ContractID, "Con_Incomet_Payment", "CllectionPrice"); decimal paySum = this.PaymentApply.GetPaySum(conId, this.chkContainPending.Checked); this.lblPaySum.Text = paySum.ToString("0.000"); decimal num = Convert.ToDecimal(this.lblPaymentSum.Text) - paySum; this.txtDiff.Text = num.ToString("0.000"); this.txtContractMoney.Text = model.ContractPrice.ToString(); this.txtSignedDate.Text = model.SignedTime.Value.ToShortDateString(); }
private void InitUpdateAndQuery() { string userCode = this.Session["yhdm"].ToString(); DataTable dataTable = PersonnelAction.QueryPersonnelById(userCode); if (dataTable != null && dataTable.Rows.Count == 1) { this.lblBllProducer.Text = dataTable.Rows[0]["v_xm"].ToString(); } this.materialWant.GetModel(this.wantplanCode); this.lblPrintDate.Text = System.DateTime.Now.ToShortDateString(); PayoutContractModel model = this.payoutContract.GetModel(ContractManage_PayoutContract_ParyoutContractQuery.contractID); if (model != null) { this.bindTarget(ContractManage_PayoutContract_ParyoutContractQuery.contractID); this.txtProject.Text = model.PrjName; this.txtPrjType.Text = this.GetPrjTypeName(new System.Guid(model.PrjGuid)); this.txtContractCode.Text = model.ContractCode; this.txtContractName.Text = model.ContractName; this.txtPreMoney.Text = ((!model.PrepayMoney.HasValue) ? string.Empty : model.PrepayMoney.ToString()); this.txtContractMoney.Text = ((!model.ContractMoney.HasValue) ? string.Empty : model.ContractMoney.ToString()); this.txtModifiedMoney.Text = ((!model.ModifiedMoney.HasValue) ? string.Empty : model.ModifiedMoney.ToString()); this.contractType.Text = this.getContractName(model.TypeID); IncometContractBll incometContractBll = new IncometContractBll(); IncometContractModel model2 = incometContractBll.GetModel(model.InContractID); if (model2 != null) { PrjInfoModel arg_1CE_0 = model2.Project; this.txtIncomeContract.Text = ((model2.ContractName == null) ? "" : model2.ContractName); } else { this.txtIncomeContract.Text = ""; } this.txtAName.Text = model.AName; this.txtBName.Text = model.CorpName; this.txtAddress.Text = model.Address; this.txtSignDate.Text = ((!model.SignDate.HasValue) ? string.Empty : System.Convert.ToDateTime(model.SignDate).ToShortDateString()); DataTable table = Common2.GetTable("dbo.XPM_Basic_CodeList", "where typeId=27 and ParentCodeID=0"); DataTable table2 = Common2.GetTable("dbo.XPM_Basic_CodeList", "where typeId=25 and ParentCodeID=0"); if (table.Rows.Count > 0) { foreach (DataRow dataRow in table.Rows) { if (dataRow["NoteID"].ToString() == model.BalanceMode) { this.txtBalanceMode.Text = dataRow["CodeName"].ToString(); } } } if (table2.Rows.Count > 0) { foreach (DataRow dataRow2 in table2.Rows) { if (dataRow2["NoteID"].ToString() == model.PayMode) { this.txtdropPayMode.Text = dataRow2["CodeName"].ToString(); } } } this.txtStartDate.Text = ((!model.StartDate.HasValue) ? string.Empty : System.Convert.ToDateTime(model.StartDate).ToShortDateString()); this.txtEndDate.Text = ((!model.EndDate.HasValue) ? string.Empty : System.Convert.ToDateTime(model.EndDate).ToShortDateString()); this.txtPaymentCondition.Text = model.PaymentCondition; this.txtMainItem.Text = model.MainItem; this.txtNotes.Text = model.Notes; this.txtCapitalNumber.Text = ((model.CapitalNumber == null) ? "" : model.CapitalNumber.ToString()); this.txtfinanceNumber.Text = ((model.FinanceNumber == null) ? "" : model.FinanceNumber.ToString()); this.txtfinanceProject.Text = ((model.FinanceProject == null) ? "" : model.FinanceProject.ToString()); this.Literal1.Text = this.FilesBind(1901, model.ContractID); if (model.ContractMoney.ToString() == "") { this.txtCapitalNumber.Text = ConverRMB.Convert(0m); } else { decimal number = System.Convert.ToDecimal(model.ContractMoney); this.txtCapitalNumber.Text = ConverRMB.Convert(number); } if (model.ModifiedMoney.ToString() == "") { this.txtCapitalizationModifiedMoney.Text = ConverRMB.Convert(0m); } else { decimal number2 = System.Convert.ToDecimal(model.ModifiedMoney); this.txtCapitalizationModifiedMoney.Text = ConverRMB.Convert(number2); } string key; switch (key = model.ConState.ToString()) { case "0": this.txtTypeName.Text = "执 行"; return; case "1": this.txtTypeName.Text = "中 止"; return; case "2": this.txtTypeName.Text = "保 内"; return; case "3": this.txtTypeName.Text = "保 外"; return; case "4": this.txtTypeName.Text = "解 除"; return; case "5": this.txtTypeName.Text = "终 止"; return; } this.txtTypeName.Text = "----"; } }