protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request["like"] != null && Request["like"] != "")
         {
             AspNetPager1.CurrentPageIndex = 1;
             like = Common.Common.NoHtml(Request["like"]);
             like = " and a.ptitle like '%" + like + "%' ";
             if (Request["cid"] != null && Request["cid"] != "")
             {
                 cid = " and a.CID='" + Request["cid"] + "' ";
             }
             string where     = string.Empty;
             where            = like + upid + cid;
             ViewState[vsKey] = where;
             errorscript      = "";
             LoadData(where);
         }
         else
         {
             errorscript = JQDialog.alertOKMsgBoxGoBack(3, "操作失败<br/>您暂时没有权限访问!", true);
         }
     }
 }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request["fid"] != null && Request["fid"] != "")
         {
             errorscript = "";
             strfid      = Common.Common.NoHtml(Request["fid"]);
         }
         else
         {
             errorscript = JQDialog.alertOkMsgBoxClearBody(2, "操作失败<br/>请核对后再操作!");
         }
         if (Request["uid"] != null && Request["uid"] != "")
         {
             strUid = Common.Common.NoHtml(Request["uid"]);
         }
         else
         {
             errorscript = JQDialog.alertOKMsgBoxGoBack(2, "操作失败<br/>请核对后再操作!", true);
         }
         if (Session["customerID"] != null && Session["customerID"].ToString() != "")
         {
             strMyUid = Session["customerID"].ToString();
         }
         getTemplate();
     }
 }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                errorscript = "";
                if (Request["sid"] != null && Request["sid"].ToString() != "")
                {
                    sid = Request["sid"].ToString();
                }

                if (Session["customerID"] != null && Session["customerID"].ToString() != "")
                {
                    customerid = Session["customerID"].ToString();
                    if (Request["pid"] != null && Request["pid"].ToString() != "")
                    {
                        pid = Request["pid"].ToString();
                    }
                    else
                    {
                        JQDialog.SetCookies("pageurl", "MyShop.aspx", 1);
                        errorscript = JQDialog.alertOKMsgBoxGoBack(3, "操作失败<br/>请登录后再操作!", true);
                    }
                    if (Request["action"] != null && Request["action"] != "")
                    {
                        action = Request["action"];
                    }
                    if (action.Trim() != null && action.Trim() != "")
                    {
                        switch (action.ToLower().Trim())
                        {
                        case "getcateoption":
                            GetOptionList();
                            break;

                        case "edite":
                            ProductEdite();
                            break;

                        case "delimg":
                            DelImg();
                            break;

                        case "delpara":
                            DelPara();
                            break;
                        }
                    }
                }
                else
                {
                    JQDialog.SetCookies("pageurl", "MyShop.aspx", 1);
                    errorscript = JQDialog.alertOKMsgBox(3, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error");
                }
                GetHtmlInfo();
            }
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request["mid"] != null && Request["mid"] != "")
                {
                    mid = Common.Common.NoHtml(Request["mid"]);
                }
                if (Request["pid"] != null && Request["pid"] != "" && Request["num"] != null && Request["num"] != "")
                {
                    errorscript = "";
                    strpid      = Common.Common.NoHtml(Request["pid"]);
                    quantity    = Common.Common.NoHtml(Request["num"]);
                    if (Session["customerID"] != null && Session["customerID"].ToString() != "")
                    {
                        customid = Session["customerID"].ToString();
                        GetOpenId();
                        if (Request["action"] != null && Request["action"] != "")
                        {
                            action = Request["action"];
                            action = action.ToLower().Trim();
                            switch (action)
                            {
                            case "setorder":
                                setAddOrder(); return;

                            case "setda":
                                setUserAddress(); return;

                            case "updalist":
                                setUserAddress();
                                return;

                            case "getdalist":
                                GetUserAddress();
                                return;
                            }
                        }
                    }
                    else
                    {
                        setCookies();
                        errorscript = JQDialog.alertOKMsgBox(3, "操作失败<br/>请登录后再操作!", "UserLogin.aspx", "error");
                    }
                }
                else
                {
                    errorscript = JQDialog.alertOKMsgBoxGoBack(3, "操作失败<br/>您暂时没有权限访问!", true);
                }
                GetInfo();
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["customerID"] != null && Session["customerID"].ToString() != "")
         {
             customid = Session["customerID"].ToString();
         }
         if (Request["pid"] != null && Request["pid"] != "")
         {
             strpid      = Common.Common.NoHtml(Request["pid"]);
             errorscript = "";
             if (Request["action"] != null && Request["action"] != "")
             {
                 action = Common.Common.NoHtml(Request["action"]);
                 if (action.ToLower().Trim() == "setcart")
                 {
                     if (customid != null && customid.ToString() != "")
                     {
                         setAddCart();
                     }
                     else
                     {
                         setCookies();
                         Response.Write("{\"error\":true,\"msg\":\"操作失败," +
                                        "请登录后再操作\",\"loginurl\":\"UserLogin.aspx\"}");
                     }
                     Response.End();
                 }
             }
             else
             {
                 GetProductDetail();
             }
         }
         else
         {
             errorscript = JQDialog.alertOKMsgBoxGoBack(2, "操作失败<br/>您暂时没有权限访问该页面!", true);
             GetProductDetail();
             return;
         }
     }
 }
示例#6
0
        void repcomment()
        {
            string       commentdesc = string.Empty;
            StreamReader rd          = new StreamReader(Server.MapPath("emotion/key.txt"));
            string       keyword     = rd.ReadLine();

            try
            {
                commentdesc = HttpContext.Current.Request.Form.Get("commentdesc").ToString();
            }
            catch (Exception)
            {
                commentdesc = "";
            }
            if (commentdesc.Trim() != null && commentdesc.Trim() != "")
            {
                commentdesc = JQDialog.FilterKeyWord(commentdesc, keyword);
                commentdesc = JQDialog.GetTextFromHTML(commentdesc);
                MSForumComment    commentModel = new MSForumComment();
                MSForumCommentDAL commentDal   = new MSForumCommentDAL();
                commentModel.ID     = Guid.NewGuid().ToString("N").ToUpper();
                commentModel.Ctext  = commentdesc;
                commentModel.Review = 1;
                commentModel.TID    = strTid;
                commentModel.UID    = strUid;
                commentModel.UpID   = strupid;
                commentModel.Cstate = 0;
                if (commentDal.AddComment(commentModel))
                {
                    errorscript =
                        JQDialog.alertOKMsgBox(3, "回复成功", "MyCommentList.aspx?fid=" + strfid, "error");
                }
                else
                {
                    errorscript = JQDialog.alertOKMsgBoxGoBack(3, "操作失败<br/>请核对后再操作!", true);
                }
            }
            else
            {
                errorscript = JQDialog.alertOKMsgBoxGoBack(3, "操作失败<br/>请重新再操作!", true);
            }
        }
示例#7
0
        void pubcomment()
        {
            string commentdesc = string.Empty;

            try
            {
                commentdesc = HttpContext.Current.Request.Form.Get("commentdesc").ToString();
            }
            catch (Exception)
            {
                commentdesc = "";
            }
            if (commentdesc.Trim() != null && commentdesc.Trim() != "")
            {
                MSForumComment    commentModel = new MSForumComment();
                MSForumCommentDAL commentDal   = new MSForumCommentDAL();
                strcommid           = Guid.NewGuid().ToString("N").ToUpper();
                commentModel.ID     = strcommid;
                commentModel.Ctext  = commentdesc;
                commentModel.Review = 1;
                commentModel.TID    = strTid;
                commentModel.UID    = strUid;
                commentModel.UpID   = "";
                commentModel.Cstate = 0;
                SaveImages();
                if (commentDal.AddComment(commentModel))
                {
                    errorscript =
                        JQDialog.alertOKMsgBox(3, "评论成功", "CommentList.aspx?fid=" +
                                               strfid + "&tid=" + strTid, "succeed");
                }
                else
                {
                    errorscript = JQDialog.alertOKMsgBoxGoBack(3, "操作失败<br/>请核对后再操作!", true);
                }
            }
            else
            {
                errorscript = JQDialog.alertOKMsgBoxGoBack(3, "操作失败<br/>请重新再操作!", true);
            }
        }
示例#8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         errorscript = "";
         if (Request["fid"] != null && Request["fid"] != "")
         {
             strfid = Common.Common.NoHtml(Request["fid"]);
         }
         if (Request["upid"] != null && Request["upid"] != "")
         {
             strupid = Common.Common.NoHtml(Request["upid"]);
         }
         else
         {
             errorscript = JQDialog.alertOKMsgBoxGoBack(2, "操作失败<br/>请核对后再操作!", true);
         }
         if (Request["tid"] != null && Request["tid"] != "")
         {
             strTid = Common.Common.NoHtml(Request["tid"]);
         }
         if (Session["customerID"] != null && Session["customerID"].ToString() != "")
         {
             strUid = Common.Common.NoHtml(Session["customerID"].ToString());
             if (Request["action"] != null && Request["action"] != "" &&
                 Request["action"].ToString().ToLower() == "repmsg")
             {
                 repcomment();
             }
         }
         else
         {
             JQDialog.SetCookies("pageurl", "../../Comment/CommentList.aspx?tid=" + strTid, 2);
             errorscript = JQDialog.alertOKMsgBox(5, "操作失败<br/>请登录后再操作!",
                                                  "../PalmShop/ShopCode/UserLogin.aspx", "error");
         }
         getTemplate();
     }
 }
示例#9
0
        /// <summary>
        /// 订单提交
        /// </summary>
        void submitOrder()
        {
            string ordernum = string.Empty; int imgcount = 0;
            string img1 = string.Empty; string img2 = string.Empty;
            string openid = string.Empty; string userid = string.Empty;

            if (Session["OpenID"] != null && Session["OpenID"].ToString() != "")
            {
                openid = Session["OpenID"].ToString();
            }
            if (openid != null && openid != "")
            {
                MSCustomersDAL customerDal = new MSCustomersDAL();
                try
                {
                    userid = customerDal.GetCustomerValueByOpenID("ID", openid).ToString();
                }
                catch (Exception)
                {
                }
            }
            #region -------------获取请求值------------
            try
            {
                ordernum = Request.Form.Get("ordernum").ToString();
            }
            catch (Exception)
            {
                ordernum = "";
            }
            #endregion
            try
            {
                imgcount = Request.Files.Count;
            }
            catch (Exception)
            {
            }
            if (imgcount == 2)
            {
                img1 = UploadImg(0, "printimg", ordernum);
                img2 = UploadImg(1, "shareimg", ordernum);
                if (userid == null || userid == "" && ordernum != null && ordernum != "")
                {
                    MSProductOrderDAL orderDal = new MSProductOrderDAL();
                    userid = orderDal.GetOrderValueByID("CustomerID", ordernum).ToString();
                }
                if (ordernum != null && ordernum != "")
                {
                    MSPhotoSubmit    photoModel = new MSPhotoSubmit();
                    MSPhotoSubmitDAL photoDal   = new MSPhotoSubmitDAL();
                    photoModel.OrderNum = ordernum;
                    photoModel.Img1     = img1;
                    photoModel.Img2     = img2;
                    photoModel.UID      = userid;
                    photoModel.ID       = Guid.NewGuid().ToString("N").ToUpper();
                    if (!photoDal.AddPhotoSubmit(photoModel))
                    {
                        errormsg = JQDialog.alertOKMsgBoxGoBack(3, "操作失败,请重新操作!", false);
                    }
                    else
                    {
                        errormsg = JQDialog.alertOKMsgBox(3, "操作成功,请等待审核!", "PrintImgOrder.aspx", "succeed");
                    }
                }
                else
                {
                    errormsg = JQDialog.alertOKMsgBoxGoBack(3, "请输入正确的订单!", false);
                }
            }
            else
            {
                errormsg = JQDialog.alertOKMsgBoxGoBack(3, "请选择您要打印的照片和分享的照片!", false);
            }
        }
示例#10
0
        /// <summary>
        /// 提交订单
        /// </summary>
        void submitOrder()
        {
            string oid = string.Empty; string cid = string.Empty; string cname = string.Empty;

            #region -获取页面请求值
            try
            {
                oid = Request.Form.Get("ordernum").ToString();
            }
            catch (Exception)
            {
                oid = "";
            }
            try
            {
                cname = Request.Form.Get("cname").ToString();
            }
            catch (Exception)
            {
                cname = "";
            }
            try
            {
                cid = Request.Form.Get("cid").ToString();
            }
            catch (Exception)
            {
                cid = "";
            }
            #endregion
            strSiteCode = "VYIGO"; string customerid = string.Empty; string openid = string.Empty;
            if (oid != null && oid != "" && cid != null && cid != "")
            {
                MSOrderLogistics    olModel  = new MSOrderLogistics();
                MSOrderLogisticsDAL olDal    = new MSOrderLogisticsDAL();
                MSProductOrderDAL   OrderDal = new MSProductOrderDAL();
                olModel.ID = cid; olModel.OID = oid; olModel.CName = cname;

                customerid = OrderDal.GetOrderValueByID("CustomerID", oid).ToString();

                if (customerid != null && customerid != "")
                {
                    MSCustomersDAL customerDal = new MSCustomersDAL();
                    openid = customerDal.GetCustomerValueByID("OpenID", customerid).ToString();
                }

                if (olDal.AddOrderLogistics(olModel) && OrderDal.UpdateOrderState("IsSend", oid))
                {
                    string buyName = string.Empty;
                    try
                    {
                        buyName = OrderDal.GetOrderValueByID("BuyName", oid).ToString();
                        WeiXinCore.WeiXin           wx        = WXHelper.CreateWeiXinInstanceBySiteCode(strSiteCode);
                        List <TemplateMessageParam> paramList = new List <TemplateMessageParam>();
                        paramList.Add(new TemplateMessageParam("first", "亲,宝贝已经启程了,好想快点来到你身边"));
                        paramList.Add(new TemplateMessageParam("delivername", cname));
                        paramList.Add(new TemplateMessageParam("ordername", cid));
                        paramList.Add(new TemplateMessageParam("remark",
                                                               "请关注公众号【vgo2013】进入“快点我”查看完整物流信息"));
                        SendTemplateMessageReturnObj temobj = wx.SendTemplateMessage(openid,
                                                                                     "k4eMeEtKReeDvDRFAf8-Li9FuuHkaFPP1xQI6t3Jomo",
                                                                                     "http://www.vgo2013.com/PalmShop/ShopCode/CopyOrder.aspx?oid=" + oid,
                                                                                     paramList.ToArray(), "");
                        MSOrderLogDAL.AddMSOrderLog("提示客户订单【" + oid + "】已经发货,发送模板消息到客户OpenID【" + openid + "】");
                        bool flag = true;
                        if (flag)
                        {
                        }
                    }
                    catch { }

                    errormsg = JQDialog.alertOKMsgBox(3, "操作成功!", "OrderDelivery.aspx", "succeed");
                }
                else
                {
                    errormsg = JQDialog.alertOKMsgBoxGoBack(3, "操作失败,请重新操作!", false);
                }
            }
            else
            {
                errormsg = JQDialog.alertOKMsgBoxGoBack(3, "操作失败,请重新操作!", false);
            }
        }
示例#11
0
        void topicpublish()
        {
            string topicdesc = string.Empty;

            #region --------获取标题和内容---------------
            try
            {
                topictitle = HttpContext.Current.Request.Form.Get("topictitle").ToString();
            }
            catch (Exception)
            {
                topictitle = "";
            }
            try
            {
                topicdesc = HttpContext.Current.Request.Form.Get("topicdeschidden").ToString();
            }
            catch (Exception)
            {
                topicdesc = "";
            }
            #endregion
            MSForumTopicDAL forumtopicDal   = new MSForumTopicDAL();
            MSForumTopic    forumtopicModel = new MSForumTopic();
            StreamReader    rd      = new StreamReader(Server.MapPath("emotion/key.txt"));
            string          keyword = rd.ReadLine();
            if (topictitle != null && topictitle != "")
            {
                topictitle = JQDialog.FilterKeyWord(topictitle, keyword);
                topictitle = JQDialog.GetTextFromHTML(topictitle);
                forumtopicModel.TopicTitle = topictitle;
            }
            if (topicdesc != null && topicdesc != "")
            {
                topicdesc = JQDialog.FilterKeyWord(topicdesc, keyword);
                topicdesc = JQDialog.GetTextFromHTML(topicdesc);
                forumtopicModel.TopicDesc = topicdesc;
            }
            if (!forumtopicDal.ExistMSForumTopic(topictitle, strfid, strUid))
            {
                strTid                     = Guid.NewGuid().ToString("N").ToUpper();
                forumtopicModel.ID         = strTid;
                forumtopicModel.TopicState = 0;
                forumtopicModel.FID        = strfid;
                forumtopicModel.Treview    = 1;
                forumtopicModel.UID        = strUid;
                SaveImages();
                if (forumtopicDal.AddMSForumTopic(forumtopicModel))
                {
                    errorscript = JQDialog.alertOKMsgBox(5, "操作成功", "MyTopicList.aspx?fid=" + strfid, "succeed");
                }
                else
                {
                    errorscript = JQDialog.alertOKMsgBoxGoBack(5, "操作失败<br/>请核对后再操作!", true);
                }
            }
            else
            {
                errorscript = JQDialog.alertOKMsgBoxGoBack(5, "操作失败<br/>请核对后再操作!", true);
            }
        }