Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id   = int.Parse(Request.QueryString["id"].ToString());
            var info = new WxMaterialData().Getidinfo(id);

            if (info != null)
            {
                price  = info.Price.ToString() == null ? "" : info.Price.ToString();
                titile = info.Title.ToString() == null ? "" : info.Title.ToString();
                contxt = info.Article.ToString() == null ? "" : info.Article.ToString();
                phone  = info.Price.ToString() == null ? "" : info.Phone.ToString();
                //图片链接

                imgurl = FileSerivce.GetImgUrl(info.Imgpath.ToString().ConvertTo <int>(0));

                var wspt = new WxSalePromoteTypeData().GetWxMenu(int.Parse(info.SalePromoteTypeid.ToString()));

                if (wspt.Typename.ToString() == "精选推荐")
                {
                    type = "<a href=\"top10.aspx\">精选推荐</a> > ¥" + price + "起 -- " + titile + "";
                }
                else
                {
                    type = wspt.Typename.ToString();
                }
            }
            else
            {
                Response.Redirect("/byts/login.aspx");
                //type = "不存在文章详细,<input type=\"button\" onclick=\"javascript:history.go(-1)\" value=\"返回上一页\" />";
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id   = int.Parse(Request.QueryString["id"].ToString());
            var info = new WxMaterialData().Getidinfo(id);



            if (info != null)
            {
                titile    = info.Title.ToString() == null ? "" : info.Title.ToString();
                contxt    = info.Article.ToString() == null ? "" : info.Article.ToString();
                phone_tel = info.Phone.ToString() == null ? "" : info.Phone.ToString();
                phone     = "客服电话:";

                //所属栏目
                var wxdata = new WxSalePromoteTypeData().GetWxMenu(info.SalePromoteTypeid);
                if (wxdata != null)
                {
                    wxtype = wxdata.Typename;
                }

                //contxt.Replace("../UploadFile", "http://image.etown.cn/UploadFile");



                imgurl = "<img src=\"" + FileSerivce.GetImgUrl(info.Imgpath.ToString().ConvertTo <int>(0)) + "\">";
            }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int totalcount = 0;

            if (Session["AccountId"] != null)
            {
                //账户信息
                AccountId   = Int32.Parse(Session["AccountId"].ToString());
                AccountName = Session["AccountName"].ToString();
                AccountCard = Session["AccountCard"].ToString();
                RequestUrl  = Request.ServerVariables["SERVER_NAME"].ToLower();

                B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl);
                if (companyinfo != null)
                {
                    comid = companyinfo.Com_id;
                }

                //菜单项new WxSalePromoteTypeData()
                List <WxSalePromoteType> menulist = new WxSalePromoteTypeData().GetAllWxMaterialType(comid, out totalcount);
                menu.DataSource = menulist;
                menu.DataBind();
            }
            else
            {
                comid = 101;
                //菜单项new WxSalePromoteTypeData()
                List <WxSalePromoteType> menulist = new WxSalePromoteTypeData().GetAllWxMaterialType(comid, out totalcount);

                List <WxSalePromoteType> list = new List <WxSalePromoteType>();
                int[] i = { 0, 1, 2, 5 };
                foreach (int s in i)
                {
                    WxSalePromoteType wxmaterial = new WxSalePromoteType();

                    wxmaterial.Id       = menulist[s].Id;
                    wxmaterial.Typename = menulist[s].Typename;
                    list.Add(wxmaterial);
                }

                menu.DataSource = list;
                menu.DataBind();
            }
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            WxMaterialData Wx     = new WxMaterialData();
            WxMaterial     wmater = Wx.logGetidinfo(" SalePromoteTypeid !=4 order by operatime  desc ");

            int totalcount = 0;


            if (wmater != null)
            {
                Listtime = wmater.Operatime.ToString("yyyy-MM-dd");
            }


            ////判断如果是否为手机访问
            //if (detectmobilebrowser.HttpUserAgent(Request.ServerVariables["HTTP_USER_AGENT"]))
            //{
            //    if (Request["brow"]=="PC")//如果接收到传递PC访问则只PC版
            //    {
            //         Cookie.WriteCookie("Mobile_Brow_Set", "PC");
            //    }
            //
            //    //查看COOKIE 是否设定是否设定为PC
            //    if (Cookie.GetCookie("Mobile_Brow_Set") == "PC")
            //    {
            //    }
            //    else
            //    {
            //          Response.Redirect("/M/Default.aspx?brow=MO");
            //    }
            //}

            if (Session["AccountId"] != null)
            {
                //账户信息
                AccountId   = Int32.Parse(Session["AccountId"].ToString());
                AccountName = Session["AccountName"].ToString();
                AccountCard = Session["AccountCard"].ToString();
                RequestUrl  = Request.ServerVariables["SERVER_NAME"].ToLower();

                B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl);
                if (companyinfo != null)
                {
                    comid = companyinfo.Com_id;
                }

                if (comid != 101)
                {
                    Response.Redirect("/ui/shangjiaui/ProductList.aspx");
                }


                //会员信息
                B2bCrmData dateuser  = new B2bCrmData();
                B2b_crm    modeluser = dateuser.Readuser(AccountId, comid);

                if (modeluser != null)
                {
                    AccountWeixin = modeluser.Weixin;
                    AccountEmail  = modeluser.Email;
                    Accountphone  = modeluser.Phone;
                    Servercard    = modeluser.Servercard;
                    Imprest       = modeluser.Imprest;
                    Integral      = modeluser.Integral;
                    //密码
                    AccountPass = modeluser.Password1;
                    //微信关注
                    weixin = modeluser.Weixin == "" ? "未关注" : "已关注";
                }

                //渠道
                MemberChannelData channeldate = new MemberChannelData();

                //渠道信息
                Member_Channel channelmodel = channeldate.GetSelfChannelDetailByCardNo(AccountCard);
                if (channelmodel != null)
                {
                    channeltype = 1;
                    channelid   = channelmodel.Id;

                    RebateConsume = channelmodel.RebateConsume;
                    RebateOpen    = channelmodel.RebateOpen;
                    Opencardnum   = channelmodel.Opencardnum;
                    Firstdealnum  = channelmodel.Firstdealnum;
                    Summoney      = channelmodel.Summoney;
                }


                //服务专员信息,服务专员ID
                if (Servercard != 0)
                {
                    Member_Channel channelmode2 = channeldate.GetChannelDetail(Int32.Parse(Servercard.ToString()));
                    if (channelmode2 != null)
                    {
                        Servername   = channelmode2.Name;
                        Servermobile = channelmode2.Mobile;
                    }
                }

                //菜单项new WxSalePromoteTypeData()
                List <WxSalePromoteType> menulist = new WxSalePromoteTypeData().GetAllWxMaterialType(comid, out totalcount);

                if (comid == 101)
                {
                    List <WxSalePromoteType> list = new List <WxSalePromoteType>();
                    int[] i = { 0, 1, 2, 5, 12 };
                    foreach (int s in i)
                    {
                        WxSalePromoteType wxmaterial = new WxSalePromoteType();

                        wxmaterial.Id       = menulist[s].Id;
                        wxmaterial.Typename = menulist[s].Typename;
                        list.Add(wxmaterial);
                    }

                    menu.DataSource = list;
                    menu.DataBind();
                }
                else
                {
                    menu.DataSource = menulist;
                    menu.DataBind();
                }
            }
            else
            {
                Response.Redirect("/V/card.aspx");
            }
        }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["AccountId"] != null)
            {
                WxMaterialData Wx     = new WxMaterialData();
                WxMaterial     wmater = Wx.logGetidinfo(" SalePromoteTypeid !=4 order by operatime  desc ");

                int totalcount = 0;


                if (wmater != null)
                {
                    Listtime = wmater.Operatime.ToString("yyyy-MM-dd");
                }

                //账户信息
                AccountId   = Int32.Parse(Session["AccountId"].ToString());
                AccountName = Session["AccountName"].ToString();
                AccountCard = Session["AccountCard"].ToString();
                RequestUrl  = Request.ServerVariables["SERVER_NAME"].ToLower();

                B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl);
                if (companyinfo != null)
                {
                    comid = companyinfo.Com_id;
                }

                //会员信息
                B2bCrmData dateuser  = new B2bCrmData();
                B2b_crm    modeluser = dateuser.Readuser(AccountId, comid);

                if (modeluser != null)
                {
                    AccountWeixin = modeluser.Weixin;
                    AccountEmail  = modeluser.Email;
                    Accountphone  = modeluser.Phone;
                    Servercard    = modeluser.Servercard;
                    Imprest       = modeluser.Imprest;
                    Integral      = modeluser.Integral;
                    //密码
                    AccountPass = modeluser.Password1;
                    //微信关注
                    weixin = modeluser.Weixin == "" ? "未关注" : "已关注";
                }

                //渠道
                MemberChannelData channeldate = new MemberChannelData();

                //渠道信息
                Member_Channel channelmodel = channeldate.GetSelfChannelDetailByCardNo(AccountCard);
                if (channelmodel != null)
                {
                    channeltype = 1;
                    channelid   = channelmodel.Id;

                    RebateConsume = channelmodel.RebateConsume;
                    RebateOpen    = channelmodel.RebateOpen;
                    Opencardnum   = channelmodel.Opencardnum;
                    Firstdealnum  = channelmodel.Firstdealnum;
                    Summoney      = channelmodel.Summoney;
                }


                //服务专员信息,服务专员ID
                if (Servercard != 0)
                {
                    Member_Channel channelmode2 = channeldate.GetChannelDetail(Int32.Parse(Servercard.ToString()));
                    if (channelmode2 != null)
                    {
                        Servername   = channelmode2.Name;
                        Servermobile = channelmode2.Mobile;
                    }
                }

                ////菜单项new WxSalePromoteTypeData()
                //List<WxSalePromoteType> menulist = new WxSalePromoteTypeData().GetAllWxMaterialType(comid, out totalcount);

                //菜单项new WxSalePromoteTypeData()
                List <WxSalePromoteType> menulist = new WxSalePromoteTypeData().GetRecommendWxMaterialType(comid, out totalcount);

                if (comid == 101)
                {
                    List <WxSalePromoteType> list = new List <WxSalePromoteType>();
                    int[] i = { 0, 1, 2, 5, 12 };
                    foreach (int s in i)
                    {
                        WxSalePromoteType wxmaterial = new WxSalePromoteType();

                        wxmaterial.Id       = menulist[s].Id;
                        wxmaterial.Typename = menulist[s].Typename;
                        list.Add(wxmaterial);
                    }

                    menu.DataSource = list;
                    menu.DataBind();
                }
                else
                {
                    menu.DataSource = menulist;
                    menu.DataBind();
                }

                //得到微信会员卡说明和使用门店说明
                int ttcount = 0;
                mcMaterilList = new MemberShipCardMaterialData().GetMCMateralListByComId(comid, out ttcount);
            }
            else
            {
                Response.Redirect("/byts/login.aspx");
            }
        }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            WxMaterialData Wx     = new WxMaterialData();
            WxMaterial     wmater = Wx.logGetidinfo(" SalePromoteTypeid !=4 order by operatime  desc ");

            int totalcount = 0;


            if (wmater != null)
            {
                Listtime = wmater.Operatime.ToString("yyyy-MM-dd");
            }
            RequestUrl = Request.ServerVariables["SERVER_NAME"].ToString();
            comid      = Request["comid"].ConvertTo <int>(0);
            B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl);

            if (companyinfo != null)
            {
                comid = companyinfo.Com_id;
            }
            else
            { //判定是否为自助域名规则安 shop1.etown.cn
                if (Domain_def.Domain_yanzheng(RequestUrl))
                {
                    comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl));
                }
            }

            if (comid != 0)
            {
                B2b_company com = B2bCompanyData.GetAllComMsg(comid);

                if (com != null)
                {
                    Com_name     = com.Com_name;
                    Scenic_name  = com.Scenic_name;
                    Scenic_intro = com.B2bcompanyinfo.Scenic_intro;
                }
            }



            //菜单项new WxSalePromoteTypeData()
            List <WxSalePromoteType> menulist = new WxSalePromoteTypeData().GetAllWxMaterialType(comid, out totalcount);

            if (comid == 101)
            {
                List <WxSalePromoteType> list = new List <WxSalePromoteType>();
                int[] i = { 0, 1, 2, 5, 12 };
                foreach (int s in i)
                {
                    WxSalePromoteType wxmaterial = new WxSalePromoteType();

                    wxmaterial.Id       = menulist[s].Id;
                    wxmaterial.Typename = menulist[s].Typename;
                    list.Add(wxmaterial);
                }

                menu.DataSource = list;
                menu.DataBind();
            }
            else
            {
                List <WxSalePromoteType> list = new List <WxSalePromoteType>();
                //int[] i = { 0, 1, 2, 5, 12 };
                for (int s = 0; s < menulist.Count; s++)
                {
                    WxSalePromoteType wxmaterial = new WxSalePromoteType();

                    wxmaterial.Id       = menulist[s].Id;
                    wxmaterial.Typename = menulist[s].Typename;

                    var period = new WxMaterialData().GetPeriodicalBySaleType(comid, menulist[s].Id);
                    if (period != null)
                    {
                        list.Add(wxmaterial);
                    }
                }

                menu.DataSource = list;
                menu.DataBind();
            }
        }