Пример #1
0
        protected void btnOk_Click(object sender, EventArgs e)
        {
            int credId = MyConvert.GetInt32(this.hidCredId.Value);
            TenderInfo tenderInfo = new TenderInfoManager().GetTenderByCredId(credId);
            if (tenderInfo == null)
            {
                GotoMsgBoxPageForDynamicPage("请选择要评价的债权信息!", 1, "Index.aspx");
            }

            XYECOM.Model.AMS.Evaluation info = new Evaluation();
            info.CreditInfoId = credId;
            info.Description = this.txtDescription.Text.Trim();
            info.EvaluationResult = MyConvert.GetInt32(this.radEvaluationType.SelectedValue);
            info.User2Id = tenderInfo.LayerId;
            info.UserId = (int)userinfo.userid;
            info.UserName = userinfo.LoginName;
            info.User2Name = userInfoManage.GetUserNameByID(tenderInfo.LayerId);
            int result = manage.InsertEvaluation(info);
            if (result > 0)
            {
                new CreditInfoManager().UpdateEvaluationByCredId(credId, false);
                GotoMsgBoxPageForDynamicPage("评价成功!", 1, "Index.aspx");
            }
            else
            {
                GotoMsgBoxPageForDynamicPage("评价失败!", 1, "Index.aspx");
            }
        }
Пример #2
0
        protected void rptList_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                HiddenField hidTenderId = (HiddenField)e.Item.FindControl("hidTenderId");//当前投标编号
                if (hidTenderId == null) return;
                int tenderId = MyConvert.GetInt32(hidTenderId.Value);
                TenderInfo tenderInfo = new TenderInfoManager().GetTenderInfoByID(tenderId);
                if (tenderInfo == null)
                {
                    return;
                }

                if (tenderInfo.IsSuccess != (int)TenderState.Success)
                {
                    return;
                }

                HiddenField hidCreditId = (HiddenField)e.Item.FindControl("hidCreditInfoId");//当前案件编号
                if (hidCreditId == null) return;
                int creditId = MyConvert.GetInt32(hidCreditId.Value);
                CreditInfo info = new CreditInfoManager().GetCreditInfoById(creditId);

                int stateId = info.ApprovaStatus;
                HyperLink hlEvaluate = (HyperLink)e.Item.FindControl("hlEvaluate");//评价

                LinkButton lbtnCreditConfirm = (LinkButton)e.Item.FindControl("lbtnCreditConfirm");//服务商确认案件完成

                Model.CreditState sta = (Model.CreditState)stateId;
                if (sta == Model.CreditState.CreditEnd && !info.IsServerEvaluation)
                {
                    hlEvaluate.Visible = true;
                }
                else
                {
                    hlEvaluate.Visible = false;
                }
                if (sta == Model.CreditState.InProgress)
                {
                    lbtnCreditConfirm.Visible = true;
                }
                else
                {
                    lbtnCreditConfirm.Visible = false;
                }
            }
        }
Пример #3
0
        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();
            }
        }
Пример #4
0
 protected void btnTender_Click(object sender, EventArgs e)
 {
     int state = MyConvert.GetInt32(this.hidStae.Value);
     XYECOM.Model.CreditState cState = (XYECOM.Model.CreditState)state;
     if (cState != XYECOM.Model.CreditState.Tender)
     {
         GotoMsgBoxPageForDynamicPage("该债权信息不能进行投标!", 1, "IndexCreditList.aspx");
     }
     XYECOM.Model.GeneralUserInfo userInfo = Business.CheckUser.UserInfo;
     if (userInfo == null)
     {
         GotoMsgBoxPageForDynamicPage("请登录后进行投标!", 1, "IndexCreditList.aspx");
     }
     if (userInfo.UserType != XYECOM.Model.UserType.Layer && userInfo.UserType != XYECOM.Model.UserType.NotLayer)
     {
         GotoMsgBoxPageForDynamicPage("债权帐号不能进行投标!", 1, "IndexCreditList.aspx");
     }
     int credId = MyConvert.GetInt32(this.hidID.Value);
     //检查该服务商是否已经投标
     bool isCheckTender = tenderManage.CheckTenderByCredID(credId, (int)userInfo.userid);
     if (isCheckTender)
     {
         GotoMsgBoxPageForDynamicPage("不能重复投标,请耐心等待债权人选择!", 1, "IndexCreditList.aspx");
     }
     TenderInfo info = new TenderInfo();
     info.CreditInfoId = credId;
     info.IsSuccess = (int)TenderState.Tender;
     info.LayerId = (int)userInfo.userid;
     info.Message = this.txtRemark.Text.Trim();
     info.TenderDate = DateTime.Now;
     int result = new TenderInfoManager().InsertTenderInfo(info);
     if (result > 0)
     {
         GotoMsgBoxPageForDynamicPage("投标成功!", 1, "CreditInfoDetail.aspx?Id=" + credId);
     }
     else
     {
         GotoMsgBoxPageForDynamicPage("投标失败!", 1, "CreditInfoDetail.aspx?Id=" + credId);
     }
 }