Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.Cookies["nick"] != null)
            {
                Nick = HttpUtility.UrlDecode(Request.Cookies["nick"].Value); //"nick";
            }
            else
            {
                Nick = Session["snick"].ToString();
            }
            if (Nick == "")
            {
                Response.Redirect("http://fuwu.paipai.com/appstore/ui/my/app/appdetail.xhtml?appId=234454");
            }

            PaiPaiShopService ppsDal = new PaiPaiShopService();
            PaiPaiShopInfo    info   = ppsDal.GetPaiPaiShopInfo(Nick);

            CanPoCount = info.MessgeCount.ToString();
            HadPoCount = info.HadPost.ToString();
            // 1:催单;5:已发货;9:催评
            if (info.NotPay)
            {
                NoPayImgSrc = "images/on.gif";
                NoPayJsHref = "javascript:close_setting(1)";
            }
            else
            {
                NoPayImgSrc = "images/off.gif";
                NoPayJsHref = "javascript:open_setting(1)";
            }
            if (info.NotPing)
            {
                NoPingImgSrc = "images/on.gif";
                NoPingJsHref = "javascript:close_setting(9)";
            }
            else
            {
                NoPingImgSrc = "images/off.gif";
                NoPingJsHref = "javascript:open_setting(9)";
            }

            if (info.PostGoods)
            {
                PostImgSrc = "images/on.gif";
                PostJsHref = "javascript:close_setting(5)";
            }
            else
            {
                PostImgSrc = "images/off.gif";
                PostJsHref = "javascript:open_setting(5)";
            }
        }
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (string.IsNullOrEmpty(Request.QueryString["type"]))
            {
                Response.Redirect("");
                return;
            }

            int type = int.Parse(Request.QueryString["type"]);
            if (Request.Cookies["nick"] != null)
            {
                Nick = HttpUtility.UrlDecode(Request.Cookies["nick"].Value); //"nick";
            }
            else
            {
                Nick = Session["snick"].ToString();
            }
            if (Nick == "")
            {
                Response.Redirect("");
            }
            PaiPaiShopService ppsDal = new PaiPaiShopService();
            PaiPaiShopInfo    info   = ppsDal.GetPaiPaiShopInfo(Nick);
            if (type == 1)
            {
                panel3.Visible          = true;
                template_content1.Value = info.NotPayPostModel;
                Text1.Value             = info.NotPayExpiredMinutes.ToString();
            }

            else if (type == 5)
            {
                panel1.Visible          = true;
                template_content5.Value = info.PostGoodsPostModel;
            }

            else if (type == 9)
            {
                panel2.Visible          = true;
                template_content9.Value = info.NotPingPostModel;
                pay_hour.Value          = info.ExpiredDays.ToString();
            }
            else
            {
                Response.Redirect("http://fuwu.paipai.com/appstore/ui/my/app/appdetail.xhtml?appId=234454");
                return;
            }

            ViewState["PaiPaiInfo"] = info;
            CanPoCount        = info.MessgeCount.ToString();
            HadPoCount        = info.HadPost.ToString();
            ViewState["nick"] = Nick;
        }
    }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.Cookies["nick"] != null)
            {
                Nick = HttpUtility.UrlDecode(Request.Cookies["nick"].Value); //"nick";
            }
            else
            {
                Nick = Session["snick"].ToString();
            }
            if (Nick == "")
            {
                Response.Redirect("http://fuwu.paipai.com/appstore/ui/my/app/appdetail.xhtml?appId=234454");
            }

            int type = 5;
            if (!string.IsNullOrEmpty(Request.QueryString["type"]))
            {
                type = int.Parse(Request.QueryString["type"]);
            }

            if (type == 1)
            {
                ViewState["PayCss"] = "current";
            }
            if (type == 5)
            {
                ViewState["PostCss"] = "current";
            }
            if (type == 9)
            {
                ViewState["PingCss"] = "current";
            }

            PaiPaiShopService ppsDal = new PaiPaiShopService();
            PaiPaiShopInfo    info   = ppsDal.GetPaiPaiShopInfo(Nick);

            CanPoCount = info.MessgeCount.ToString();
            HadPoCount = info.HadPost.ToString();
            DateTime start;
            DateTime end;
            if (string.IsNullOrEmpty(Request.QueryString["start"]))
            {
                start = DateTime.Now.AddDays(-15);
                end   = DateTime.Now.AddDays(1);
            }
            else
            {
                start = DateTime.Parse(Request.QueryString["start"]);
                end   = DateTime.Parse(Request.QueryString["end"]);
                if (end.Day == DateTime.Now.Day)
                {
                    end = end.AddDays(1);
                }
            }
            ViewState["type"] = type;
            Bind(Request.QueryString["uid"], start, end, type);
        }
    }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string nick = "";
            if (Request.Cookies["nick"] != null)
            {
                nick = HttpUtility.UrlDecode(Request.Cookies["nick"].Value); //"nick";
            }
            else
            {
                nick = Session["snick"].ToString();
            }
            if (nick == "")
            {
                Response.Redirect("http://fuwu.paipai.com/appstore/ui/my/app/appdetail.xhtml?appId=234454");
            }
            string typ = Request.QueryString["typ"];

            PaiPaiShopService ppsDal = new PaiPaiShopService();
            PaiPaiShopInfo    info   = ppsDal.GetPaiPaiShopInfo(nick);


            if (typ == "1")
            {
                if (info.MessgeCount <= 0 && !info.NotPay)
                {
                    Response.Write("{\"errorType\":\"integral_not_enough\",\"msg\":\"余额不足,请先充值!\",\"success\":false}");
                }
                else
                {
                    if (info.NotPay)
                    {
                        ppsDal.UpdateNotPay(false, info.NotPayPostModel, info.NotPayExpiredMinutes, nick);
                        Response.Write("{\"success\":true}");
                    }
                    else
                    {
                        if (info.MessgeCount > 0)
                        {
                            ppsDal.UpdateNotPay(true, info.NotPayPostModel, info.NotPayExpiredMinutes, nick);
                            Response.Write("{\"success\":true}");
                        }
                    }
                }
            }

            if (typ == "5")
            {
                if (info.MessgeCount <= 0 && !info.PostGoods)
                {
                    Response.Write("{\"errorType\":\"integral_not_enough\",\"msg\":\"余额不足,请先充值!\",\"success\":false}");
                }
                else
                {
                    if (info.PostGoods)
                    {
                        ppsDal.UpdatePostGoods(false, info.PostGoodsPostModel, nick);
                        Response.Write("{\"success\":true}");
                    }
                    else
                    {
                        if (info.MessgeCount > 0)
                        {
                            ppsDal.UpdatePostGoods(true, info.PostGoodsPostModel, nick);
                            Response.Write("{\"success\":true}");
                        }
                    }
                }
            }

            if (typ == "9")
            {
                if (info.MessgeCount <= 0 && !info.NotPing)
                {
                    Response.Write("{\"errorType\":\"integral_not_enough\",\"msg\":\"余额不足,请先充值!\",\"success\":false}");
                }
                else
                {
                    if (info.NotPing)
                    {
                        ppsDal.UpdateNotPing(false, info.NotPingPostModel, info.ExpiredDays, nick);
                        Response.Write("{\"success\":true}");
                    }
                    else
                    {
                        if (info.MessgeCount > 0)
                        {
                            ppsDal.UpdateNotPing(true, info.NotPingPostModel, info.ExpiredDays, nick);

                            Response.Write("{\"success\":true}");
                        }
                    }
                }
            }

            Response.End();
        }
    }