Example #1
0
        public ActionResult verdict(string pctype, Verdict model)
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(Redirect("/home"));
            }
            string username = HttpContext.User.Identity.Name;

            //pctype 1为必须赔偿 2为互不赔偿
            model.styleOfpay = pctype;
            VerdictInfo dbverdict = new VerdictInfo();
            int         result    = dbverdict.AddVerdict(username, model);

            if (result == 1)
            {
                return(Redirect("/home/article?id=" + model.caseid));
            }
            else
            {
                return(Redirect("/home"));
            }
        }
Example #2
0
        /// <summary>
        /// 案件详细信息
        /// </summary>
        /// <returns></returns>
        public ActionResult article(int?id)
        {
            int caseid = id ?? 0;

            if (caseid <= 0)
            {
                return(Redirect("/home/index"));
            }
            else
            {
                if (User.Identity.IsAuthenticated)
                {
                    VerdictInfo dbverdict = new VerdictInfo();
                    var         temp      = dbverdict.GetVerdivt(HttpContext.User.Identity.Name, caseid);
                    var         temp2     = temp.Count();
                    ViewBag.verdict = temp.FirstOrDefault();
                }
                CaseInfo dbcase   = new CaseInfo();
                var      caseitem = dbcase.PublicCase(caseid);
                return(View(caseitem));
            }
        }
Example #3
0
        public bool AddInvolve(WxPostInvolveViewModel model)
        {
            VerdictInfo dbverdict = new VerdictInfo();
            string      userid    = model.userid;
            string      username  = UserInfo.Current.GetUserById(userid).UserName;
            //1是单点赋值 2是三点赋值 输入金额为0是满意度为10(元金额赔偿满意度为doublepay)
            //stylepay 1是必须赔偿 2是互不赔偿
            string stylepay = "2";

            if (model.modepay == 2)
            {
                stylepay = "1";
            }
            if (model.modepay == 1)
            {
                stylepay = "2";
            }
            Verdict verdict = new Verdict
            {
                caseid      = model.caseid,
                doublepay   = model.doublePay.ToString(),
                moneySure   = model.mostSatisfied.ToString(),
                nopay       = model.nonSatisfied.ToString(),
                OriginalPay = model.orginalpay.ToString(),
                OtherNum1   = model.otherSatisfied1.ToString(),
                OtherNum2   = model.otherSatisfied2.ToString(),
                OtherNum3   = model.otherSatisfied3.ToString(),
                reason      = model.assignmentExplain,
                styleOfpay  = stylepay,
            };
            var result = dbverdict.AddVerdict(username, verdict);

            if (result == 1)
            {
                return(true);
            }
            return(false);
        }