/// <summary>
        /// 验证码
        /// </summary>
        /// <param name="context"></param>
        public void VerifyCode(HttpContext context)
        {
            string     word = null;
            VerifyCode v    = new VerifyCode();
            var        font = v.GetDefaultFont();

            try
            {
                font          = new System.Drawing.Font(font.FontFamily, 16);
                v.AllowRepeat = false;
                context.Response.BinaryWrite(v.GraphicDrawImage(4,
                                                                VerifyWordOptions.Number,
                                                                !true,
                                                                font,
                                                                30,
                                                                out word));
            }
            catch
            {
                if (font != null)
                {
                    font.Dispose();
                }
            }
            context.Response.ContentType = "Image/Jpeg";
            VerifyCodeManager.AddWord(word);
        }
        public string Partner_VerifyCase_post(HttpContext context)
        {
            string cashNo      = context.Request["s_cashNo"];
            string partnerCode = context.Request["s_partnerCode"];
            string verifyCode  = context.Request["verifyCode"];

            if (!VerifyCodeManager.Compare(verifyCode))
            {
                return(JsonConvert.SerializeObject(new { result = false, message = "验证码不正确!" }));
            }

            Case _case = IocObject.Case.GetCaseByPartnerCodeAndCashNo(partnerCode, cashNo);

            if (_case == null)
            {
                return(JsonConvert.SerializeObject(new { result = false, message = "" }));
            }
            else
            {
                context.Session["partnerCode"] = partnerCode;

                if (_case.State == -2 || _case.State == -1)
                {
                    return(JsonConvert.SerializeObject(new { result = false, message = "案件不存在" }));
                }
                else if (_case.State == 2)
                {
                    return(JsonConvert.SerializeObject(new { result = false, message = "exists" }));
                }
                else
                {
                    TemplatePage page        = Cms.Plugins.GetPage <Main>("html/partner_saveCase.html");
                    string       entityJson  = JsonConvert.SerializeObject(_case);
                    string       galleryJson = JsonConvert.SerializeObject(IocObject.Case.GetGalleryOfCase(_case.Id));
                    page.AddVariable("entity", new { json = entityJson, galleryJson = galleryJson });

                    return(JsonConvert.SerializeObject(new { result = true, html = page.ToString() }));
                }
            }
        }