Example #1
0
        public ActionResult Ins(string name, string pwd, string code, string orgId)
        {
            BaseRequest <ORGFilter> request = new BaseRequest <ORGFilter>();
            var response = userService.QueryOrgInHome(request);

            ViewBag.Msg = "";
            if (response.ResultCode == 0)
            {
                ViewBag.OrgList = response.Data;
            }
            else
            {
                ViewBag.OrgList = new List <Insurance>();
            }
            if (!string.IsNullOrEmpty(name))
            {
                if (SignIn(name, pwd, orgId, OrgType.InsuranceCompany))
                {
                    if (!string.IsNullOrEmpty(Request.QueryString["ReturnUrl"]))
                    {
                        return(Redirect(HttpUtility.UrlDecode(Request.QueryString["ReturnUrl"])));
                    }
                    return(Redirect("/Home/Index"));
                }
                else
                {
                    ViewBag.Msg = "请输入正确信息";
                }
            }
            return(View());
        }