Beispiel #1
0
        public ActionResult NotifyUrl()
        {
            var    tbsign   = Request.Form["sign"];
            var    notifyid = Request.Form["notify_id"];
            var    status   = Request.Form["trade_status"];
            var    orderid  = Request.Form["out_trade_no"];
            var    payid    = Request.Form["trade_no"];
            string retval   = "tbsign=" + tbsign + ";notifyid=" + notifyid + ";status=" + status + ";orderid=" + orderid + ";payid=" + payid;

            try
            {
                if (status == "TRADE_SUCCESS")
                {
                    var  aArry        = GetRequestPost(0);
                    var  notify       = new Notify();
                    bool verifyResult = notify.Verify(aArry, notifyid, tbsign, "0");
                    if (verifyResult)
                    {
                        try
                        {
                            OrderService ords = new OrderService();
                            Order        od   = new Order();
                            od = ords.GetOrderInfo(orderid);
                            if (od != null && od.Suid.ToString() != "")
                            {
                                int cou = ords.UpdateOrderstatus(od.Id, 1);
                                if (cou > 0)
                                {
                                    SalonService salon = new SalonService();
                                    cou = salon.UpdatestatusInfo(od.Suid.ToString(), 4);
                                    Common.Logger(retval + ";cou=" + cou + (cou > 0 ? "" : "-沙龙表修改失败"));
                                }
                                else
                                {
                                    Common.Logger(retval + ";cou=" + cou + "-订单表修改失败");
                                }
                            }
                            else
                            {
                                Common.Logger(retval + "-未取到订单信息");
                            }
                        }
                        catch (Exception ex)
                        {
                            Common.Logger("AlipayReturnController-NotifyUrl1``````" + retval + ";error=" + ex.Message);
                        }
                    }
                    else
                    {
                        Common.Logger("AlipayReturnController-NotifyUrl-消息不合法``````" + retval);
                    }
                }
            }
            catch (Exception ex)
            {
                Common.Logger("AlipayReturnController-NotifyUrl2``````" + retval + ";error=" + ex.Message);
            }
            Response.Write("success");
            return(View());
        }
        public async Task <SalonService> CreateUpdate(SalonService entity)
        {
            if (entity.Id < 1)
            {
                try
                {
                    await _db.SalonServices.AddAsync(entity);

                    if (!await SaveChanges())
                    {
                        return(null);
                    }
                    return(entity);
                }
                catch (Exception)
                {
                    return(null);
                }
            }
            else
            {
                _db.SalonServices.Update(entity);
                if (!await SaveChanges())
                {
                    return(null);
                }
                return(entity);
            }
        }
        public string SalonInfo([FromBody] SUID model)
        {
            string value = CodeHelp.GetResults(0, "失败", "");

            try
            {
                if (string.IsNullOrEmpty(model.suid.ToString()))
                {
                    value = CodeHelp.GetResults(0, "失败", "沙龙ID不能为空");
                }
                else
                {
                    SalonSimple     salon = new SalonSimple();
                    List <AllSalon> list  = new List <AllSalon>();
                    SalonService    sa    = new SalonService();
                    INoticeService  nots  = new INoticeService();
                    //取沙龙的基本信息和环境图
                    list = sa.GetSalonInfo(model.suid, 3);
                    if (list != null && list.Count > 0)
                    {
                        if (list[0].Status != 4)
                        {
                            value = CodeHelp.GetResults(0, "无法找到页面,该沙龙暂时不提供此服务。", "沙龙未开通");
                        }
                        else
                        {
                            if (list[0].Opendate < DateTime.Now)
                            {
                                value = CodeHelp.GetResults(0, "无法找到页面,该沙龙暂时不提供此服务。", "沙龙未开通");
                            }
                            else
                            {
                                list.First().Address = list.First().Address.Replace("|", "");
                                Tnotice noice        = new Tnotice();
                                noice = nots.GetNotice(model.suid);
                                if (noice != null)
                                {
                                    list.First().noticecontent = noice.content;
                                }
                                else
                                {
                                    list.First().noticecontent = "暂无公告";
                                }
                                value = CodeHelp.GetResults(1, "成功", list).ToLower();
                            }
                        }
                    }
                    else
                    {
                        value = CodeHelp.GetResults(0, "失败", "未取到数据");
                    }
                }
            }
            catch (Exception ex)
            {
                value = CodeHelp.GetResults(0, "失败", ex.Message);
            }
            return(value);
        }
Beispiel #4
0
        private void btnListele_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            SalonService s = new SalonService();

            foreach (var item in s.ListeleSalon())
            {
                listBox1.Items.Add(item.SalonAd);
            }
        }
        public ActionResult Index()
        {
            SalonService salon = new SalonService();
            var          info  = new SalonSimple();

            if (Session["W_B_UID"] != null && Session["W_B_UID"].ToString() != "")
            {
                info = salon.GetSalonSimpleInfo(new Guid(Session["W_B_UID"].ToString()));
            }
            ViewBag._baseSalonurl = _baseSalonurl;
            return(View(info));
        }
Beispiel #6
0
        private void btnSalonEkle_Click(object sender, EventArgs e)
        {
            SalonService s    = new SalonService();
            SalonEkleDTO dt   = new SalonEkleDTO();
            Seans        temp = (Seans)comboBoxSeans.SelectedItem;

            dt.SeansID        = temp.SeansID;
            dt.SalonCapasity  = (int)(numericUpDownKapasite.Value);
            dt.SalonRowSayisi = (int)(numericUpDownKoltukSayisi.Value);
            dt.SalonaName     = textBoxSalonAdi.Text;
            s.EkleYap(dt);
            textBoxSalonAdi.Text = "";
        }
        public JsonResult SaveSalon_Service(SalonService ObjSalonService)
        {
            try
            {
                ObjSalonService.CreatedDate  = CommonFunction.GetDateNow();
                ObjSalonService.ModifiedDate = CommonFunction.GetDateNow();

                DB.SalonService.Add(ObjSalonService);

                DB.SaveChanges();
                return(Json(true, JsonRequestBehavior.AllowGet));
            }
            catch (Exception EX) { throw EX; }
        }
        public ActionResult Check()
        {
            SalonService salon = new SalonService();
            SalonSimple  ss    = new SalonSimple();

            if (Session["W_B_UID"] != null && Session["W_B_UID"].ToString() != "")
            {
                ss = salon.GetSalonSimpleInfo(new Guid(Session["W_B_UID"].ToString()));
            }
            else
            {
                Response.Redirect("/Home/index");
                return(View());
            }
            return(View(ss));
        }
        public JsonResult UpdateSalonService(SalonService ObjSalonService)
        {
            try
            {
                var Result = DB.SalonService.Where(Item => Item.ID_Salon == ObjSalonService.ID_Salon &&
                                                   Item.ID_Service == ObjSalonService.ID_Service).ToList();
                Result[0].Comment      = ObjSalonService.Comment;
                Result[0].ModifiedDate = CommonFunction.GetDateNow();

                DB.SaveChanges();



                return(Json(true, JsonRequestBehavior.AllowGet));
            }
            catch (Exception EX) { throw EX; }
        }
Beispiel #10
0
        private async Task <SalonService> CreateSalonServiceAsync(string salonId, int serviceId)
        {
            // Add SalonService
            var salonService = new SalonService
            {
                SalonId   = salonId,
                ServiceId = serviceId,
                Available = true,
            };

            await this.DbContext.SalonServices.AddAsync(salonService);

            await this.DbContext.SaveChangesAsync();

            this.DbContext.Entry <SalonService>(salonService).State = EntityState.Detached;

            return(salonService);
        }
        /// <summary>
        /// 判断登录名是否存在
        /// </summary>
        /// <param name="loginID"></param>
        /// <returns></returns>
        public string CHKLoginID(string loginID)
        {
            var salon = new SalonService();
            var sal   = new SalonSimple();

            try
            {
                sal = salon.CHKInfo(loginID);
                if (sal != null && sal.Uid.ToString() != "")
                {
                    return("0");
                }
            }
            catch
            {
                return("0");
            }
            return("1");
        }
 /// <summary>
 /// 判断沙龙是否到期
 /// </summary>
 /// <param name="suid"></param>
 /// <returns></returns>
 private bool CHKsal(string suid)
 {
     try
     {
         List <AllSalon> list = new List <AllSalon>();
         SalonService    sa   = new SalonService();
         list = sa.GetSalonInfo(new Guid(suid), 3);
         if (list.Any())
         {
             return(list[0].Opendate > DateTime.Now);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
        /// <summary>
        /// 获取沙龙昵称和logo
        /// </summary>
        /// <param name="suid"></param>
        /// <returns></returns>
        private string cacheInfo(string suid)
        {
            string info = "";

            try
            {
                info = CacheManage.GetCache("suid:" + suid).ToString();
            }
            catch
            {
                List <AllSalon> list = new List <AllSalon>();
                SalonService    sa   = new SalonService();
                //取沙龙的基本信息和环境图
                list = sa.GetSalonInfo(new Guid(suid), 3);
                if (list.Any())
                {
                    info = list[0].Nickname + "|*-*|" + list[0].Logo;
                    CacheManage.SetCacheMinutes("suid:" + suid, info, 90);
                }
            }
            return(info);
        }
Beispiel #14
0
        public void UpdateSalonService(UpdateServiceViewModel model)
        {
            var salonId = _salonRepo.Gets().Where(s => s.AccountId == model.AccountId).Select(s => s.Id).FirstOrDefault();

            var foundedService = _salonServiceRepo.Gets()
                                 .Where(s => s.SalonId == salonId && s.ServiceId == model.ServiceId)
                                 .FirstOrDefault();

            if (foundedService != null)
            {
                foundedService.Price       = model.Price;
                foundedService.AvarageTime = model.Duration;
                _salonServiceRepo.Edit(foundedService);
                _unitOfWork.SaveChanges();
            }
            else
            {
                var salon   = _salonRepo.GetByID(salonId);
                var service = _serviceRepo.GetByID(model.ServiceId);
                if (salon != null && service != null)
                {
                    SalonService newService = new SalonService
                    {
                        Salon       = salon,
                        Service     = service,
                        Price       = model.Price,
                        AvarageTime = model.Duration,
                        Disabled    = false
                    };
                    _salonServiceRepo.Insert(newService);
                    _unitOfWork.SaveChanges();
                }
                else
                {
                    throw new Exception("Salon Not Found");
                }
            }
        }
        public ActionResult Register(string uid)
        {
            SalonService salon = new SalonService();
            SalonSimple  ss    = new SalonSimple();

            ViewBag.Token = GetToken();
            if (Session["W_B_UID"] != null && Session["W_B_UID"].ToString() != "")
            {
                ss = salon.GetSalonSimpleInfo(new Guid(Session["W_B_UID"].ToString()));
            }
            if (!string.IsNullOrEmpty(uid))
            {
                ss = salon.GetSalonSimpleInfo(new Guid(uid));
                SalonService    salser = new SalonService();
                List <AllSalon> lis    = new List <AllSalon>();
                lis          = salser.GetSalonInfo(new Guid(uid), 3);//环境照
                ViewBag.img1 = lis[0].Photo;
                ViewBag.img2 = lis[1].Photo;
                ViewBag.img3 = lis[2].Photo;
                lis          = salser.GetSalonInfo(new Guid(uid), 1);//营业执照
                ViewBag.img4 = lis[0].Photo;
            }
            return(View(ss));
        }
Beispiel #16
0
        public ActionResult ReturnUrl()
        {
            int cou = 0;
            //System.IO.StreamWriter sw = new System.IO.StreamWriter(Server.MapPath(".") + "\\" + "ReturnUrl.txt");
            //sw.WriteLine("ReturnUrl");
            //sw.Flush();
            //sw.Close();
            //获取支付宝POST过来通知消息
            SortedDictionary <string, string> parameter = Unity.GetRequestGet();

            if (parameter.Count > 0)//判断是否有带返回参数
            {
                Notify aliNotify    = new Notify();
                var    verifyResult = aliNotify.Verify(parameter, parameter["notify_id"], parameter["sign"], "1");
                if (verifyResult)                                 //验证成功
                {
                    var out_trade_no = parameter["out_trade_no"]; //商户订单号
                    var trade_no     = parameter["trade_no"];     //支付宝交易号
                    var trade_status = parameter["trade_status"]; //交易状态
                    var price        = parameter["total_fee"];    //金额
                    if (trade_status == "TRADE_FINISHED" || trade_status == "TRADE_SUCCESS")
                    {
                        cou = 1;
                        //----------------Jiang----------------
                        ISalonService salon = new SalonService();

                        if (Session["W_B_UID"] != null)
                        {
                            string UID    = Session["W_B_UID"].ToString();
                            int    Insert = 0;
                            try
                            {
                                Insert = salon.UpdatestatusInfo(UID, 4);//支付完成后修改用户支付状态  s_status:4
                            }
                            catch { }
                            if (Insert > 0)
                            {
                                SalonSimple salonsimple = salon.GetSalonSimpleInfo(new Guid(UID));
                                FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(
                                    1,
                                    salonsimple.Uid.ToString(),
                                    DateTime.Now,
                                    DateTime.Now.AddDays(1),
                                    false,
                                    salonsimple.Cell.Trim() + "$bobo$" + salonsimple.Nickname + "$bobo$" + salonsimple.Logo
                                    );
                                string     encryptedTicket = FormsAuthentication.Encrypt(authTicket);
                                HttpCookie authCookie      = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket);
                                HttpContext.Response.Cookies.Add(authCookie);  //往Cookie中添加用户信息
                                Response.Redirect("/Home/Index");
                            }
                        }
                        //-------------------------------------
                    }
                    else
                    {
                        cou = 2;
                    }
                }
                else
                {
                    cou = 3;
                }
            }
            else
            {
                cou = 4;
            }
            return(View(cou));
        }
 public async Task <bool> Delete(SalonService entity)
 {
     _db.SalonServices.Remove(entity);
     return(await SaveChanges());
 }
        public ActionResult Pay()
        {
            SalonService salon = new SalonService();
            SalonSimple  ss    = new SalonSimple();

            if (Session["W_B_UID"] != null && Session["W_B_UID"].ToString() != "")
            {
                ss = salon.GetSalonSimpleInfo(new Guid(Session["W_B_UID"].ToString()));
            }
            else
            {
                Response.Redirect("/Home/index");
                return(View());
            }
            string sHtmlText = "";

            if (ss.Status != 3)
            {
                Response.Redirect("/Register/Check");
                return(View());
            }
            else
            {
                try
                {
                    OrderService ords = new OrderService();
                    Order        od   = new Order();
                    //根据配置文件获取支付宝交易过期时间
                    string t = ConfigurationManager.AppSettings["Alipay.Timeout"];
                    t = t.Substring(0, t.Length - 1);
                    DateTime dt = DateTime.Now.AddMinutes(-int.Parse(t));
                    od = ords.GetOrderInfo(ss.Uid, dt);
                    if (od == null)
                    {
                        //支付宝支付
                        od         = new Order();
                        od.Suid    = ss.Uid;
                        od.Name    = ss.Nickname + "支付订单";
                        od.Money   = 0.01;
                        od.Orid    = GetOrdId();
                        od.Paydate = DateTime.Now;
                        od.Status  = 0;
                        od.Date    = DateTime.Now;
                        int cou = ords.AddOrder(od);
                        if (cou > 0)
                        {
                            sHtmlText = Unity.Order(od.Orid.ToString(),
                                                    ConfigurationManager.AppSettings["OrderName"],
                                                    ConfigurationManager.AppSettings["OrderPrice"]
                                                    , ConfigurationManager.AppSettings["OrderDetil"]);
                            Response.Write(sHtmlText);
                        }
                    }
                    else
                    {
                        sHtmlText = Unity.Order(od.Orid.ToString(),
                                                ConfigurationManager.AppSettings["OrderName"],
                                                ConfigurationManager.AppSettings["OrderPrice"]
                                                , ConfigurationManager.AppSettings["OrderDetil"]);
                        Response.Write(sHtmlText);
                    }
                }
                catch (Exception ex)
                {
                    Response.Write(ex.Message);
                }
            }
            return(View());
        }
        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="loginID">登录名(手机号)</param>
        /// <param name="PWD">密码</param>
        /// <param name="B_Name">沙龙名称</param>
        /// <param name="B_Phone">沙龙电话</param>
        /// <param name="B_LinkRealName">沙龙联系人</param>
        /// <param name="add">沙龙地址</param>
        /// <param name="B_Summary">沙龙简介</param>
        /// <param name="B_Image1">营业执照</param>
        /// <param name="B_Image2">Logo</param>
        /// <param name="B_Image3">环境照</param>
        /// <param name="B_Image4">环境照</param>
        /// <param name="B_Image5">环境照</param>
        /// <returns></returns>
        public string CHKregister(string loginID, string PWD, string B_Name, string B_Phone, string B_LinkRealName, string add, string B_Summary, string B_Image1, string B_Image2, string B_Image3, string B_Image4, string B_Image5, string B_Wxname, string Lng, string Lat, int istemporary, string recommend)
        {
            SalonService salon = new SalonService();
            SalonSimple  ss    = new SalonSimple();

            if (Session["W_B_UID"] != null && Session["W_B_UID"].ToString() != "")
            {
                ss = salon.GetSalonSimpleInfo(new Guid(Session["W_B_UID"].ToString()));
            }
            if (string.IsNullOrEmpty(loginID))
            {
                return("登录名不能为空");
            }
            if (string.IsNullOrEmpty(PWD))
            {
                return("密码不能为空");
            }
            if (string.IsNullOrEmpty(B_Phone))
            {
                return("电话号码不能为空");
            }
            if (string.IsNullOrEmpty(add))
            {
                return("地址不能为空");
            }
            if (string.IsNullOrEmpty(B_LinkRealName))
            {
                return("联系人不能为空");
            }
            if (string.IsNullOrEmpty(B_Image1))
            {
                return("营业执照不能为空");
            }
            if (string.IsNullOrEmpty(B_Image2))
            {
                return("LOGO不能为空");
            }
            try
            {
                //解密参数值
                loginID = WeiSalonV2.Models.AESHelper.DecryptString(loginID);
                PWD     = WeiSalonV2.Models.AESHelper.DecryptString(PWD);
                //去掉参数中的转移字符
                loginID = new string((from c in loginID.ToCharArray() where !char.IsControl(c) select c).ToArray());
                PWD     = new string((from c in PWD.ToCharArray() where !char.IsControl(c) select c).ToArray());
                if (string.IsNullOrEmpty(loginID))
                {
                    return("登录名验证失败");
                }
                if (string.IsNullOrEmpty(PWD))
                {
                    return("密码验证失败");
                }
            }
            catch
            {
                return("验证帐号/密码失败");
            }
            SalonSimple sal = new SalonSimple();

            sal.Status       = 1;
            sal.Cell         = B_Phone.Trim();
            sal.Date         = DateTime.Now;
            sal.Email        = loginID;
            sal.Pwd          = MD5.MDString(PWD);
            sal.Kind         = istemporary == 1 ? 0 : 1;
            sal.Logo         = B_Image2.Replace("http://bobosquad.qiniudn.com", "");
            sal.Nickname     = B_Name;
            sal.Address      = add;
            sal.LinkName     = B_LinkRealName;
            sal.Summary      = SQLFilter.checkStr(SQLFilter.ReplaceUnStr(SQLFilter.ReplaceStr(Server.UrlDecode(B_Summary.Trim()))));
            sal.Lat          = Lat;
            sal.Lon          = Lng;
            sal.Price        = "";
            sal.Businessdate = "10:00~22:00";
            sal.Opendate     = null;
            sal.Wxname       = string.IsNullOrEmpty(B_Wxname) ? "" : B_Wxname;
            sal.Recommend    = string.IsNullOrEmpty(recommend) ? "" : recommend;
            int         ADDCou = 0;
            SalonSimple salc   = salon.CHKInfo(loginID);

            if (salc == null)
            {
                //不是修改
                //未注册过
                AllSalon alls = new AllSalon();
                try
                {
                    sal.Uid = Guid.NewGuid();
                    ADDCou  = salon.AddSalon(sal);
                    if (ADDCou > 0)
                    {
                        ADDCou = 0;
                        //注册成功 添加环境图等
                        //添加营业执照图片
                        alls.SiKind   = 1;
                        alls.Suid     = sal.Uid;
                        alls.Sistatus = 1;
                        alls.Photo    = B_Image1.Replace("http://bobosquad.qiniudn.com", "");
                        salon.AddAllSalon(alls);

                        //添加环境图
                        alls          = new AllSalon();
                        alls.SiKind   = 3;
                        alls.Suid     = sal.Uid;
                        alls.Sistatus = 1;
                        alls.Photo    = B_Image3.Replace("http://bobosquad.qiniudn.com", "");
                        salon.AddAllSalon(alls);
                        alls.Photo = B_Image4.Replace("http://bobosquad.qiniudn.com", "");
                        salon.AddAllSalon(alls);
                        alls.Photo = B_Image5.Replace("http://bobosquad.qiniudn.com", "");
                        ADDCou     = salon.AddAllSalon(alls);
                        if (ADDCou > 0)
                        {
                            Session["W_B_UID"] = sal.Uid.ToString();
                            //所有信息添加成功
                            return("1");
                        }
                        else
                        {
                            return("基本信息添加成功 图片可能添加失败");
                            //基本信息添加成功 图片可能添加失败
                        }
                    }
                    else
                    {
                        return("信息添加失败");
                    }
                }
                catch (Exception ex)
                {
                    return("异常:信息添加失败");
                }
            }
            else
            {
                //防恶意修改
                if (ss.Uid != salc.Uid)
                {
                    return("帐号信息和提交信息不符");
                }
                //修改
                //如果是重新提交
                sal.Uid   = ss.Uid;
                sal.Email = salc.Email;
                ADDCou    = salon.UpdateRegSalon(sal);
                if (ADDCou > 0)
                {
                    try
                    {
                        ADDCou = 0;
                        List <AllSalon> lis = new List <AllSalon>();
                        lis = salon.GetSalonInfo(ss.Uid, 1); //营业执照
                        salon.UpdateImageInfo(lis[0].Id.ToString(), B_Image1, 1);
                        lis = salon.GetSalonInfo(ss.Uid, 3); //营业执照
                        salon.UpdateImageInfo(lis[0].Id.ToString(), B_Image3, 1);
                        salon.UpdateImageInfo(lis[1].Id.ToString(), B_Image4, 1);
                        ADDCou = salon.UpdateImageInfo(lis[2].Id.ToString(), B_Image5, 1);
                        return(ADDCou.ToString());
                    }
                    catch
                    { }
                }
                else
                {
                    return("信息修改失败");
                }
            }
            return("未知错误");
        }
        /// <summary>
        /// 登陆
        /// </summary>
        /// <param name="loginID"></param>
        /// <param name="PWD"></param>
        /// <returns></returns>
        public string CHKLogin(string loginID, string PWD)
        {
            if (string.IsNullOrEmpty(loginID))
            {
                return("登录名不能为空");
            }
            if (string.IsNullOrEmpty(PWD))
            {
                return("密码不能为空");
            }
            try
            {
                //解密参数值
                loginID = AESHelper.DecryptString(loginID);
                PWD     = AESHelper.DecryptString(PWD);
                //去掉参数中的转移字符
                loginID = new string((from c in loginID.ToCharArray() where !char.IsControl(c) select c).ToArray());
                PWD     = new string((from c in PWD.ToCharArray() where !char.IsControl(c) select c).ToArray());
                if (string.IsNullOrEmpty(loginID))
                {
                    return("登录名验证失败");
                }
                if (string.IsNullOrEmpty(PWD))
                {
                    return("密码验证失败");
                }
            }
            catch
            { }
            SalonService salon = new SalonService();
            SalonSimple  sal   = salon.GetLoginInfo(loginID, FormsAuthentication.HashPasswordForStoringInConfigFile(PWD, "MD5"));

            if (sal.Email == "CCCCCCCCCCCaa")
            {
                sal.Status = 4;
            }
            if (sal == null)
            {
                //return "登陆失败 请检查登录名和密码";
                return("查询失败,或没有查到相关注册信息");
            }
            else
            {
                if (string.IsNullOrEmpty(sal.Uid.ToString()))
                {
                    return("帐号错误");
                }
                else
                {
                    string turl = "";
                    string stat = "1";
                    Session["W_B_UID"] = sal.Uid.ToString();
                    if (sal.Opendate < DateTime.Now)
                    {
                        if (sal.Email != "CCCCCCCCCCCaa")
                        {
                            //如果开通超过1年 那么就是已经过期
                            sal.Status = 3;
                            salon.UpdatestatusInfo(sal.Uid.ToString(), 3);
                        }
                    }
                    switch (sal.Status)
                    {
                    case 0:
                        //帐号禁用
                        turl = "";
                        stat = "登录失败 帐号已被禁用";
                        Session["W_B_UID"] = "";
                        break;

                    case 1:
                        //审核中
                        turl = "/Register/check";
                        break;

                    case 2:
                        //审核未通过
                        turl = "/Register/check";
                        break;

                    case 3:
                        //审核已通过未付款
                        turl = "/Register/check";
                        stat = "2";
                        break;

                    case 4:
                        //审核已通过已付款
                        FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket(
                            1,
                            sal.Uid.ToString(),
                            DateTime.Now,
                            DateTime.Now.AddDays(1),
                            false,
                            sal.Cell.Trim() + "$bobo$" + sal.Nickname + "$bobo$" + sal.Logo
                            );
                        string     encryptedTicket = FormsAuthentication.Encrypt(authTicket);
                        HttpCookie authCookie      = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket);
                        HttpContext.Response.Cookies.Add(authCookie);
                        turl = "/manage/Index";
                        break;
                    }
                    return(stat + "|" + turl);
                }
            }
            return("未知错误");
        }