Exemplo n.º 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)";
            }
        }
    }
Exemplo n.º 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;
        }
    }
Exemplo n.º 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");
            }

            BuyInfo info = new PaiPaiShopService().GetBuyInfo(Nick);
            Copyright   = "初级版";
            ExpiredTime = info.ExpiedTime.ToString("yyyy-MM-dd");
        }
    }
Exemplo n.º 4
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);
        }
    }
Exemplo n.º 5
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();
        }
    }
Exemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string selluin     = Request.QueryString["useruin"];
            string accesstoken = Request.QueryString["access_token"];
            if (string.IsNullOrEmpty(selluin) || string.IsNullOrEmpty(accesstoken))
            {
                Response.Write("数据不合法");
                return;
            }

            PaiPaiShopInfo info = PaiPaiTopAPI.GetShopInfo(selluin, accesstoken);
            if (info == null)
            {
                Response.Write("未找到店铺信息");
                return;
            }
            PaiPaiShopService ppsDal = new PaiPaiShopService();
            info.logintimes           = 1;
            info.lastlogin            = DateTime.Now;
            info.BanBen               = 0;
            info.MessgeCount          = 10; //暂时购买就送10条
            info.HadPost              = 0;
            info.ExpiredDays          = 8;  //默认过期未评的时间为8天
            info.NotPayExpiredMinutes = 60; //默认多久未付款发短信

            //发送短信模板
            info.NotPay             = true;
            info.NotPayPostModel    = "亲,您在【{ShopName}】拍下的宝贝还没付款哦,宝贝我们一直为您留着,快来把宝贝领回家吧。";
            info.PostGoods          = true;
            info.PostGoodsPostModel = "【{ShopName}】:亲,您购买的宝贝已发出,{ExpressName}+{ExpressNo},请注意查收!如有问题请及时联系我们。";
            info.NotPing            = true;
            info.NotPingPostModel   = "【{ShopName}】:亲,您的宝贝已经显示签收,如果对商品满意请帮忙评价下,非常感谢。";

            info.AcessToken = accesstoken;
            if (ppsDal.SelectShopBySellerUin(info.sellerUin))
            {
                ppsDal.UpdateShopInfo(info);
            }
            else
            {
                ppsDal.InsertShop(info);
            }

            //添加购买信息
            string    sql    = "SELECT * FROM [BangT_Buys] WHERE nick = '" + selluin + "'";
            DataTable dingdt = DataHelp.DBHelper.ExecuteDataTable(sql);

            if (dingdt.Rows.Count > 0)
            {
            }
            else
            {
                //插入
                sql = "INSERT INTO BangT_Buys ([Nick],[FeeId],[BuyTime],[IsExpied],ExpiedTime) VALUES ('" + selluin + "','21D5A8DB-F363-4679-BB64-0EA58D5B9F3D',GETDATE(),0,'" + DateTime.Now.AddMonths(1).ToShortDateString() + "')";
                DataHelp.DBHelper.ExecuteNonQuery(sql);
            }

            AddCookie(selluin, accesstoken);

            Response.Redirect("index.html");
        }
    }
Exemplo n.º 7
0
    protected void Btn_Save_Click(object sender, EventArgs e)
    {
        PaiPaiShopService ppsDal = new PaiPaiShopService();
        int type = int.Parse(Request.QueryString["type"]);

        if (type == 1)
        {
            panel3.Visible = true;

            int minutes = PaiPaiInfo.NotPayExpiredMinutes;
            try
            {
                minutes = int.Parse(Text1.Value);
            }
            catch (Exception ex)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('请在买家下单后面的输入框输入数字');</script>");
                return;
            }

            if (!template_content1.Value.Contains("{ShopName}"))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('请您把{ShopName}添加到模板内容中');</script>");
                return;
            }

            ppsDal.UpdateNotPay(PaiPaiInfo.NotPay, template_content1.Value, minutes, ViewState["nick"].ToString());
        }

        else if (type == 5)
        {
            panel1.Visible = true;
            if (!template_content5.Value.Contains("{ShopName}"))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('请您把{ShopName}添加到模板内容中');</script>");
                return;
            }
            if (!template_content5.Value.Contains("{ExpressName}") || !template_content5.Value.Contains("{ExpressNo}"))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('请您把{ExpressName}{ExpressNo}添加到模板内容中');</script>");
                return;
            }
            ppsDal.UpdatePostGoods(PaiPaiInfo.PostGoods, template_content5.Value, ViewState["nick"].ToString());
        }

        else if (type == 9)
        {
            panel2.Visible = true;

            int days = PaiPaiInfo.ExpiredDays;
            try
            {
                days = int.Parse(pay_hour.Value);
            }
            catch (Exception ex)
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('请在发货后面的输入框输入数字');</script>");
                return;
            }
            if (!template_content9.Value.Contains("{ShopName}"))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('请您把{ShopName}添加到模板内容中');</script>");
                return;
            }
            ppsDal.UpdateNotPing(PaiPaiInfo.NotPing, template_content9.Value, days, ViewState["nick"].ToString());
        }

        else
        {
        }

        ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('设置成功');</script>");
    }