public int AddModel() { IncometContractModel model = this.GetModel(); model.FlowState = -1; return(this.incometContractBll.Add(model)); }
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 btnSaveSignInfo_Click(object sender, System.EventArgs e) { string text = this.hfldContractId.Value.Trim(); if (!string.IsNullOrEmpty(text)) { IncometContractModel model = this.incometContractBll.GetModel(text); string value = this.hfldSignedDate.Value; if (string.IsNullOrEmpty(value)) { base.RegisterScript("top.ui.alert('签约日期不能为空!');"); return; } model.SignedTime = new System.DateTime?(System.Convert.ToDateTime(value)); string value2 = this.hfldReFundDate.Value; if (string.IsNullOrEmpty(value2)) { model.ReFundDate = null; } else { model.ReFundDate = new System.DateTime?(System.Convert.ToDateTime(value2)); } if (model.SignPepole.Trim() == "") { model.SignPepole = null; } model.Remark = this.hfldRemark.Value; model.Sign = 1; this.incometContractBll.Update(model); } this.BindGv(); base.RegisterScript("top.ui.show('保存成功');"); }
public string GetContName(string ContID) { IncometContractBll incometContractBll = new IncometContractBll(); IncometContractModel model = incometContractBll.GetModel(ContID); return(model.ContractName); }
public void InitPage() { this.BindDdl(); IncometContractModel model = this.incometContractBll.GetModel(base.Request.QueryString["ContractID"]); if (base.Request.QueryString["id"] != null) { this.lblTitle.Text = "编辑发票"; IncometInvoiceModel model2 = this.incometInvoiceBll.GetModel(base.Request.QueryString["id"]); this.txtAmount.Text = model2.Amount.ToString(); this.txtInputDate.Text = Common2.GetTime(model2.InputDate.ToString()); this.txtInputPerson.Text = model2.InputPerson; this.txtInvoiceDate.Text = Common2.GetTime(model2.InvoiceDate.ToString()); this.txtNotes.Text = model2.Notes; this.txtTransactor.Text = model2.Transactor; this.hdGuid.Value = model2.InvoiceID; this.txtInvoiceNo.Text = model2.InvoiceNo; this.hdChangeCode.Value = model2.InvoiceNo; this.txtInvoiceCode.Text = model2.InvoiceCode; this.txtParty.Text = model2.Payer; this.txtSecond.Text = model2.Payee; this.ddlInvoiceType.SelectedValue = model2.InvoiceType; this.txtTaxNo.Text = model2.TaxNo; this.txtContact.Text = model2.Contact; this.txtBankCode.Text = model2.BankCode; this.txtOrganizationCode.Text = model2.OrganizationCode; } else { this.lblTitle.Text = "开票登记"; this.txtInputDate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); this.txtInputPerson.Text = PageHelper.QueryUser(this, base.UserCode); this.hdGuid.Value = Guid.NewGuid().ToString(); this.txtSecond.Text = model.Second; BasicContactCorpModel basicModel = this.GetBasicModel(this.txtSecond.Text.Trim()); if (basicModel != null) { this.txtTaxNo.Text = basicModel.TaxCard; this.txtContact.Text = basicModel.Address + basicModel.Telephone; this.txtBankCode.Text = basicModel.AccountBank + basicModel.BankAccounts; } if (model.Party != null) { this.txtParty.Text = model.Party.CorpName; } } this.txtPrjCode.Text = model.Project.PrjCode; this.txtPrjName.Text = model.Project.PrjName; this.txtContractCode.Text = model.ContractCode; this.txtContractName.Text = model.ContractName; this.txtContractPrice.Text = WebUtil.GetEnPrice(model.ContractPrice.ToString(), model.ContractID); this.txtSignedTime.Text = Common2.GetTime(model.SignedTime.ToString()); this.txtPaymentSum.Text = WebUtil.GetPaymentSum(model.ContractID, "Con_Incomet_Payment", "CllectionPrice"); this.txtInvoiceSum.Text = WebUtil.GetPaymentSum(model.ContractID, "Con_Incomet_Invoice", "Amount"); this.txtBalance.Text = string.Concat(Convert.ToDecimal(this.txtPaymentSum.Text) - Convert.ToDecimal(this.txtInvoiceSum.Text)); this.FileLink1.MID = 1912; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; }
protected void tvContract_SelectedNodeChanged(object sender, EventArgs e) { IncometContractModel model = this.incometContractBll.GetModel(this.tvContract.SelectedValue); this.lblContractCode.Text = model.ContractCode; this.lblContractName.Text = model.ContractName; this.lblContractPrice.Text = model.ContractPrice.ToString(); this.lblSinedTime.Text = Common2.GetTime(model.SignedTime.ToString()); this.lblContractTitle.Text = model.ContractName + "合同信息"; }
protected void BindgvBudget() { if (!string.IsNullOrEmpty(ContractManage_IncometContract_IncometContractQuery.contractID)) { IncometContractModel model = this.incometContractBll.GetModel(ContractManage_IncometContract_IncometContractQuery.contractID); this.lblTitalbudContract.Text = "合同预算"; DataTable taskInfoByPrjIdAndConId = BudContractTask.GetTaskInfoByPrjIdAndConId(model.Project.PrjGuid.ToString(), ContractManage_IncometContract_IncometContractQuery.contractID, "", "", ""); this.gvBudget.DataSource = taskInfoByPrjIdAndConId; this.gvBudget.DataBind(); } }
private string GetIncometContractName(string contractID) { IncometContract incometContract = new IncometContract(); IncometContractModel model = incometContract.GetModel(contractID); if (model != null) { return(model.ContractName); } return(string.Empty); }
public void InitPage() { this.BindDdl(); if (base.Request.QueryString["id"] != null) { this.lblTitle.Text = "编辑收入合同结算"; IncometBalanceModel model = this.incometBalanceBll.GetModel(base.Request.QueryString["id"]); this.txtClearingNumber.Text = model.ClearingNumber; this.hdClearingNumber.Value = model.ClearingNumber; this.txtClearingPrice.Text = model.ClearingPrice.ToString(); this.txtClearingTime.Text = Common2.GetTime(model.ClearingTime.ToString()); this.txtClearingUser.Text = model.ClearingUser; this.txtInputDate.Text = Common2.GetTime(model.InputDate.ToString()); this.txtInputPerson.Text = model.InputPerson; this.txtRemark.Text = model.Remark; this.hdGuid.Value = model.ID; this.ddlBalanceMode.SelectedValue = model.BalanceMode; this.ddlPayMode.SelectedValue = model.PayMode; this.txtBalanceObj.Text = model.BalanceObject; List <ConBalanceItem> listByBalanceId = this.conBalItemSev.GetListByBalanceId(this.hdGuid.Value); this.SaveBanlanceItemToViewState(listByBalanceId); this.BindBalanceItem(); } else { this.lblTitle.Text = "新增收入合同结算"; this.txtInputDate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); this.txtInputPerson.Text = PageHelper.QueryUser(this, base.UserCode); this.hdGuid.Value = Guid.NewGuid().ToString(); this.BindBalanceItem(); } this.hfldContractId.Value = base.Request.QueryString["ContractID"]; IncometContractModel model2 = this.incometContractBll.GetModel(base.Request.QueryString["ContractID"]); this.txtContractCode.Text = model2.ContractCode; this.txtContractName.Text = model2.ContractName; this.txtContractPrice.Text = WebUtil.GetEnPrice(model2.ContractPrice.ToString(), model2.ContractID); this.txtSignedTime.Text = Common2.GetTime(model2.SignedTime.ToString()); this.txtSumClearing.Text = WebUtil.GetPaymentSum(model2.ContractID, "Con_Incomet_Balance", "ClearingPrice"); this.txtDiffAmount.Text = string.Concat(Convert.ToDecimal(this.txtContractPrice.Text) - Convert.ToDecimal(this.txtSumClearing.Text)); this.FileLink1.MID = 1906; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; IncometContractModel model3 = this.incometContractBll.GetModel(base.Request["ContractID"]); this.hfldPrjid.Value = model3.Project.PrjGuid.ToString(); this.initMeasureBindGV(); }
public void InitPage() { if (base.Request.QueryString["id"] != null) { this.lblTitle.Text = "编辑收入合同变更"; IncometModifyModel model = this.incometModifyBll.GetModel(base.Request.QueryString["id"]); this.txtChangeCode.Text = model.ChangeCode; this.hdChangeCode.Value = model.ChangeCode; this.txtChangePrice.Text = model.ChangePrice.ToString(); this.txtChangeReason.Text = model.ChangeReason; this.txtChangeTime.Text = Common2.GetTime(model.ChangeTime.ToString()); this.txtInputDate.Text = Common2.GetTime(model.InputDate.ToString()); this.txtInputPerson.Text = model.InputPerson; this.txtRemark.Text = model.Remark; this.txtTransactor.Text = model.Transactor; this.hdGuid.Value = model.ID; this.DataBindSheet(model.ID); } else { this.lblTitle.Text = "新增收入合同变更"; this.txtInputDate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); this.txtInputPerson.Text = PageHelper.QueryUser(this, base.UserCode); this.hdGuid.Value = Guid.NewGuid().ToString(); } IncometContractModel model2 = this.incometContractBll.GetModel(base.Request.QueryString["ContractID"]); this.txtContractCode.Text = model2.ContractCode; this.txtContractName.Text = model2.ContractName; this.txtContractPrice.Text = model2.ContractPrice.ToString(); this.txtEndPrice.Text = WebUtil.GetEnPrice(model2.ContractPrice.ToString(), model2.ContractID); this.txtSignedTime.Text = Common2.GetTime(model2.SignedTime.ToString()); if (model2.Project != null) { this.hfldPrjGuid.Value = model2.Project.PrjGuid.ToString(); } else { List <string> prjInfoZTBIncoment = this.prjInfoBll.GetPrjInfoZTBIncoment(base.Request.QueryString["ContractID"]); if (prjInfoZTBIncoment.Count > 0) { this.hfldPrjGuid.Value = prjInfoZTBIncoment[4].ToString(); } } this.FileLink1.MID = 1907; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; }
public void InitPage() { ContractPayendModel model = this.contractPayendBll.GetModel(base.Request.QueryString["pid"]); this.lblBWasPerson.Text = this.GetUserName(model.BWasPerson); this.lblInputDate.Text = model.InTime.ToString(); this.lblInputPerson.Text = model.InPerson; this.lblOtherExplain.Text = model.OtherExplain; this.lblProjectCondition.Text = model.ProjectCondition; this.lblProvisionMatter.Text = model.ProvisionMatter; this.hdGuid.Value = model.PayendID; IncometContractModel model2 = this.incometContractBll.GetModel(model.ContractID); this.lblContractCode.Text = model2.ContractCode; this.lblContractName.Text = model2.ContractName; this.lblContractPrice.Text = model2.ContractPrice.ToString(); this.lblSignedTime.Text = Common2.GetTime(model2.SignedTime.ToString()); this.hdContractId.Value = model2.ContractID; List <PayendFeedbackModel> listArray = this.payendFeedbackBll.GetListArray(string.Concat(new string[] { " where contractId='", model2.ContractID, "' and FeedbackPerson='", base.UserCode, "'" })); if (listArray.Count == 0) { this.lblTitle.Text = "新增收入合同交底反馈"; this.hdGuid.Value = Guid.NewGuid().ToString(); this.hdFeedbackState.Value = "1"; this.AddModel(); } else { this.hdFeedbackState.Value = "2"; this.lblTitle.Text = "修改收入合同交底反馈"; this.hdGuid.Value = listArray[0].ID; this.txtFeedback.Text = listArray[0].FeedbackOpinion; } this.FileLink1.MID = 1909; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; }
public static string GetContractName(string contractId) { IncometContractModel model = incometContractBll.GetModel(contractId); if (model == null) { return(""); } if (!(model.FCode == "0")) { return("<img src='/images/tree/i.gif' style='vertical-align:middle;' /><img src='/images/tree/l.gif' style='vertical-align:middle;' />" + model.ContractName); } if (incometContractBll.GetListArray(" where fcode='" + contractId + "'").Count > 0) { return("<img src='/images/tree/tminus.gif' style='vertical-align:middle;' />" + model.ContractName); } return("<img src='/images/tree/t.gif' style='vertical-align:middle;' />" + model.ContractName); }
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(); }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { this.lblBllProducer.Text = WebUtil.GetUserNames(this.Session["yhdm"].ToString()); this.lblPrintDate.Text = Common2.GetTime(DateTime.Now); IncometContractModel model = this.incometContractBll.GetModel(base.Request.QueryString["ContractID"]); if (model != null) { this.lblContractCode.Text = model.ContractCode; this.lblContractName.Text = model.ContractName; this.lblContractMoney.Text = WebUtil.GetEnPrice(model.ContractPrice.ToString(), model.ContractID); this.lblSignedDate.Text = Common2.GetTime(model.SignedTime.ToString()); this.lblPrjCode.Text = ((model.Project != null) ? model.Project.PrjCode : string.Empty); this.lblPrjName.Text = ((model.Project != null) ? model.Project.PrjName : string.Empty); this.lblPaymentSum.Text = WebUtil.GetPaymentSum(model.ContractID, "Con_Incomet_Payment", "CllectionPrice"); this.lbldiff.Text = string.Concat(Convert.ToDecimal(this.lblContractMoney.Text) - Convert.ToDecimal(this.lblPaymentSum.Text)); } IncometPaymentModel model2 = this.incometPaymentBll.GetModel(base.Request.QueryString["id"]); if (model2 != null) { this.lblPaymentCode.Text = model2.CllectionCode; this.lblPayMoney.Text = model2.CllectionPrice.ToString(); this.lblPayTime.Text = Common2.GetTime(model2.CllectionTime.ToString()); this.lblPaymentUser.Text = model2.CllectionUser; this.lblInputTime.Text = Common2.GetTime(model2.InputDate.ToString()); this.lblInputUser.Text = model2.InputPerson; this.lblnote.Text = model2.Remark; List <string> fundPlanByMonthPlanUID = this.incometPaymentBll.GetFundPlanByMonthPlanUID(model2.MonthPlanUID, false); if (fundPlanByMonthPlanUID.Count > 0) { this.lblPlanMonth.Text = fundPlanByMonthPlanUID[1].ToString(); this.lblPlanMoney.Text = fundPlanByMonthPlanUID[2].ToString(); this.lblFinshMoney.Text = fundPlanByMonthPlanUID[4].ToString(); this.lblAllowCollectMoney.Text = fundPlanByMonthPlanUID[5].ToString(); this.lblPlanote.Text = fundPlanByMonthPlanUID[6].ToString(); } } this.lblUpFiled.Text = FileView.FilesBind(1908, model2.ID); } }
public void InitPage() { if (base.Request.QueryString["id"] != null) { this.lblTitle.Text = "编辑收入合同交底"; ContractPayendModel model = this.contractPayendBll.GetModel(base.Request.QueryString["id"]); this.txtBWasPerson.Text = this.GetUserName(model.BWasPerson); this.hdBWasPerson.Value = model.BWasPerson; this.txtInputDate.Text = model.InTime.ToString(); this.txtInputPerson.Text = model.InPerson; this.txtOtherExplain.Text = model.OtherExplain; this.txtProjectCondition.Text = model.ProjectCondition; this.txtProvisionMatter.Text = model.ProvisionMatter; this.txtPayendTopics.Text = model.PayendTopics; this.hdGuid.Value = model.PayendID; this.hdModifyState.Value = model.ModifyState; IncometContractModel model2 = this.incometContractBll.GetModel(model.ContractID); this.txtContractCode.Text = model2.ContractCode; this.txtContractName.Text = model2.ContractName; this.txtContractPrice.Text = model2.ContractPrice.ToString(); this.txtSignedTime.Text = Common2.GetTime(model2.SignedTime.ToString()); this.hdContractId.Value = model2.ContractID; this.hdContractEditId.Value = model2.ContractID; } else { this.lblTitle.Text = "新增收入合同交底"; this.txtInputDate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); this.txtInputPerson.Text = PageHelper.QueryUser(this, base.UserCode); this.hdGuid.Value = Guid.NewGuid().ToString(); this.hdModifyState.Value = "1"; } if (base.Request.QueryString["t"] != null) { this.lblTitle.Text = "查看收入合同交底"; } this.FileLink1.MID = 1909; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; }
protected void InitPage() { IncometContractModel model = this.incometContractBll.GetModel(base.Request.QueryString["ContractID"]); if (model != null) { this.lblPrjCode.Text = model.Project.PrjCode; this.lblPrjName.Text = model.Project.PrjName; this.lblContractCode.Text = model.ContractCode; this.lblContractName.Text = model.ContractName; this.lblContractMoney.Text = WebUtil.GetEnPrice(model.ContractPrice.ToString(), model.ContractID); this.lblSignedDate.Text = Common2.GetTime(model.SignedTime.ToString()); this.lblPaymentSum.Text = WebUtil.GetPaymentSum(model.ContractID, "Con_Incomet_Payment", "CllectionPrice"); this.lblInvoiceSum.Text = WebUtil.GetPaymentSum(model.ContractID, "Con_Incomet_Invoice", "Amount"); this.lblBalance.Text = string.Concat(Convert.ToDecimal(this.lblPaymentSum.Text) - Convert.ToDecimal(this.lblInvoiceSum.Text)); } IncometInvoiceModel model2 = this.incometInvoiceBll.GetModel(base.Request.QueryString["id"]); if (model2 != null) { this.lblAmountMoney.Text = model2.Amount.ToString(); this.lblInputTime.Text = Common2.GetTime(model2.InputDate.ToString()); this.lblInputUser.Text = model2.InputPerson; this.lblInvoiceDate.Text = Common2.GetTime(model2.InvoiceDate.ToString()); this.lblNote.Text = model2.Notes; this.lblTransactor.Text = model2.Transactor; this.lblInvoiceNo.Text = model2.InvoiceNo; this.lblInvoiceCode.Text = model2.InvoiceCode; this.lblParty.Text = model2.Payer; this.lblSecond.Text = model2.Payee; this.lblInvoiceType.Text = this.GetInvoiceType(model2.InvoiceType); this.lblTaxNo.Text = model2.TaxNo; this.lblAddress.Text = model2.Contact; this.lblBankCode.Text = model2.BankCode; this.lblOrganizationCode.Text = model2.OrganizationCode; this.lblUpFiled.Text = FileView.FilesBind(1912, model2.InvoiceID); } }
public void InitPage() { this.lblTitle.Text = "查看收入合同交底"; ContractPayendModel model = this.contractPayendBll.GetModel(base.Request.QueryString["id"]); this.lblBWasPerson.Text = this.GetUserName(model.BWasPerson); this.lblInputDate.Text = Common2.GetTime(model.InTime.ToString()); this.lblInputPerson.Text = model.InPerson; this.txtOtherExplain.Text = model.OtherExplain; this.txtProjectCondition.Text = model.ProjectCondition; this.txtProvisionMatter.Text = model.ProvisionMatter; this.hdGuid.Value = model.PayendID; IncometContractModel model2 = this.incometContractBll.GetModel(model.ContractID); this.lblContractCode.Text = model2.ContractCode; this.lblContractName.Text = model2.ContractName; this.lblContractPrice.Text = model2.ContractPrice.ToString(); this.lblSignedTime.Text = Common2.GetTime(model2.SignedTime.ToString()); this.lblPayendTopics.Text = model.PayendTopics; this.FileLink1.MID = 1909; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; }
public void bind() { string value = this.hdfID.Value; IEPInfoModel model = this.infoBLL.GetModel(value); this.txtInfoCode.Text = model.infoNum; if (model.type == 0) { this.rdbTypeIn.Checked = true; this.rdbTypeOut.Checked = false; } else { if (model.type == 1) { this.rdbTypeOut.Checked = true; this.rdbTypeIn.Checked = false; } } IncometContractModel model2 = this.incometConBLL.GetModel(model.conId); if (model2 != null) { this.txtContract.Text = model2.ContractName; this.hfldContract.Value = model2.ContractID; } else { PayoutContractModel model3 = this.payoutCon.GetModel(model.conId); this.txtContract.Text = model3.ContractName; this.hfldContract.Value = model3.ContractID; } this.txtMoney.Text = model.Money.ToString(); this.txtData.Text = model.addDate.ToString(); this.txtUser.Text = this.yhmc.GetModelById(model.addPeople).v_xm; this.txtRemark.Text = model.remark; }
public int Add(IncometContractModel model) { return(this.incometContract.Add(model)); }
public int Update(IncometContractModel model) { return(this.incometContract.Update(model)); }
public void InitPage() { this.BindDdl(); string arg_1B_0 = base.Request.QueryString["view"]; if (base.Request.QueryString["id"] != null) { this.lblTitle.Text = "编辑收入合同结算"; IncometContractModel model = this.incometContractBll.GetModel(base.Request.QueryString["id"]); if (model != null) { this.txtCllectionCondition.Text = model.CllectionCondition; this.txtContractCode.Text = model.ContractCode; this.hdContractCode.Value = model.ContractCode; this.txtContractName.Text = model.ContractName; this.txtContractPrice.Text = model.ContractPrice.ToString(); this.txtEndDate.Text = Common2.GetTime(model.EndDate.ToString()); this.txtMainProvision.Text = model.MainProvision; if (model.Party != null) { this.txtParty.Value = model.Party.CorpName.ToString(); this.hdParty.Value = model.Party.CorpID.ToString(); } if (model.Project != null) { this.txtProject.Value = model.Project.PrjName; this.hdnProjectCode.Value = model.Project.PrjGuid.ToString(); } this.txtRegisterTime.Text = Common2.GetTime(model.RegisterTime.ToString()); this.txtRemark.Text = model.Remark; this.txtSecond.Text = model.Second; this.txtSignedAddress.Text = model.SignedAddress; this.txtSignedTime.Text = Common2.GetTime(model.SignedTime.ToString()); this.txtStartDate.Text = Common2.GetTime(model.StartDate.ToString()); this.txtReFundDate.Text = Common2.GetTime(model.ReFundDate.ToString()); this.txtSubscriber.Text = model.Subscriber; this.txtTypeName.Text = model.TypeID.TypeName; this.hfldTypeID.Value = model.TypeID.TypeID; this.hdGuid.Value = model.ContractID; this.hdFileTime.Value = Common2.GetTime(model.FileTime.ToString()); this.hdFCode.Value = model.FCode; this.hdIsArchived.Value = model.IsArchived.ToString(); this.hdisFContract.Value = model.isFContract.ToString(); this.hdUserCodes.Value = model.UserCodes; this.ddlBalanceMode.SelectedValue = model.BalanceMode; this.ddlPayMode.SelectedValue = model.PayMode; this.hfldSignPeople.Value = model.SignPepole; this.txtSignPeople.Value = WebUtil.GetUserNames(model.SignPepole); this.txtQualityPeriod.Value = model.QualityPeriod; this.txtCParty.Text = model.CParty; if (model.Sign.ToString() != "") { if (model.Sign == 0) { this.rdbNoSign.Checked = true; } else { if (model.Sign == 1) { this.rdbisSign.Checked = true; } } } if (model.Project != null) { System.Collections.Generic.List <string> prjInfoIncoment = this.prjInfoBll.GetPrjInfoIncoment(model.Project.PrjGuid.ToString()); if (prjInfoIncoment.Count > 0) { this.txtPrjFundInfo.Value = prjInfoIncoment[3].ToString(); this.txtPrjFundWorkable.Value = prjInfoIncoment[0].ToString(); this.txtQualityClass.Value = prjInfoIncoment[2].ToString(); this.txtForecastProfitRate.Value = prjInfoIncoment[1].ToString(); } this.txtPrjType.Value = this.GetPrjTypeName(model.Project.PrjGuid); } else { System.Collections.Generic.List <string> prjInfoZTBIncoment = this.prjInfoBll.GetPrjInfoZTBIncoment(base.Request.QueryString["id"]); if (prjInfoZTBIncoment.Count > 0) { this.txtPrjFundInfo.Value = prjInfoZTBIncoment[3].ToString(); this.txtPrjFundWorkable.Value = prjInfoZTBIncoment[0].ToString(); this.txtQualityClass.Value = prjInfoZTBIncoment[2].ToString(); this.txtForecastProfitRate.Value = prjInfoZTBIncoment[1].ToString(); this.txtProject.Value = prjInfoZTBIncoment[4].ToString(); this.hdnProjectCode.Value = prjInfoZTBIncoment[5].ToString(); } } if (this.hdisFContract.Value == "True") { this.lblTitle.Text = "编辑收入合同"; } else { this.lblTitle.Text = "编辑收入合同补充协议"; } } } else { this.txtRegisterTime.Text = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); this.txtSubscriber.Text = PageHelper.QueryUser(this, base.UserCode); DataTable table = Common2.GetTable("XPM_Basic_ContactCorp", " where corpTypeID=1"); if (table.Rows.Count > 0) { this.txtSecond.Text = table.Rows[0]["corpName"].ToString(); } this.hdGuid.Value = System.Guid.NewGuid().ToString(); this.hdFileTime.Value = Common2.GetTime(System.DateTime.Now.ToString()); if (base.Request.QueryString["b"] != null) { this.hdisFContract.Value = "false"; IncometContractModel model2 = this.incometContractBll.GetModel(base.Request.QueryString["b"]); if (model2.FCode != "0") { this.hdFCode.Value = model2.FCode; } else { this.hdFCode.Value = model2.ContractID; } this.txtProject.Value = model2.Project.PrjName; this.hdnProjectCode.Value = model2.Project.PrjGuid.ToString(); } else { this.lblTitle.Text = "收入合同登记"; this.hdFCode.Value = "0"; this.hdisFContract.Value = "true"; } this.hdIsArchived.Value = "false"; if (base.UserCode != "00000000") { this.hdUserCodes.Value = JsonHelper.Serialize(new string[] { base.UserCode, "00000000" }); } else { this.hdUserCodes.Value = JsonHelper.Serialize(new string[] { "00000000" }); } } this.FileLink1.MID = 1905; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; }
public IncometContractModel GetModel() { IncometContractModel incometContractModel = new IncometContractModel(); incometContractModel.Annex = ""; incometContractModel.BalanceMode = this.ddlBalanceMode.SelectedValue; incometContractModel.CllectionCondition = this.txtCllectionCondition.Text; incometContractModel.ContractCode = this.txtContractCode.Text; incometContractModel.ContractID = this.hdGuid.Value; incometContractModel.ContractName = this.txtContractName.Text; incometContractModel.ContractPrice = new decimal?(System.Convert.ToDecimal(this.txtContractPrice.Text)); incometContractModel.EndDate = new System.DateTime?(System.Convert.ToDateTime(this.txtEndDate.Text)); incometContractModel.FCode = this.hdFCode.Value; incometContractModel.FileTime = new System.DateTime?(System.Convert.ToDateTime(this.hdFileTime.Value)); incometContractModel.IsArchived = System.Convert.ToBoolean(this.hdIsArchived.Value); incometContractModel.isFContract = System.Convert.ToBoolean(this.hdisFContract.Value); incometContractModel.MainProvision = this.txtMainProvision.Text; incometContractModel.Party.CorpName = this.txtParty.Value; incometContractModel.Party.CorpID = System.Convert.ToInt32(this.hdParty.Value); incometContractModel.PayMode = this.ddlPayMode.SelectedValue; incometContractModel.Project.PrjGuid = new System.Guid(this.hdnProjectCode.Value); incometContractModel.RegisterTime = new System.DateTime?(System.Convert.ToDateTime(this.txtRegisterTime.Text)); incometContractModel.Remark = this.txtRemark.Text; incometContractModel.Second = this.txtSecond.Text; incometContractModel.SignedAddress = this.txtSignedAddress.Text; incometContractModel.SignedTime = new System.DateTime?(System.Convert.ToDateTime(this.txtSignedTime.Text)); incometContractModel.StartDate = new System.DateTime?(System.Convert.ToDateTime(this.txtStartDate.Text)); incometContractModel.Subscriber = this.txtSubscriber.Text; incometContractModel.TypeID.TypeID = this.hfldTypeID.Value; incometContractModel.TypeID.TypeName = this.txtTypeName.Text; if (string.IsNullOrEmpty(base.Request.QueryString["id"])) { string a = ConfigurationManager.AppSettings["ContractPower"].ToString(); if (a == "0") { this.hdUserCodes.Value = this.GetContractLimits(incometContractModel.TypeID.TypeID); } else { this.hdUserCodes.Value = this.GetContractLimitsByContractTypeAndPrj(incometContractModel.TypeID.TypeID, this.hdnProjectCode.Value); } } incometContractModel.UserCodes = this.hdUserCodes.Value; incometContractModel.QualityPeriod = this.txtQualityPeriod.Value; incometContractModel.CParty = this.txtCParty.Text.Trim(); if (!string.IsNullOrEmpty(this.txtReFundDate.Text.Trim())) { incometContractModel.ReFundDate = new System.DateTime?(System.Convert.ToDateTime(this.txtReFundDate.Text.Trim())); } else { incometContractModel.ReFundDate = null; } if (this.hfldSignPeople.Value.Trim() == "") { incometContractModel.SignPepole = null; } else { incometContractModel.SignPepole = this.hfldSignPeople.Value.Trim(); } if (this.rdbisSign.Checked) { incometContractModel.Sign = 1; } else { if (this.rdbNoSign.Checked) { incometContractModel.Sign = 0; } } return(incometContractModel); }
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 = "----"; } }
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.lblPrintDate.Text = System.DateTime.Now.ToShortDateString(); IncometContractModel model = this.incometContractBll.GetModel(ContractManage_IncometContract_IncometContractQuery.contractID); if (model != null) { if (model.Project != null) { this.txtProject.Text = model.Project.PrjName; } this.txtContractCode.Text = model.ContractCode; this.txtContractName.Text = model.ContractName; this.txtContractMoney.Text = ((!model.ContractPrice.HasValue) ? string.Empty : WebUtil.GetEnPrice(model.ContractPrice.ToString(), model.ContractID)); this.contractType.Text = model.TypeID.TypeName; this.txtSignPeople.Text = WebUtil.GetUserNames(model.SignPepole); this.txtQualityPeriod.Text = model.QualityPeriod; if (model.Party != null) { this.txtAName.Text = model.Party.CorpName; } this.txtBName.Text = model.Second; this.txtCParty.Text = model.CParty; this.txtAddress.Text = model.SignedAddress; this.txtSignDate.Text = ((!model.SignedTime.HasValue) ? string.Empty : System.Convert.ToDateTime(model.SignedTime).ToShortDateString()); this.txtConState.Text = WebUtil.GetConState(model.ConState.ToString()); 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.txtCllectionCondition.Text = model.CllectionCondition; this.txtMainItem.Text = model.MainProvision; this.txtNotes.Text = model.Remark; this.txtRefundDate.Text = Common2.GetTime(model.ReFundDate.ToString()); if (model.Project != null) { System.Collections.Generic.List <string> prjInfoIncoment = this.prjInfoBll.GetPrjInfoIncoment(model.Project.PrjGuid.ToString()); if (prjInfoIncoment.Count > 0) { this.lblPrjFundInfo.Text = prjInfoIncoment[3].ToString(); this.lblPrjFundWorkable.Text = prjInfoIncoment[0].ToString(); this.lblQualityClass.Text = prjInfoIncoment[2].ToString(); this.lblForecastProfitRate.Text = prjInfoIncoment[1].ToString(); } this.lblPrjType.Text = this.GetPrjTypeName(model.Project.PrjGuid); } else { System.Collections.Generic.List <string> prjInfoZTBIncoment = this.prjInfoBll.GetPrjInfoZTBIncoment(ContractManage_IncometContract_IncometContractQuery.contractID); if (prjInfoZTBIncoment.Count > 0) { this.lblPrjFundInfo.Text = prjInfoZTBIncoment[3].ToString(); this.lblPrjFundWorkable.Text = prjInfoZTBIncoment[0].ToString(); this.lblQualityClass.Text = prjInfoZTBIncoment[2].ToString(); this.lblForecastProfitRate.Text = prjInfoZTBIncoment[1].ToString(); this.txtProject.Text = prjInfoZTBIncoment[4].ToString(); } } this.ltlAnnex.Text = FileView.FilesBind(1905, model.ContractID); } }
public void InitPage() { if (base.Request.QueryString["id"] != null) { this.lblTitle.Text = "编辑收入合同收款"; IncometPaymentModel model = this.incometPaymentBll.GetModel(base.Request.QueryString["id"]); this.txtCllectionCode.Text = model.CllectionCode; this.hdCode.Value = model.CllectionCode; this.txtCllectionPrice.Text = model.CllectionPrice.ToString(); this.txtCllectionTime.Text = Common2.GetTime(model.CllectionTime.ToString()); this.txtCllectionUser.Text = model.CllectionUser; this.txtInputDate.Text = Common2.GetTime(model.InputDate.ToString()); this.txtInputPerson.Text = model.InputPerson; this.txtRemark.Text = model.Remark; this.hdGuid.Value = model.ID; this.hlfdFundPlanUID.Value = model.MonthPlanUID; if (this.hldfIsExamineApprove.Value == "0") { List <string> fundPlanByMonthPlanUID = this.incometPaymentBll.GetFundPlanByMonthPlanUID(this.hlfdFundPlanUID.Value.Trim(), false); if (fundPlanByMonthPlanUID.Count > 0) { this.txtMonthDate.Value = fundPlanByMonthPlanUID[1].ToString(); this.txtPlanMoney.Value = fundPlanByMonthPlanUID[2].ToString(); this.txtCollectedMoney.Value = fundPlanByMonthPlanUID[4].ToString(); this.lblAllowCollectMoney.Value = fundPlanByMonthPlanUID[5].ToString(); this.txtFundPlanRemark.Value = fundPlanByMonthPlanUID[6].ToString(); } } } else { this.lblTitle.Text = "新增收入合同收款"; this.txtInputDate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); this.txtInputPerson.Text = PageHelper.QueryUser(this, base.UserCode); this.hdGuid.Value = Guid.NewGuid().ToString(); if (this.hldfIsExamineApprove.Value == "0") { this.hlfdFundPlanUID.Value = this.incometPaymentBll.GetCurrentMonthUID(this.contractId, false); List <string> fundPlanByMonthPlanUID2 = this.incometPaymentBll.GetFundPlanByMonthPlanUID(this.hlfdFundPlanUID.Value.Trim(), false); if (fundPlanByMonthPlanUID2.Count > 0) { this.txtMonthDate.Value = fundPlanByMonthPlanUID2[1].ToString(); this.txtPlanMoney.Value = fundPlanByMonthPlanUID2[2].ToString(); this.txtCollectedMoney.Value = fundPlanByMonthPlanUID2[4].ToString(); this.lblAllowCollectMoney.Value = fundPlanByMonthPlanUID2[5].ToString(); this.txtFundPlanRemark.Value = fundPlanByMonthPlanUID2[6].ToString(); } } } IncometContractModel model2 = this.incometContractBll.GetModel(base.Request.QueryString["ContractID"]); this.txtContractCode.Text = model2.ContractCode; this.txtContractName.Text = model2.ContractName; this.txtContractPrice.Text = WebUtil.GetEnPrice(model2.ContractPrice.ToString(), model2.ContractID); this.txtSignedTime.Text = Common2.GetTime(model2.SignedTime.ToString()); this.txtPrjCode.Text = ((model2.Project != null) ? model2.Project.PrjCode : string.Empty); this.txtPrjName.Text = ((model2.Project != null) ? model2.Project.PrjName : string.Empty); this.txtSumCllection.Text = WebUtil.GetPaymentSum(model2.ContractID, "Con_Incomet_Payment", "CllectionPrice"); this.txtDiffAmount.Text = string.Concat(Convert.ToDecimal(this.txtContractPrice.Text) - Convert.ToDecimal(this.txtSumCllection.Text)); this.FileLink1.MID = 1908; this.FileLink1.FID = this.hdGuid.Value; this.FileLink1.Type = 1; this.hldfContractId.Value = model2.ContractID; }