Пример #1
0
        protected void btnOk_Click(object sender, EventArgs e)
        {
            int credId = MyConvert.GetInt32(this.hidCredId.Value);
            CreditInfo credInfo = new CreditInfoManager().GetCreditInfoById(credId);
            if (credInfo == 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 = credInfo.DepartId;
            info.UserId = (int)userinfo.userid;
            info.UserName = userinfo.LoginName;
            info.User2Name = new Business.UserInfo().GetUserNameByID(credInfo.DepartId);
            int result = manage.InsertEvaluation(info);
            if (result > 0)
            {
                new CreditInfoManager().UpdateEvaluationByCredId(credId, true);
                GotoMsgBoxPageForDynamicPage("评价成功!", 1, "Index.aspx");
            }
            else
            {
                GotoMsgBoxPageForDynamicPage("评价失败!", 1, "Index.aspx");
            }
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int credId = XYECOM.Core.XYRequest.GetQueryInt("Id", 0);
         if (credId <= 0)
         {
             GotoMsgBoxPageForDynamicPage("请选择要评价的债权信息!", 1, "Index.aspx");
         }
         CreditInfo info = new CreditInfoManager().GetCreditInfoById(credId);
         if (info == null)
         {
             GotoMsgBoxPageForDynamicPage("该债权信息已经评价过,不能重复评价!", 1, "Index.aspx");
         }
         this.hidCredId.Value = credId.ToString();
     }
 }
Пример #3
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;
                }
            }
        }
Пример #4
0
 /// <summary>
 /// 服务商确认案件完成
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void lbtnCreditConfirm_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = (LinkButton)(sender as LinkButton);
     if (linkButton != null)
     {
         int Id = XYECOM.Core.MyConvert.GetInt32(linkButton.CommandArgument);
         if (Id > 0)
         {
             CreditInfoManager credManage = new CreditInfoManager();
             int result = credManage.UpdateApprovaStatusByID(Id, XYECOM.Model.CreditState.CreditConfirm);
             if (result > 0)
             {
                 BindData();
             }
         }
     }
 }
Пример #5
0
        protected void rptList_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                HiddenField hidInfoId = (HiddenField)e.Item.FindControl("hidCreditInfoId");//当前案件编号
                if (hidInfoId == null) return;
                int creditId = MyConvert.GetInt32(hidInfoId.Value);
                CreditInfo info = new CreditInfoManager().GetCreditInfoById(creditId);

                int stateId = info.ApprovaStatus;
                LinkButton lbtnOk = (LinkButton)e.Item.FindControl("lbtnConfirm");//选择服务商
                System.Web.UI.WebControls.Label labelMessage = (System.Web.UI.WebControls.Label)e.Item.FindControl("labTenderMessage");
                System.Web.UI.WebControls.Label labelTender = (System.Web.UI.WebControls.Label)e.Item.FindControl("labToTender");
                XYECOM.Model.GeneralUserInfo userInfo = Business.CheckUser.UserInfo;    //判断当前登录帐号信息

                Model.CreditState sta = (Model.CreditState)stateId;
                if (sta == Model.CreditState.Tender)
                {
                    if (userInfo != null && info.DepartId == userInfo.userid)
                    {
                        lbtnOk.Visible = true;
                        labelTender.Visible = false;
                    }
                    else
                    {
                        labelTender.Visible = true;
                        lbtnOk.Visible = false;
                    }
                    labelMessage.Visible = false;
                }
                else if (sta != Model.CreditState.Tender)
                {
                    lbtnOk.Visible = false;
                    labelMessage.Visible = true;
                    labelTender.Visible = false;
                }
            }
        }