public void BindData(int id) { CreditInfo info = manage.GetCreditInfoById(id); if (info == null) { GotoMsgBoxPageForDynamicPage("该债权信息不存在!", 1, "CreditInfoList.aspx"); } if (null != info) { this.labAge.Text = info.Age.ToString(); this.labCreateDate.Text = info.CreateDate.ToString("yyyy-MM-dd"); this.labTitle.Text = info.Title; this.labArrears.Text = info.Arrears.ToString(); this.labBounty.Text = info.Bounty.ToString(); this.labCollectionPeriod.Text = info.CollectionPeriod; this.labDebtObligation.Text = info.DebtObligation; this.labDebtorName.Text = info.DebtorName; this.labDebtorReason.Text = info.DebtorReason; this.labDebtorTelpone.Text = info.DebtorTelpone; this.labIntroduction.Text = info.Introduction; this.labState.Text = GetApprovaStatus(info.ApprovaStatus); this.labIsConfirm.Text = info.IsConfirm ? "确认" : "不确认"; this.labIsInLitigation.Text = info.IsInLitigation ? "是" : "否"; this.labIsLitigationed.Text = info.IsLitigationed ? "是" : "否"; this.labIsSelfCollection.Text = info.IsSelfCollection ? "是" : "否"; this.labDebtorType.Text = info.DebtorType; this.litTitle.Text = info.Title; } StringBuilder strWhere = new StringBuilder(" 1=1 and CreditInfoId = " + id); int totalRecord = 0; DataTable dt = XYECOM.Business.Utils.GetPaginationData("TenderInfo", "TenderId", "*", " TenderDate desc", strWhere.ToString(), this.Page1.PageSize, this.Page1.CurPage, out totalRecord); this.Page1.RecTotal = totalRecord; if (dt.Rows.Count > 0) { this.rptList.DataSource = dt; this.rptList.DataBind(); } else { this.lblMessage.Text = "还没有人进行投标"; this.rptList.DataBind(); } DataTable price = XYECOM.Business.Attachment.GetAllImgHref(AttachmentItem.CreditInfo, info.CreditId); if (price.Rows.Count > 0) { this.rpPrice.DataSource = price; this.rpPrice.DataBind(); } DataTable ralaCases = new RelatedCaseInfoManager().GetFilePaths(info.CreditId, Model.TableInfoType.ZqInfo); if (ralaCases.Rows.Count > 0) { this.rpfile.DataSource = ralaCases; this.rpfile.DataBind(); } }
protected void btnOk_Click(object sender, EventArgs e) { string goUrl = string.Empty; CreditInfo info = new CreditInfo(); info.Title = this.txtTitle.Text.Trim(); info.Age = this.txtAge.Text.Trim(); string radSelect = this.radSelect.SelectedValue; if (radSelect == "草稿") { goUrl = "DraftCreditList.aspx"; info.ApprovaStatus = (int)CreditState.Draft; } else { goUrl = "CreditInfoList.aspx"; info.ApprovaStatus = (int)CreditState.Null; } info.AreaId = MyConvert.GetInt32(this.areaid.Value); info.Arrears = MyConvert.GetDecimal(this.txtArrears.Text.Trim()); info.Bounty = MyConvert.GetDecimal(this.txtBounty.Text.Trim()); info.CollectionPeriod = this.txtCollectionPeriod.Text.Trim(); info.CreateDate = DateTime.Now; string debtObligation = string.Empty; for (int i = 0; i < this.cheDebtObligation.Items.Count; i++) { if (this.cheDebtObligation.Items[i].Selected == true) { debtObligation += this.cheDebtObligation.Items[i].Value + ","; } } if (debtObligation.Length > 0) { info.DebtObligation = debtObligation.Substring(0, debtObligation.Length - 1); } else { info.DebtObligation = ""; } info.DebtorName = this.txtDebtorName.Text.Trim(); info.DebtorReason = this.txtDebtorReason.Text.Trim(); info.DebtorTelpone = this.txtDebtorTelpone.Text.Trim(); info.DebtorType = this.rdDebtorType.SelectedValue; info.DepartId = MyConvert.GetInt32(userinfo.userid.ToString()); info.Introduction = this.txtIntroduction.Text.Trim(); info.IsConfirm = this.radIsConfirm.SelectedValue == "1" ? true : false; info.IsInLitigation = this.radIsInLitigation.SelectedValue == "1" ? true : false; info.IsLitigationed = this.radIsLitigationed.SelectedValue == "1" ? true : false; info.IsSelfCollection = this.radIsSelfCollection.SelectedValue == "1" ? true : false; info.LicenseType = this.rdLicenseType.SelectedValue; info.Remark = this.txtRemark.Text.Trim(); info.IsDraft = false; info.UserId = MyConvert.GetInt32(userinfo.CompanyId.ToString()); int credId = 0; int result = credManage.InsertCreditInfo(info, out credId); string caseType = Request.Form["case"]; if (caseType == "1") { //添加选择的档案信息 RelatedCaseInfoManager relateManage = new RelatedCaseInfoManager(); string strCase = this.hdgetid.Value; string[] cases = strCase.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); relateManage.RelatedInfo(TableInfoType.ZqInfo, credId, userinfo.userid, userinfo.CompanyId, cases); } if (caseType == "0") { Business.CaseManager caseManager = new Business.CaseManager(); string filePath = CaseUploadManager.UpLoadFile(userinfo.CompanyId, userinfo.userid, 0); CaseInfo caseInfo = new CaseInfo(); caseInfo.CaseName = info.Title; caseInfo.CaseTypeId = 0; caseInfo.CaseTypeName = "默认分类"; caseInfo.CompanyId = userinfo.CompanyId; caseInfo.CompanyName = userinfo.CompanyName; caseInfo.CreateDate = DateTime.Now; caseInfo.Description = info.Introduction; caseInfo.FilePath = filePath; caseInfo.PartId = userinfo.userid; caseInfo.PartName = userinfo.LayerName; int infoId = 0; caseManager.Insert(caseInfo, out infoId); RelatedCaseInfoManager relateManage = new RelatedCaseInfoManager(); relateManage.RelatedInfo(TableInfoType.ZqInfo, credId, userinfo.userid, userinfo.CompanyId, infoId); } if (result > 0) { this.udCreditInfo.InfoID = credId; this.udCreditInfo.Update(); GotoMsgBoxPageForDynamicPage("添加债权信息成功!", 1, goUrl); } else { GotoMsgBoxPageForDynamicPage("添加债权信息失败!", 1, goUrl); } }
public void BindData(int id) { CreditInfo info = manage.GetCreditInfoById(id); if (info == null) { GotoMsgBoxPageForDynamicPage("该债权信息不存在!", 1, "IndexCreditList.aspx"); } if (null != info) { this.labAge.Text = info.Age.ToString(); this.labAreaId.Text = new Area().GetItem(info.AreaId).FullNameAll; this.labCreateDate.Text = info.CreateDate.ToString("yyyy-MM-dd"); this.labCompanyName.Text = userInfoManage.GetCompNameByUId(info.UserId); this.labUserName.Text = userInfoManage.GetUserNameByID(info.DepartId); this.labTitle.Text = info.Title; this.labArrears.Text = info.Arrears.ToString(); this.labBounty.Text = info.Bounty.ToString(); this.labCollectionPeriod.Text = info.CollectionPeriod; this.labDebtObligation.Text = info.DebtObligation; XYECOM.Model.GeneralUserInfo userInfo = Business.CheckUser.UserInfo; TenderInfo tenderInfo = new TenderInfoManager().GetTenderByCredId(info.CreditId); if ((tenderInfo != null && userInfo.userid == tenderInfo.LayerId) || userInfo.userid == info.DepartId) { this.labDebtorTelpone.Text = info.DebtorTelpone; this.labDebtorName.Text = info.DebtorName; DataTable price = XYECOM.Business.Attachment.GetAllImgHref(AttachmentItem.CreditInfo, info.CreditId); if (price.Rows.Count > 0) { this.rpPrice.DataSource = price; this.rpPrice.DataBind(); } DataTable ralaCases = new RelatedCaseInfoManager().GetFilePaths(info.CreditId, Model.TableInfoType.ZqInfo); if (ralaCases.Rows.Count > 0) { this.rpfile.DataSource = ralaCases; this.rpfile.DataBind(); } } else { if (!string.IsNullOrEmpty(info.DebtorName) && info.DebtorName.Length > 1) { this.labDebtorName.Text = info.DebtorName.Substring(0, 1) + "**"; } else { this.labDebtorName.Text = info.DebtorName; } if (!string.IsNullOrEmpty(info.DebtorTelpone) && info.DebtorTelpone.Length > 1) { this.labDebtorTelpone.Text = info.DebtorTelpone.Substring(0, 6) + "**"; } else { this.labDebtorTelpone.Text = info.DebtorTelpone; } } this.labDebtorReason.Text = info.DebtorReason; this.labIntroduction.Text = info.Introduction; this.labState.Text = GetApprovaStatus(info.ApprovaStatus); this.labIsConfirm.Text = info.IsConfirm ? "确认" : "不确认"; this.labIsInLitigation.Text = info.IsInLitigation ? "是" : "否"; this.labIsLitigationed.Text = info.IsLitigationed ? "是" : "否"; this.labIsSelfCollection.Text = info.IsSelfCollection ? "是" : "否"; this.hidStae.Value = info.ApprovaStatus.ToString(); this.aShow.HRef = "showEvaluation.aspx?UserId=" + info.DepartId; this.litTitle.Text = info.Title; } StringBuilder strWhere = new StringBuilder(" 1=1 and CreditInfoId = " + id); int totalRecord = 0; DataTable dt = XYECOM.Business.Utils.GetPaginationData("TenderInfo", "TenderId", "*", " TenderDate desc", strWhere.ToString(), this.Page1.PageSize, this.Page1.CurPage, out totalRecord); this.Page1.RecTotal = totalRecord; if (dt.Rows.Count > 0) { this.rptList.DataSource = dt; this.rptList.DataBind(); } else { this.lblMessage.Text = "还没有人进行投标"; this.rptList.DataBind(); } }