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 setData(string userCode) { DataTable dataTable = PersonnelAction.QueryPersonnelById(userCode); if (dataTable.Rows.Count == 1) { this.LbName.Text = dataTable.Rows[0]["v_xm"].ToString(); this.LbDeptName.Text = PersonnelAction.getDeptName(Convert.ToInt32(dataTable.Rows[0]["i_bmdm"].ToString())); if (dataTable.Rows[0]["Sex"].ToString() == "1") { this.LbSex.Text = "男"; } else { if (dataTable.Rows[0]["Sex"].ToString() == "2") { this.LbSex.Text = "女"; } } this.LbNation.Text = dataTable.Rows[0]["Nation"].ToString(); this.LbMobilePhoneCode.Text = dataTable.Rows[0]["MobilePhoneCode"].ToString(); if (dataTable.Rows[0]["Birthday"].ToString() != "") { this.LbBirthday.Text = Convert.ToDateTime(dataTable.Rows[0]["Birthday"]).ToString("yyyy-MM-dd"); } this.LbIDCard.Text = dataTable.Rows[0]["IDCard"].ToString(); this.LbPostAndCompetency.Text = dataTable.Rows[0]["PostAndCompetency"].ToString(); if (dataTable.Rows[0]["UserPhoto"].ToString() != "") { this.Image1.ImageUrl = "~" + dataTable.Rows[0]["UserPhoto"].ToString(); this.Image1.AlternateText = dataTable.Rows[0]["v_xm"].ToString() + "照片"; } } }
private void InitContractInfo(string conId) { PayoutContract payoutContract = new PayoutContract(); PayoutContractModel model = payoutContract.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(); } decimal balancedAmount = new PayoutBalance().GetBalancedAmount(conId, false); this.lblBalancedSum.Text = balancedAmount.ToString("0.000"); bool containPending = this.payoutPayment.GetModel(this.ViewState["PaymentId"].ToString()).ContainPending; decimal paySum = this.payoutPayment.GetPaySum(this.contractId, containPending); this.lblPaySum.Text = paySum.ToString("0.000"); decimal num = balancedAmount - paySum; this.lblDiff.Text = num.ToString("0.000"); this.lblContractMoney.Text = model.ModifiedMoney.ToString(); this.lblSignedDate.Text = model.SignDate.Value.ToShortDateString(); }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { if (!string.IsNullOrEmpty(base.Request["planType"])) { string a = base.Request["planType"].ToString(); if (a == "0") { this.ShowAudit1.BusiCode = "130"; } else { this.ShowAudit1.BusiCode = "131"; } } DataTable dataTable = PersonnelAction.QueryPersonnelById(base.UserCode); if (dataTable != null && dataTable.Rows.Count == 1) { this.lblBllProducer.Text = dataTable.Rows[0]["v_xm"].ToString(); } this.lblPrintDate.Text = DateTime.Now.ToShortDateString(); if (base.Request.QueryString["type"] == "0") { PTDbsjBll pTDbsjBll = new PTDbsjBll(); PTDbsjModel modelByGID = pTDbsjBll.GetModelByGID(this.wkpid); pTDbsjBll.Delete(modelByGID.I_DBSJ_ID); } MainPlan model = new MainPlanAndAction().GetModel(new Guid(this.wkpid)); this.lblCode.Text = model.WkpUserCode; this.lblDate.Text = model.WkpRecordDate.ToShortDateString(); this.lblPart.Text = new MainPlanAndAction().BackDept(model.WkpDeptId); this.lblReportName.Text = new MainPlanAndAction().BackUserName(model.WkpReportUser); string sqlString = "select * from pm_workplan_plansummary where wkpid='" + new Guid(this.wkpid) + "'"; DataTable dataTable2 = publicDbOpClass.DataTableQuary(sqlString); if (dataTable2.Rows.Count > 0) { this.lblPlanSumm.Text = dataTable2.Rows[0]["wkpremarks"].ToString(); this.lblScore.Text = dataTable2.Rows[0]["wkpselfscore"].ToString(); this.lblSumm.Text = dataTable2.Rows[0]["wkpsummary"].ToString(); } else { this.lblPlanSumm.Text = ""; this.lblScore.Text = ""; this.lblSumm.Text = ""; } this.dl_Bind(); } }
private void InitContractInfo(string conId) { PayoutContract payoutContract = new PayoutContract(); PayoutContractModel model = payoutContract.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(); } this.lblContractMoney.Text = model.ModifiedMoney.ToString(); this.lblSignedDate.Text = model.SignDate.Value.ToShortDateString(); }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { this.TemGID = Guid.NewGuid().ToString(); string text = this.Session["yhdm"].ToString(); DataTable dataTable = PersonnelAction.QueryPersonnelById(text); if (dataTable != null && dataTable.Rows.Count == 1) { this.Session["HumanName"] = dataTable.Rows[0]["v_xm"].ToString(); } this.Session["HumanCode"] = text; if (this._Action == "edit") { this.FileLink1.Type = 1; this.FileLink1.FID = this._Ic; this.ToInitialize(); return; } if (this._Action == "add") { this.FileLink1.Type = 2; this.FileLink1.FID = this.TemGID.ToString(); if (this._PrjCode != "" && this._PrjCode.Length == 36) { PMModel pMModel = new PMModel(); pMModel = PMAction.GetSingleInfoByPrjGuid(this._PrjCode); if (pMModel != null) { this.txtaccountNum.Value = pMModel.PrjCode; this.txtacountName.Value = pMModel.PrjName; return; } } } else { this.FileLink1.Type = 0; this.FileLink1.FID = this._Ic; this.ToInitialize(); this.initSate(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { this.gvBudget.PageSize = NBasePage.pagesize; string text = this.Session["yhdm"].ToString(); DataTable dataTable = PersonnelAction.QueryPersonnelById(text); if (dataTable != null && dataTable.Rows.Count == 1) { this.Session["HumanName"] = dataTable.Rows[0]["v_xm"].ToString(); } this.Session["HumanCode"] = text; if (base.Request["plantype"] != null) { this.plantype = base.Request["plantype"].ToString(); this.hfplantype.Value = this.plantype; } this.BindGv(); this.hfldAdjunctPath.Value = ConfigHelper.Get("PrjAccount"); } }
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); } }
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 = "----"; } }