예제 #1
0
        /// <summary>
        /// 返回列表
        /// </summary>
        protected void initList()
        {
            Eyousoft_yhq.BLL.Product      bll        = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.PurductName = prodectName;
            serchModel.PurductType = productType;
            serchModel.isVisable   = false;
            serchModel.isHot       = Utils.GetIntNull(tuijian);
            serchModel.WeiDianId   = Utils.GetQueryStringValue("weidianid");
            if (!string.IsNullOrEmpty(xianlu))
            {
                serchModel.xianlu = (Eyousoft_yhq.Model.XianLu)Utils.GetInt(xianlu);
            }
            var list   = bll.GetList(pagesize, pageindex, ref recordCount, serchModel);
            int isPage = 0;

            if (recordCount % pagesize != 0)
            {
                isPage = recordCount / pagesize + 1;
            }
            else
            {
                isPage = recordCount / pagesize;
            }
            if (list != null && list.Count > 0)
            {
                if (isPage >= pageindex)
                {
                    rpt_list.DataSource = list;
                    rpt_list.DataBind();
                }
            }
        }
예제 #2
0
파일: Index.aspx.cs 프로젝트: ichoukou/yhq
        /// <summary>
        /// 初始化页面
        /// </summary>
        protected void InitList()
        {
            Eyousoft_yhq.Model.SerProduct serModel = new Eyousoft_yhq.Model.SerProduct();
            serModel.PType       = Utils.GetInt(Utils.GetQueryStringValue("tp"));
            serModel.PurductName = Utils.GetQueryStringValue("keys");
            serModel.SFTJ        = Utils.GetInt(Utils.GetQueryStringValue("ishot"));
            serModel.DDXL        = Utils.GetInt(Utils.GetQueryStringValue("sale"));
            serModel.SJPX        = Utils.GetInt(Utils.GetQueryStringValue("issue"));
            serModel.JGPX        = Utils.GetInt(Utils.GetQueryStringValue("price"));
            int Productype = Utils.GetInt(Utils.GetQueryStringValue("routype"));

            serModel.PurductType = Productype > 0 ? Productype.ToString() : "";

            #region 输出样式
            //tj = getClass(serModel.SFTJ);
            xl = getClass(serModel.DDXL);
            zx = getClass(serModel.SJPX);
            jg = getClass(serModel.JGPX);
            #endregion


            pageIndex = UtilsCommons.GetPagingIndex("Page");
            IList <Eyousoft_yhq.Model.Product> list = new Eyousoft_yhq.BLL.Product().GetList(pageSize, pageIndex, ref recordCount, serModel);

            UtilsCommons.Paging(pageSize, ref pageIndex, recordCount);
            string pagingScript = "pagingConfig.pageSize={0};pagingConfig.pageIndex={1};pagingConfig.recordCount={2};";
            if (list != null && list.Count > 0)
            {
                rpt_products.DataSource = list;
                rpt_products.DataBind();
            }
            RegisterScript(string.Format(pagingScript, pageSize, pageIndex, recordCount));
        }
예제 #3
0
        protected void initList()
        {
            Eyousoft_yhq.BLL.Product      bll        = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.PurductName = Utils.GetQueryStringValue("productName");


            if (Utils.GetQueryStringValue("proType") == "-2")
            {
                serchModel.PType = 2;
            }
            else if (Utils.GetQueryStringValue("proType") == "-3")
            {
                serchModel.PType = 3;
            }
            else
            {
                serchModel.PurductType = Utils.GetQueryStringValue("proType");
                serchModel.PType       = 1;
            }
            serchModel.isVisable = false;
            var list = bll.GetList(pagesize, pageindex, ref recordCount, serchModel);

            if (list != null && list.Count > 0)
            {
                rpt_list.DataSource = list;
                rpt_list.DataBind();
            }
            else
            {
                PlaceHolder1.Visible = false;
            }
        }
예제 #4
0
        /// <summary>
        /// 返回列表
        /// </summary>
        protected void initList()
        {
            Eyousoft_yhq.BLL.Product bll = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.PurductName = prodectName;
            serchModel.PurductType = productType;
            serchModel.isVisable = false;
            serchModel.isHot = Utils.GetIntNull(tuijian);
            serchModel.WeiDianId = Utils.GetQueryStringValue("weidianid");
            if (!string.IsNullOrEmpty(xianlu)) serchModel.xianlu = (Eyousoft_yhq.Model.XianLu)Utils.GetInt(xianlu);
            var list = bll.GetList(pagesize, pageindex, ref recordCount, serchModel);
            int isPage = 0;
            if (recordCount % pagesize != 0)
            {
                isPage = recordCount / pagesize + 1;
            }
            else
            {
                isPage = recordCount / pagesize;
            }
            if (list != null && list.Count > 0)
            {

                if (isPage >= pageindex)
                {
                    rpt_list.DataSource = list;
                    rpt_list.DataBind();
                }

            }
        }
예제 #5
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        private void initPage()
        {
            string id        = Utils.GetQueryStringValue("id");
            int    orderNums = 1;
            var    model     = new Eyousoft_yhq.BLL.Product().GetModel(id);

            if (model != null)
            {
                lbl_Pname.Text = model.ProductName;
                lbl_Price.Text = model.AppPrice.ToString("C0");
                decimal getPrice = orderNums * model.AppPrice;
                singlePirce.Value   = model.AppPrice.ToString("0");
                sumPirce.Value      = model.AppPrice.ToString("0");
                lbl_SumPrice.Text   = getPrice.ToString("C0");
                lbl_orderPrice.Text = getPrice.ToString("0");
                numS = model.ResidueNum;
            }

            var MemberModel = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();

            if (MemberModel != null)
            {
                Gname   = MemberModel.ContactName;
                Gmobile = MemberModel.UserName;
            }
        }
예제 #6
0
        /// <summary>
        /// 产品审核
        /// </summary>
        void ShenHe()
        {
            if (HuiYuanInfo.LeiXing == Eyousoft_yhq.Model.WebmasterLeiXing.供应商)
            {
                Utils.RCWE_AJAX("0", "你没有审核权限");
            }

            var txtChanPinId = Utils.GetFormValues("txtChanPinId[]");

            if (txtChanPinId == null || txtChanPinId.Length == 0)
            {
                Utils.RCWE_AJAX("0", "请选择需要审核的产品");
            }

            var items = new List <string>();

            foreach (var item in txtChanPinId)
            {
                items.Add(item);
            }

            int bllRetCode = new Eyousoft_yhq.BLL.Product().ChanPinShenHe(items);

            if (bllRetCode == 1)
            {
                Utils.RCWE_AJAX("1", "操作成功");
            }
            else
            {
                Utils.RCWE_AJAX("0", "操作失败");
            }
        }
예제 #7
0
 protected string getProImg(string id)
 {
     var img = new Eyousoft_yhq.BLL.Product().GetModel(id);
     if (img != null && img.AttachList != null && img.AttachList.Count > 0)
     {
         return img.AttachList[0].FilePath;
     }
     return "/images/pic01.jpg";
 }
예제 #8
0
        protected string getProImg(string id)
        {
            var img = new Eyousoft_yhq.BLL.Product().GetModel(id);

            if (img != null && img.AttachList != null && img.AttachList.Count > 0)
            {
                return(img.AttachList[0].FilePath);
            }
            return("/images/pic01.jpg");
        }
예제 #9
0
 /// <summary>
 /// 获取产品图片
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 protected string getProImg(string id)
 {
     var img = new Eyousoft_yhq.BLL.Product().GetModel(id).AttachList;
     if (img != null && img.Count > 0)
     {
         for (int i = 0; i < img.Count; i++)
         {
             if (img[i].IsWebImage && !string.IsNullOrEmpty(img[i].FilePath)) return img[i].FilePath;
         }
     }
     return "/images/list_img.gif";
 }
예제 #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     var order = new Eyousoft_yhq.BLL.Order().GetModel(EyouSoft.Common.Utils.GetQueryStringValue("id"));
     if (order == null) return;
     lblVcode.Text = order.ConfirmCode;
     var product = new Eyousoft_yhq.BLL.Product().GetModel(order.ProductID);
     if (product == null) return;
     lblName.Text = product.ProductName;
     lblVdate.Text = string.Format("{0}", product.ValidiDate.ToString("yyyy年MM月dd日"));
     string data = string.Format("{0}|{1}|{2}|{3}|{4}", "order", order.OrderID, product.ProductName, order.MemberName, order.ConfirmCode);
     lblCodeImg.Text = string.Format(" <img src={0} />", EyouSoft.Common.Utils.CreateZxingCode(data));
 }
예제 #11
0
파일: WinXin.cs 프로젝트: ichoukou/yhq
        /// <summary>
        /// 产品码查询
        /// </summary>
        /// <param name="ToUserName">请求人</param>
        /// <param name="FromUserName">服务号OpenId</param>
        /// <returns></returns>
        private bool NewsList(TextReceiveMessage msg, params object[] args)
        {
            string msgWord = msg.Content.ToLower();

            if (msgWord.StartsWith("h"))
            {
                var usermodel = WeiXin.GetUserInfo(msg.FromUserName);
                if (usermodel != null)
                {
                    List <NewsReplyMessageItem> items = new List <NewsReplyMessageItem>();
                    int    rowsCount = 0;
                    string wxm       = msgWord.Substring(1);
                    var    list      = new Eyousoft_yhq.BLL.Product().GetList(1, 1, ref rowsCount, new Eyousoft_yhq.Model.SerProduct()
                    {
                        FavourCode = wxm
                    });
                    NewsReplyMessageItem NewsPicHeader = new NewsReplyMessageItem();
                    if (list != null && list.Count > 0)
                    {
                        NewsPicHeader.Description = EyouSoft.Common.Utils.GetText2(list[0].ProductDis, 50, true);
                        NewsPicHeader.Url         = "http://www.4008005216.com/AppPage/weixin/ProductInfo.aspx?id=" + list[0].ProductID;
                        NewsPicHeader.PicUrl      = (list[0].AttachList != null && list[0].AttachList.Count > 0) ? list[0].AttachList[0].FilePath : "";
                        NewsPicHeader.Title       = list[0].ProductName;
                    }
                    ;
                    items.Add(NewsPicHeader);

                    NewsReplyMessage replyMsg = new NewsReplyMessage()
                    {
                        CreateTime   = Tools.ConvertDateTimeInt(DateTime.Now),
                        FromUserName = msg.ToUserName,
                        ToUserName   = msg.FromUserName,
                        Articles     = items
                    };
                    if (list == null || list.Count == 0)
                    {
                        MessageHandler.SendTextReplyMessage(msg.ToUserName, msg.FromUserName, "查询产品不存在!");
                        return(true);
                    }
                    MessageHandler.SendReplyMessage(replyMsg);
                }
                else
                {
                    MessageHandler.SendTextReplyMessage(msg.ToUserName, msg.FromUserName, "获取用户信息失败!" + msg.FromUserName);
                }
            }
            else
            {
                MessageHandler.SendTextReplyMessage(msg.ToUserName, msg.FromUserName, "亲!您的问题我不明白,要不您换个问法再试试,我这里只要输入5位产品码就行了。或者您可以进入\"旅游超市\"按分类查询。!");
            }
            return(true);
        }
예제 #12
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected void InitBind()
        {
            Eyousoft_yhq.BLL.Product PBll = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct PModel = new Eyousoft_yhq.Model.SerProduct();
            PModel.SFTJ = 1;

            IList<Eyousoft_yhq.Model.Product> list = PBll.GetList(pageSize, pageIndex, ref recordCount, PModel);
            if (list != null && list.Count > 0)
            {
                rpList.DataSource = list;
                rpList.DataBind();
            }
        }
예제 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string youjiid = Utils.GetQueryStringValue("YouJiId");
            var    list    = new Eyousoft_yhq.BLL.BYouJi().GetModel(youjiid);

            if (list != null)
            {
                #region 获取会员头像和名称
                var info = new Eyousoft_yhq.BLL.Member().GetModel(list.HuiYuanId);
                if (info != null)
                {
                    string TuXiangFilepath = info.TuXiangFilepath;
                    if (string.IsNullOrEmpty(TuXiangFilepath))
                    {
                        TuXiangFilepath = "/images/weixin/head_no.png";
                    }
                    string FenXiangLianJie = string.Format("<a href=\"http://{0}/huiyuanweixin/mingpian.aspx?mingpianid={1}&eventkey=qrscene_01\"><img  src=\"{2}\"></a>", HOST, info.MingPianId, TuXiangFilepath);
                    ltrTouXiang.Text  = FenXiangLianJie;
                    ltrMingCheng.Text = info.ContactName;
                }
                #endregion

                LtrTitle.Text = yjtitle = list.YouJiTitle;
                int rowsCount = 0;
                var item      = new Eyousoft_yhq.BLL.Product().GetList(1, 1, ref rowsCount, new Eyousoft_yhq.Model.SerProduct()
                {
                    FavourCode = string.IsNullOrEmpty(list.WeiXinMa) ? "-999" : list.WeiXinMa
                });
                if (item != null && item.Count > 0)
                {
                    ChanPinLink.Text = "<div style=\"text-align:center; font-size:14px;\"><a href=\"/AppPage/weixin/ProductInfo.aspx?id=" + item[0].ProductID + "&weidianid=" + new Eyousoft_yhq.BLL.BWeiDian().GetWeiDianId(list.HuiYuanId) + "\">[查看相关产品及预定]</a></div>";
                }
                if (list.YouJiContent[0].XingChengContent.Length > 30)
                {
                    yjdesc = list.YouJiContent[0].XingChengContent.Substring(0, 30);
                }
                else
                {
                    yjdesc = list.YouJiContent[0].XingChengContent;
                }
                if (!string.IsNullOrEmpty(list.YouJiContent[0].ImgFile))
                {
                    yjimg = list.YouJiContent[0].ImgFile;
                }

                rptList.DataSource = list.YouJiContent;
                rptList.DataBind();
            }
        }
예제 #14
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        /// <param name="id">产品编号</param>
        protected void pageInit(string id)
        {
            var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();

            if (model != null)
            {
                hybh = model.UserID;
            }
            Eyousoft_yhq.BLL.Product bll = new Eyousoft_yhq.BLL.Product();
            gModel = new Eyousoft_yhq.Model.Product();
            gModel = bll.GetModel(id);
            if (gModel != null)
            {
                lbl_ProName.Text = gModel.ProductName;
                shichangjia      = gModel.MarketPrice.ToString("C0");
                appjia           = gModel.AppPrice.ToString("C0");
                dianhua          = gModel.LinkTel;
                descript         = Utils.GetText2(gModel.ProductDis, 30, true);
                //Lit_chutuan.Text = gModel.SendTourKnow.Replace("\n", "<br/>");
                //Lit_conpair.Text = gModel.Scompare.Replace("\n", "<br/>");

                //Lit_xingcheng.Text = gModel.TourDis.Replace("\n", "<br/>");
                //Lit_jieshao.Text = gModel.ProductDis.Replace("\n", "<br/>");
                yhm        = gModel.FavourCode;
                pinglunshu = new Eyousoft_yhq.BLL.Comment().GetCountNum(gModel.ProductID).ToString();
                if (DateTime.Compare(DateTime.Now, Utils.GetDateTime(gModel.ValidiDate.ToString())) > 0 && !gModel.IsEveryDay)
                {
                    spanResult.Visible = false;
                }
                switch (gModel.PType)
                {
                case 2:
                    lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">使用须知</li></ul></h3><div class=\"contentbox\"><div>{0}</div><div style=\"display: none\">{1}</div> </div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>", gModel.ProductDis.Replace("\n", "<br/>"), gModel.SendTourKnow.Replace("\n", "<br/>"));
                    break;

                case 3:
                    lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">使用须知</li></ul></h3><div class=\"contentbox\"><div>{0}</div><div style=\"display: none\">{1}</div> </div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>", gModel.ProductDis.Replace("\n", "<br/>"), gModel.SendTourKnow.Replace("\n", "<br/>"));
                    break;

                default:
                    lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">参考行程</li><li li_index=\"3\">出团须知</li><li li_index=\"4\">同类比较</li></ul></h3><div class=\"contentbox\"><div>{0}</div><div style=\"display: none\">{1}</div> <div style=\"display: none\">{2}</div><div style=\"display: none\">{3}</div></div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>", gModel.ProductDis.Replace("\n", "<br/>"), gModel.TourDis.Replace("\n", "<br/>"), gModel.SendTourKnow.Replace("\n", "<br/>"), gModel.Scompare);
                    break;
                }
            }
            else
            {
                lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">参考行程</li><li li_index=\"3\">出团须知</li><li li_index=\"4\">同类比较</li></ul></h3><div class=\"contentbox\"><div></div><div style=\"display: none\"></div> <div style=\"display: none\"></div><div style=\"display: none\"></div></div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>");
            }
        }
예제 #15
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected void InitBind()
        {
            Eyousoft_yhq.BLL.Product      PBll   = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct PModel = new Eyousoft_yhq.Model.SerProduct();
            PModel.SFTJ = 1;


            IList <Eyousoft_yhq.Model.Product> list = PBll.GetList(pageSize, pageIndex, ref recordCount, PModel);

            if (list != null && list.Count > 0)
            {
                rpList.DataSource = list;
                rpList.DataBind();
            }
        }
예제 #16
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        /// <param name="id">产品编号</param>
        protected void pageInit(string id)
        {
            var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
            if (model != null)
            {
                hybh = model.UserID;

            }
            Eyousoft_yhq.BLL.Product bll = new Eyousoft_yhq.BLL.Product();
            gModel = new Eyousoft_yhq.Model.Product();
            gModel = bll.GetModel(id);
            if (gModel != null)
            {
                lbl_ProName.Text = gModel.ProductName;
                shichangjia = gModel.MarketPrice.ToString("C0");
                appjia = gModel.AppPrice.ToString("C0");
                dianhua = gModel.LinkTel;
                descript = Utils.GetText2(gModel.ProductDis, 30, true);
                //Lit_chutuan.Text = gModel.SendTourKnow.Replace("\n", "<br/>");
                //Lit_conpair.Text = gModel.Scompare.Replace("\n", "<br/>");

                //Lit_xingcheng.Text = gModel.TourDis.Replace("\n", "<br/>");
                //Lit_jieshao.Text = gModel.ProductDis.Replace("\n", "<br/>");
                yhm = gModel.FavourCode;
                pinglunshu = new Eyousoft_yhq.BLL.Comment().GetCountNum(gModel.ProductID).ToString();
                if (DateTime.Compare(DateTime.Now, Utils.GetDateTime(gModel.ValidiDate.ToString())) > 0 && !gModel.IsEveryDay)
                {
                    spanResult.Visible = false;
                }
                switch (gModel.PType)
                {
                    case 2:
                        lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">使用须知</li></ul></h3><div class=\"contentbox\"><div>{0}</div><div style=\"display: none\">{1}</div> </div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>", gModel.ProductDis.Replace("\n", "<br/>"), gModel.SendTourKnow.Replace("\n", "<br/>"));
                        break;
                    case 3:
                        lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">使用须知</li></ul></h3><div class=\"contentbox\"><div>{0}</div><div style=\"display: none\">{1}</div> </div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>", gModel.ProductDis.Replace("\n", "<br/>"), gModel.SendTourKnow.Replace("\n", "<br/>"));
                        break;
                    default:
                        lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">参考行程</li><li li_index=\"3\">出团须知</li><li li_index=\"4\">同类比较</li></ul></h3><div class=\"contentbox\"><div>{0}</div><div style=\"display: none\">{1}</div> <div style=\"display: none\">{2}</div><div style=\"display: none\">{3}</div></div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>", gModel.ProductDis.Replace("\n", "<br/>"), gModel.TourDis.Replace("\n", "<br/>"), gModel.SendTourKnow.Replace("\n", "<br/>"), gModel.Scompare);
                        break;
                }

            }
            else
            {
                lit_Menu.Text = string.Format("<div class=\"pro_content\"> <h3><ul class=\"tiaozheng\"><li li_index=\"1\" class=\"active\">产品介绍</li><li li_index=\"2\">参考行程</li><li li_index=\"3\">出团须知</li><li li_index=\"4\">同类比较</li></ul></h3><div class=\"contentbox\"><div></div><div style=\"display: none\"></div> <div style=\"display: none\"></div><div style=\"display: none\"></div></div><div><img src=\"/images/pro_b.png\" width=\"300\"></div></div>");
            }
        }
예제 #17
0
파일: Index.aspx.cs 프로젝트: ichoukou/yhq
        /// <summary>
        /// 获取产品图片
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        protected string getProImg(string id)
        {
            var img = new Eyousoft_yhq.BLL.Product().GetModel(id).AttachList;

            if (img != null && img.Count > 0)
            {
                for (int i = 0; i < img.Count; i++)
                {
                    if (img[i].IsWebImage && !string.IsNullOrEmpty(img[i].FilePath))
                    {
                        return(img[i].FilePath);
                    }
                }
            }
            return("/images/list_img.gif");
        }
예제 #18
0
        protected void initList()
        {
            Eyousoft_yhq.BLL.Product      bll        = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.PurductName = Utils.GetQueryStringValue("productName");
            if (Utils.GetInt(Utils.GetQueryStringValue("tuijian")) == 1)
            {
                serchModel.isHot = 1;
            }
            if (!string.IsNullOrEmpty(Utils.GetQueryStringValue("xianlu")))
            {
                serchModel.xianlu = (Eyousoft_yhq.Model.XianLu)Utils.GetInt(Utils.GetQueryStringValue("xianlu"));
            }

            if (Utils.GetQueryStringValue("proType") == "-2")
            {
                serchModel.PType = 2;
            }
            else if (Utils.GetQueryStringValue("proType") == "-3")
            {
                serchModel.PType = 3;
            }
            else
            {
                serchModel.PurductType = Utils.GetQueryStringValue("proType");
                serchModel.PType       = 1;
            }
            serchModel.isVisable = false;
            serchModel.WeiDianId = WeiDianId;

            if (serchModel.isHot.HasValue && serchModel.isHot.Value == 1)
            {
                serchModel.WeiDianId = string.Empty;
            }

            var list = bll.GetList(pagesize, pageindex, ref recordCount, serchModel);

            if (list != null && list.Count > 0)
            {
                rpt_list.DataSource = list;
                rpt_list.DataBind();
            }
            else
            {
                PlaceHolder1.Visible = false;
            }
        }
예제 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Utils.GetQueryStringValue("id");

            var model = new Eyousoft_yhq.BLL.Product().GetModel(id);
            if (model == null) return;

            System.Text.StringBuilder strbu = new System.Text.StringBuilder();

            strbu.AppendFormat("{0}|", "product");
            strbu.AppendFormat("{0}|", model.ProductID);
            strbu.AppendFormat("产品名称:{0}|", model.ProductName);
            strbu.AppendFormat("产品有效期:{0}", model.ValidiDate.ToString("yyyy-MM-dd"));

            string src = Utils.CreateZxingCode(strbu.ToString());
            ZXING.Text = "<img src=" + src + " />";
        }
예제 #20
0
파일: CodeBox.aspx.cs 프로젝트: uwitec/O2O
 protected void Page_Load(object sender, EventArgs e)
 {
     string id = EyouSoft.Common.Utils.GetQueryStringValue("id");
     string tp = EyouSoft.Common.Utils.GetQueryStringValue("tp");
     var order = new Eyousoft_yhq.BLL.Order().GetModel(id);
     if (order == null)
     {
         ZXING.Text = "未找到此订单!";
         return;
     }
     else
     {
         var product = new Eyousoft_yhq.BLL.Product().GetModel(order.ProductID);
         if (product == null) return;
         string data = string.Format("{0}|{1}|{2}|{3}", "order", order.OrderID, product.ProductName, order.MemberName);
         ZXING.Text = string.Format(" <img src={0} />", EyouSoft.Common.Utils.CreateZxingCode(data));
     }
 }
예제 #21
0
파일: YouJiXX.aspx.cs 프로젝트: uwitec/O2O
        protected void Page_Load(object sender, EventArgs e)
        {
            string youjiid = Utils.GetQueryStringValue("YouJiId");
            var list = new Eyousoft_yhq.BLL.BYouJi().GetModel(youjiid);
            if (list != null)
            {
                #region 获取会员头像和名称
                var info = new Eyousoft_yhq.BLL.Member().GetModel(list.HuiYuanId);
                if (info != null)
                {
                    string TuXiangFilepath = info.TuXiangFilepath;
                    if (string.IsNullOrEmpty(TuXiangFilepath)) TuXiangFilepath = "/images/weixin/head_no.png";
                    string FenXiangLianJie = string.Format("<a href=\"http://{0}/huiyuanweixin/mingpian.aspx?mingpianid={1}&eventkey=qrscene_01\"><img  src=\"{2}\"></a>", HOST, info.MingPianId, TuXiangFilepath);
                    ltrTouXiang.Text = FenXiangLianJie;
                    ltrMingCheng.Text = info.ContactName;

                }
                #endregion

                LtrTitle.Text = yjtitle = list.YouJiTitle;
                int rowsCount=0;
                var item = new Eyousoft_yhq.BLL.Product().GetList(1, 1, ref rowsCount, new Eyousoft_yhq.Model.SerProduct() { FavourCode = string.IsNullOrEmpty(list.WeiXinMa) ? "-999" : list.WeiXinMa });
                if(item!=null && item.Count>0)
                {
                    ChanPinLink.Text = "<div style=\"text-align:center; font-size:14px;\"><a href=\"/AppPage/weixin/ProductInfo.aspx?id=" + item[0].ProductID + "&weidianid=" + new Eyousoft_yhq.BLL.BWeiDian().GetWeiDianId(list.HuiYuanId) + "\">[查看相关产品及预定]</a></div>";
                }
                if (list.YouJiContent[0].XingChengContent.Length > 30)
                {
                    yjdesc = list.YouJiContent[0].XingChengContent.Substring(0, 30);
                }
                else
                {
                    yjdesc = list.YouJiContent[0].XingChengContent;
                }
                if (!string.IsNullOrEmpty(list.YouJiContent[0].ImgFile))
                {
                    yjimg = list.YouJiContent[0].ImgFile;
                }

                rptList.DataSource = list.YouJiContent;
                rptList.DataBind();

            }
        }
예제 #22
0
 /// <summary>
 /// 获取产品图片
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 protected string getImg(string id)
 {
     var model = new Eyousoft_yhq.BLL.Product().GetModel(id);
     if (model != null)
     {
         if (model.AttachList != null)
         {
             for (int i = 0; i < model.AttachList.Count; i++)
             {
                 if (model.AttachList[i].IsWebImage) return string.Format("<img src=\"{0}\" style=\"width:455px;height:280px\" />", model.AttachList[i].FilePath);
             }
         }
         else
         {
             return " <img src=\"/images/img00.jpg\">";
         }
     }
     return " <img src=\"/images/img00.jpg\">";
 }
예제 #23
0
        /// <summary>
        /// 初始化列表
        /// </summary>
        protected void initList()
        {
            Eyousoft_yhq.BLL.Product bll = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.FavourCode = Utils.GetQueryStringValue("productName");
            pageIndex = UtilsCommons.GetPagingIndex("Page");
            var list = bll.GetList(pageSize, pageIndex, ref recordCount, serchModel);
            if (list != null && list.Count > 0)
            {
                rpt_list.DataSource = list;
                rpt_list.DataBind();
                BindPage();
                litMsg.Visible = false;

            }
            else
            {
                rpt_list.Visible = false;
            }
        }
예제 #24
0
        /// <summary>
        /// 初始化列表
        /// </summary>
        protected void initList()
        {
            Eyousoft_yhq.BLL.Product      bll        = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.FavourCode = Utils.GetQueryStringValue("productName");
            pageIndex             = UtilsCommons.GetPagingIndex("Page");
            var list = bll.GetList(pageSize, pageIndex, ref recordCount, serchModel);

            if (list != null && list.Count > 0)
            {
                rpt_list.DataSource = list;
                rpt_list.DataBind();
                BindPage();
                litMsg.Visible = false;
            }
            else
            {
                rpt_list.Visible = false;
            }
        }
예제 #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var order = new Eyousoft_yhq.BLL.Order().GetModel(EyouSoft.Common.Utils.GetQueryStringValue("id"));

            if (order == null)
            {
                return;
            }
            lblVcode.Text = order.ConfirmCode;
            var product = new Eyousoft_yhq.BLL.Product().GetModel(order.ProductID);

            if (product == null)
            {
                return;
            }
            lblName.Text  = product.ProductName;
            lblVdate.Text = string.Format("{0}", product.ValidiDate.ToString("yyyy年MM月dd日"));
            string data = string.Format("{0}|{1}|{2}|{3}|{4}", "order", order.OrderID, product.ProductName, order.MemberName, order.ConfirmCode);

            lblCodeImg.Text = string.Format(" <img src={0} />", EyouSoft.Common.Utils.CreateZxingCode(data));
        }
예제 #26
0
        void initList()
        {
            Eyousoft_yhq.BLL.Product bll = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.AdminName = HuiYuanInfo.UserId;
            serchModel.PType = 2;
            serchModel.PurductName = Utils.GetQueryStringValue("BusTicket");
            pageIndex = UtilsCommons.GetPagingIndex("Page");
            var list = bll.GetList(pageSize, pageIndex, ref recordCount, serchModel);
            if (list != null && list.Count > 0)
            {
                rpt_list.DataSource = list;
                rpt_list.DataBind();
                BindPage();
                litMsg.Visible = false;

            }
            else
            {
                rpt_list.Visible = false;
            }
        }
예제 #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string id = Utils.GetQueryStringValue("id");

            var model = new Eyousoft_yhq.BLL.Product().GetModel(id);

            if (model == null)
            {
                return;
            }

            System.Text.StringBuilder strbu = new System.Text.StringBuilder();

            strbu.AppendFormat("{0}|", "product");
            strbu.AppendFormat("{0}|", model.ProductID);
            strbu.AppendFormat("产品名称:{0}|", model.ProductName);
            strbu.AppendFormat("产品有效期:{0}", model.ValidiDate.ToString("yyyy-MM-dd"));

            string src = Utils.CreateZxingCode(strbu.ToString());

            ZXING.Text = "<img src=" + src + " />";
        }
예제 #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string id    = EyouSoft.Common.Utils.GetQueryStringValue("id");
            string tp    = EyouSoft.Common.Utils.GetQueryStringValue("tp");
            var    order = new Eyousoft_yhq.BLL.Order().GetModel(id);

            if (order == null)
            {
                ZXING.Text = "未找到此订单!";
                return;
            }
            else
            {
                var product = new Eyousoft_yhq.BLL.Product().GetModel(order.ProductID);
                if (product == null)
                {
                    return;
                }
                string data = string.Format("{0}|{1}|{2}|{3}", "order", order.OrderID, product.ProductName, order.MemberName);
                ZXING.Text = string.Format(" <img src={0} />", EyouSoft.Common.Utils.CreateZxingCode(data));
            }
        }
예제 #29
0
        void initList()
        {
            Eyousoft_yhq.BLL.Product      bll        = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.AdminName   = HuiYuanInfo.UserId;
            serchModel.PType       = 2;
            serchModel.PurductName = Utils.GetQueryStringValue("BusTicket");
            pageIndex = UtilsCommons.GetPagingIndex("Page");
            var list = bll.GetList(pageSize, pageIndex, ref recordCount, serchModel);

            if (list != null && list.Count > 0)
            {
                rpt_list.DataSource = list;
                rpt_list.DataBind();
                BindPage();
                litMsg.Visible = false;
            }
            else
            {
                rpt_list.Visible = false;
            }
        }
예제 #30
0
파일: WinXin.cs 프로젝트: ichoukou/yhq
        /// <summary>
        /// 产品列表
        /// </summary>
        /// <param name="ToUserName">请求人</param>
        /// <param name="FromUserName">服务号OpenId</param>
        /// <param name="TypeId"></param>
        /// <returns></returns>
        private bool ProductList(string ToUserName, string FromUserName, string TypeId)
        {
            List <NewsReplyMessageItem> items = new List <NewsReplyMessageItem>();
            int rowsCount = 0;
            var list      = new Eyousoft_yhq.BLL.Product().GetList(5, 1, ref rowsCount, new Eyousoft_yhq.Model.SerProduct()
            {
                PurductType = TypeId
            });

            foreach (var model in list)
            {
                string picUrl = "";
                //if (!String.IsNullOrEmpty(model.ProductPhoto))
                //{
                //    string Photo = model.ProductPhoto + "S_" + System.IO.Path.GetFileName(model.ProductPhoto);
                //    string file = System.IO.Path.GetFileName(Photo);
                //    picUrl = Photo.Substring(0, Photo.Length - file.Length) + "S_" + file;
                //}
                NewsReplyMessageItem itm = new NewsReplyMessageItem()
                {
                    Description = model.ProductName,
                    Url         = "http://oa.finawin.cn/APP/WeiXin/ProductDetail.aspx?OpenId=" + FromUserName + "&id=" + model.ProductID.ToString(),
                    PicUrl      = picUrl,
                    Title       = model.ProductName
                };
                items.Add(itm);
            }
            NewsReplyMessage replyMsg = new NewsReplyMessage()
            {
                CreateTime   = Tools.ConvertDateTimeInt(DateTime.Now),
                FromUserName = ToUserName,
                ToUserName   = FromUserName,
                Articles     = items
            };

            MessageHandler.SendReplyMessage(replyMsg);
            return(true);
        }
예제 #31
0
        /// <summary>
        /// 获取产品图片
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        protected string getImg(string id)
        {
            var model = new Eyousoft_yhq.BLL.Product().GetModel(id);

            if (model != null)
            {
                if (model.AttachList != null)
                {
                    for (int i = 0; i < model.AttachList.Count; i++)
                    {
                        if (model.AttachList[i].IsWebImage)
                        {
                            return(string.Format("<img src=\"{0}\" style=\"width:455px;height:280px\" />", model.AttachList[i].FilePath));
                        }
                    }
                }
                else
                {
                    return(" <img src=\"/images/img00.jpg\">");
                }
            }
            return(" <img src=\"/images/img00.jpg\">");
        }
예제 #32
0
        /// <summary>
        /// 绑定产品列表
        /// </summary>
        /// <param name="areaId"></param>
        /// <returns></returns>
        protected string BindPro(string id)
        {
            System.Text.StringBuilder option = new System.Text.StringBuilder();
            option.Append("<option value=''>-请选择-</option>");
            Eyousoft_yhq.BLL.Product           bll  = new Eyousoft_yhq.BLL.Product();
            IList <Eyousoft_yhq.Model.Product> list = bll.GetList(null);

            if (list != null && list.Count > 0)
            {
                foreach (var item in list)
                {
                    if (item.ProductID.Equals(id))
                    {
                        option.AppendFormat("<option value='{0}'  selected='selected'>{1}</option>", item.ProductID, item.ProductName);
                    }
                    else
                    {
                        option.AppendFormat("<option value='{0}' >{1}</option>", item.ProductID, item.ProductName);
                    }
                }
            }
            return(option.ToString());
        }
예제 #33
0
        /// <summary>
        /// 绑定产品列表
        /// </summary>
        /// <param name="areaId"></param>
        /// <returns></returns>
        protected string BindPro(string id)
        {
            System.Text.StringBuilder option = new System.Text.StringBuilder();
            option.Append("<option value=''>-请选择-</option>");
            Eyousoft_yhq.BLL.Product bll = new Eyousoft_yhq.BLL.Product();
            IList<Eyousoft_yhq.Model.Product> list = bll.GetList(null);

            if (list != null && list.Count > 0)
            {
                foreach (var item in list)
                {
                    if (item.ProductID.Equals(id))
                    {
                        option.AppendFormat("<option value='{0}'  selected='selected'>{1}</option>", item.ProductID, item.ProductName);
                    }
                    else
                    {
                        option.AppendFormat("<option value='{0}' >{1}</option>", item.ProductID, item.ProductName);
                    }
                }
            }
            return option.ToString();
        }
예제 #34
0
        protected void initList()
        {
            Eyousoft_yhq.BLL.Product bll = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.AdminName = HuiYuanInfo.UserId;
            serchModel.PType = 1;
            serchModel.PurductName = Utils.GetQueryStringValue("productName");
            serchModel.FavourCode = Utils.GetQueryStringValue("FavourCode");
            serchModel.PurductState = Utils.GetQueryStringValue("pstate");
            serchModel.Stime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("stime"));
            serchModel.Etime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("etime"));
            serchModel.isVisable = true;
            serchModel.IsAdmin = HuiYuanInfo.IsAdmin?"1":"0";
            serchModel.isHot = Utils.GetIntNull(Utils.GetQueryStringValue("isHot"));
            serchModel.PurductType = Utils.GetInt(Utils.GetQueryStringValue("ptype")).ToString();
            serchModel.ShenHeStatus = (Eyousoft_yhq.Model.ChanPinShenHeStatus?)Utils.GetEnumValueNull(typeof(Eyousoft_yhq.Model.ChanPinShenHeStatus), Utils.GetQueryStringValue("txtShenHeStatus"));

            if (HuiYuanInfo.LeiXing == Eyousoft_yhq.Model.WebmasterLeiXing.供应商)
            {
                serchModel.FaBuRenId = HuiYuanInfo.UserId;
            }

            pageIndex = UtilsCommons.GetPagingIndex("Page");
            var list = bll.GetList(pageSize, pageIndex, ref recordCount, serchModel);
            if (list != null && list.Count > 0)
            {
                rpt_list.DataSource = list;
                rpt_list.DataBind();
                BindPage();
                litMsg.Visible = false;

            }
            else
            {
                rpt_list.Visible = false;
            }
        }
예제 #35
0
        protected void initList()
        {
            Eyousoft_yhq.BLL.Product      bll        = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.AdminName    = HuiYuanInfo.UserId;
            serchModel.PType        = 1;
            serchModel.PurductName  = Utils.GetQueryStringValue("productName");
            serchModel.FavourCode   = Utils.GetQueryStringValue("FavourCode");
            serchModel.PurductState = Utils.GetQueryStringValue("pstate");
            serchModel.Stime        = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("stime"));
            serchModel.Etime        = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("etime"));
            serchModel.isVisable    = true;
            serchModel.IsAdmin      = HuiYuanInfo.IsAdmin?"1":"0";
            serchModel.isHot        = Utils.GetIntNull(Utils.GetQueryStringValue("isHot"));
            serchModel.PurductType  = Utils.GetInt(Utils.GetQueryStringValue("ptype")).ToString();
            serchModel.ShenHeStatus = (Eyousoft_yhq.Model.ChanPinShenHeStatus?)Utils.GetEnumValueNull(typeof(Eyousoft_yhq.Model.ChanPinShenHeStatus), Utils.GetQueryStringValue("txtShenHeStatus"));

            if (HuiYuanInfo.LeiXing == Eyousoft_yhq.Model.WebmasterLeiXing.供应商)
            {
                serchModel.FaBuRenId = HuiYuanInfo.UserId;
            }

            pageIndex = UtilsCommons.GetPagingIndex("Page");
            var list = bll.GetList(pageSize, pageIndex, ref recordCount, serchModel);

            if (list != null && list.Count > 0)
            {
                rpt_list.DataSource = list;
                rpt_list.DataBind();
                BindPage();
                litMsg.Visible = false;
            }
            else
            {
                rpt_list.Visible = false;
            }
        }
예제 #36
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        private void initPage()
        {
            string id = Utils.GetQueryStringValue("id");
            int orderNums = 1;
            var model = new Eyousoft_yhq.BLL.Product().GetModel(id);
            if (model != null)
            {
                lbl_Pname.Text = model.ProductName;
                lbl_Price.Text = model.AppPrice.ToString("C0");
                decimal getPrice = orderNums * model.AppPrice;
                singlePirce.Value = model.AppPrice.ToString("0");
                sumPirce.Value = model.AppPrice.ToString("0");
                lbl_SumPrice.Text = getPrice.ToString("C0");
                lbl_orderPrice.Text = getPrice.ToString("0");
                numS = model.ResidueNum;
            }

            var MemberModel = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
            if (MemberModel != null)
            {
                Gname = MemberModel.ContactName;
                Gmobile = MemberModel.UserName;
            }
        }
예제 #37
0
파일: Index.aspx.cs 프로젝트: uwitec/O2O
        /// <summary>
        /// 初始化页面
        /// </summary>
        protected void InitList()
        {
            Eyousoft_yhq.Model.SerProduct serModel = new Eyousoft_yhq.Model.SerProduct();
            serModel.PType = Utils.GetInt(Utils.GetQueryStringValue("tp"));
            serModel.PurductName = Utils.GetQueryStringValue("keys");
            serModel.SFTJ = Utils.GetInt(Utils.GetQueryStringValue("ishot"));
            serModel.DDXL = Utils.GetInt(Utils.GetQueryStringValue("sale"));
            serModel.SJPX = Utils.GetInt(Utils.GetQueryStringValue("issue"));
            serModel.JGPX = Utils.GetInt(Utils.GetQueryStringValue("price"));
            int Productype = Utils.GetInt(Utils.GetQueryStringValue("routype"));
            serModel.PurductType = Productype > 0 ? Productype.ToString() : "";

            #region 输出样式
            //tj = getClass(serModel.SFTJ);
            xl = getClass(serModel.DDXL);
            zx = getClass(serModel.SJPX);
            jg = getClass(serModel.JGPX);
            #endregion

            pageIndex = UtilsCommons.GetPagingIndex("Page");
            IList<Eyousoft_yhq.Model.Product> list = new Eyousoft_yhq.BLL.Product().GetList(pageSize, pageIndex, ref recordCount, serModel);

            UtilsCommons.Paging(pageSize, ref pageIndex, recordCount);
            string pagingScript = "pagingConfig.pageSize={0};pagingConfig.pageIndex={1};pagingConfig.recordCount={2};";
            if (list != null && list.Count > 0)
            {
                rpt_products.DataSource = list;
                rpt_products.DataBind();

            }
            RegisterScript(string.Format(pagingScript, pageSize, pageIndex, recordCount));
        }
예제 #38
0
        protected string MemberOrder(string PId)
        {
            var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
            //用户是否登录
            if (model != null)
            {
                Eyousoft_yhq.BLL.Product ProductBll = new Eyousoft_yhq.BLL.Product();

                var ProModel = ProductBll.GetModel(PId);
                Eyousoft_yhq.Model.Order order = new Eyousoft_yhq.Model.Order();
                //产品是否存在
                if (ProModel != null)
                {
                    if (ProModel != null && ProModel.ResidueNum <= 0)
                    {

                        Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting();
                        //短信数量
                        if (exModel != null && exModel.MsgNumber > 0)
                        {

                            IList<Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels();
                            bool IsMsgAdd = AddOrder(PId, (int)Eyousoft_yhq.Model.OrderState.未处理, ProModel.AppPrice, out order);
                            if (IsMsgAdd)
                            {
                                string result = string.Empty;//返回发送结果
                                string sendNum = string.Empty; //发送账号
                                Eyousoft_yhq.BLL.ProductType ProductTypeBll = new Eyousoft_yhq.BLL.ProductType();
                                var ProductTypeModel = ProductTypeBll.GetModel(ProModel.ProductType);
                                var AdminUser = new EyouSoft.Model.SSOStructure.MWebmasterInfo();
                                if (ProductTypeModel != null)
                                {
                                    for (int i = 0; i < ProductTypeModel.AdminName.Count; i++)
                                    {
                                        AdminUser = new Eyousoft_yhq.BLL.User().GetModel(ProductTypeModel.AdminName[i].AdminN);
                                        if (AdminUser != null) sendNum = AdminUser.Telephone;
                                        string Msg = string.Format("产品{0}有未处理订单,订单号:{1}!【惠旅游】", ProModel.ProductName, order.OrderCode);
                                        Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(sendNum, Msg, channel[0], out result);//发送
                                        #region  短信日志
                                        Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                                        {
                                            TelCode = sendNum,
                                            MsgText = Msg,
                                            ReResult = result
                                        };
                                        new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                                        #endregion
                                    }
                                }
                                if (result == "成功") return UtilsCommons.AjaxReturnJson("1", "下单成功,订单由客服人员进行座位确认,在72小时内会短信通知您是否成交");
                                return UtilsCommons.AjaxReturnJson("1", "下单成功,我们会尽快与您联系!");

                            }
                            else
                            {
                                return UtilsCommons.AjaxReturnJson("0", "下单失败,请重新下单");
                            }

                        }
                        else
                        {
                            return UtilsCommons.AjaxReturnJson("0", "短信系统维护中,请稍后再试!");
                        }
                    }
                    else
                    {
                        bool IsAdd = AddOrder(PId, (int)Eyousoft_yhq.Model.OrderState.待付款, ProModel.AppPrice, out  order);
                        if (IsAdd)
                        {
                            return UtilsCommons.AjaxReturnJson("99", "下单成功,请付款", order.OrderID);
                        }
                        else
                        {
                            return UtilsCommons.AjaxReturnJson("0", "下单失败,请重新下单");
                        }
                    }
                }
                else
                {
                    return UtilsCommons.AjaxReturnJson("0", "商品已下价!");
                }
            }
            else
            {
                return UtilsCommons.AjaxReturnJson("2", "请先登录再操作!");
            }
        }
예제 #39
0
        /// <summary>
        /// 产品审核
        /// </summary>
        void ShenHe()
        {
            if (HuiYuanInfo.LeiXing == Eyousoft_yhq.Model.WebmasterLeiXing.供应商) Utils.RCWE_AJAX("0", "你没有审核权限");

            var txtChanPinId = Utils.GetFormValues("txtChanPinId[]");
            if (txtChanPinId == null || txtChanPinId.Length == 0) Utils.RCWE_AJAX("0", "请选择需要审核的产品");

            var items = new List<string>();
            foreach (var item in txtChanPinId)
            {
                items.Add(item);
            }

            int bllRetCode = new Eyousoft_yhq.BLL.Product().ChanPinShenHe(items);

            if (bllRetCode == 1) Utils.RCWE_AJAX("1", "操作成功");
            else Utils.RCWE_AJAX("0", "操作失败");
        }
예제 #40
0
파일: WinXin.cs 프로젝트: uwitec/O2O
        /// <summary>
        /// 产品码查询
        /// </summary>
        /// <param name="ToUserName">请求人</param>
        /// <param name="FromUserName">服务号OpenId</param>
        /// <returns></returns>
        private bool NewsList(TextReceiveMessage msg, params object[] args)
        {
            string msgWord = msg.Content.ToLower();
            if (msgWord.StartsWith("h"))
            {
                var usermodel = WeiXin.GetUserInfo(msg.FromUserName);
                if (usermodel != null)
                {
                    List<NewsReplyMessageItem> items = new List<NewsReplyMessageItem>();
                    int rowsCount = 0;
                    string wxm = msgWord.Substring(1);
                    var list = new Eyousoft_yhq.BLL.Product().GetList(1, 1, ref rowsCount, new Eyousoft_yhq.Model.SerProduct() { FavourCode = wxm });
                    NewsReplyMessageItem NewsPicHeader = new NewsReplyMessageItem();
                    if (list != null && list.Count > 0)
                    {
                        NewsPicHeader.Description = EyouSoft.Common.Utils.GetText2(list[0].ProductDis, 50, true);
                        NewsPicHeader.Url = "http://www.4008005216.com/AppPage/weixin/ProductInfo.aspx?id=" + list[0].ProductID;
                        NewsPicHeader.PicUrl = (list[0].AttachList != null && list[0].AttachList.Count > 0) ? list[0].AttachList[0].FilePath : "";
                        NewsPicHeader.Title = list[0].ProductName;
                    };
                    items.Add(NewsPicHeader);

                    NewsReplyMessage replyMsg = new NewsReplyMessage()
                    {
                        CreateTime = Tools.ConvertDateTimeInt(DateTime.Now),
                        FromUserName = msg.ToUserName,
                        ToUserName = msg.FromUserName,
                        Articles = items
                    };
                    if (list == null || list.Count == 0)
                    {
                        MessageHandler.SendTextReplyMessage(msg.ToUserName, msg.FromUserName, "查询产品不存在!");
                        return true;
                    }
                    MessageHandler.SendReplyMessage(replyMsg);

                }
                else
                {
                    MessageHandler.SendTextReplyMessage(msg.ToUserName, msg.FromUserName, "获取用户信息失败!" + msg.FromUserName);
                }
            }
            else
            {
                MessageHandler.SendTextReplyMessage(msg.ToUserName, msg.FromUserName, "亲!您的问题我不明白,要不您换个问法再试试,我这里只要输入5位产品码就行了。或者您可以进入\"旅游超市\"按分类查询。!");
            }
            return true;
        }
예제 #41
0
        protected void initList()
        {
            Eyousoft_yhq.BLL.Product bll = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.PurductName = Utils.GetQueryStringValue("productName");
            if (Utils.GetInt(Utils.GetQueryStringValue("tuijian")) == 1) serchModel.isHot = 1;
            if (!string.IsNullOrEmpty(Utils.GetQueryStringValue("xianlu"))) serchModel.xianlu = (Eyousoft_yhq.Model.XianLu)Utils.GetInt(Utils.GetQueryStringValue("xianlu"));

            if (Utils.GetQueryStringValue("proType") == "-2")
            {
                serchModel.PType = 2;
            }
            else if (Utils.GetQueryStringValue("proType") == "-3")
            {
                serchModel.PType = 3;
            }
            else
            {
                serchModel.PurductType = Utils.GetQueryStringValue("proType");
                serchModel.PType = 1;
            }
            serchModel.isVisable = false;
            serchModel.WeiDianId = WeiDianId;

            if (serchModel.isHot.HasValue && serchModel.isHot.Value == 1) serchModel.WeiDianId = string.Empty;

            var list = bll.GetList(pagesize, pageindex, ref recordCount, serchModel);

            if (list != null && list.Count > 0)
            {
                rpt_list.DataSource = list;
                rpt_list.DataBind();
            }
            else
            {
                PlaceHolder1.Visible = false;
            }
        }
예제 #42
0
        protected void DownWord()
        {
            string wordTemplate = "";
            var model = new Eyousoft_yhq.BLL.Product().GetModel(Utils.GetQueryStringValue("routeid"));
            if (model != null)
            {
                #region 文本内容
                wordTemplate = @"
                <html>
                <head>
                    <title>打印预览</title>
                    <style type=""text/css"">
                    body {{color:#000000;font-size:12px;font-family:""宋体"";background:#fff; margin:0px;}}
                    img {{border: thin none;}}
                    table {{border-collapse:collapse;width:790px;}}
                    td {{font-size: 12px; line-height:18px;color: #000000;  }}
                    .headertitle {{font-family:""黑体""; font-size:25px; line-height:120%; font-weight:bold;}}
                    </style>
                </head>
                <body>
                    <div id=""divAllHtml"" style=""width: 760px; margin: 0 auto;"">
            <div id=""divContent"">
            <table width=""696"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">
                <tr>
                    <td height=""40"" align=""center"">
                        <b class=""font24"">
                            {0}</b>
                    </td>
                </tr>
            </table>
            <table width=""696"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" runat=""server""
                id=""TPlanFeature"" class=""borderline_2"">
                <tr>
                    <td height=""30"" class=""small_title"">
                        <b class=""font16"">产品介绍</b>
                    </td>
                </tr>
                <tr>
                    <td class=""td_text"">
                        {1}
                    </td>
                </tr>
            </table>
            <table width=""696"" cellspacing=""0"" cellpadding=""0"" border=""0"" align=""center"" id=""TAll""
                runat=""server"" class=""borderline_2"">
                <tbody>
                    <tr>
                        <td height=""30"" class=""small_title"">
                            <b class=""font16"">参考行程</b>
                        </td>
                    </tr>
                    <tr>
                        <td class=""td_text"">
                            {2}
                        </td>
                    </tr>
                </tbody>
            </table>
            <div id=""TOption"" runat=""server"">
                <table width=""696"" cellspacing=""0"" cellpadding=""0"" border=""0"" align=""center"" class=""list_2"">
                    <tbody>
                        <tr>
                            <td height=""30"" class=""small_title"">
                                <b class=""font16"">出团须知</b>
                            </td>
                        </tr>
                        <tr>
                            <td class=""td_text"">
                               {3}
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div runat=""server"" id=""TPlanService"">
                <table width=""696"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" runat=""server""
                    id=""TService"" class=""borderline_2"">
                    <tr>
                        <td height=""30"" class=""small_title"">
                            <b class=""font16"">价格标准</b>
                        </td>
                    </tr>
                    <tr>
                        <td class=""td_text borderline_2"">
                           市场价格:{4},会员价格:{5}
                        </td>
                    </tr>
                </table>
            </div>
            </div>
            </div>
                </body>
                </html>";
                #endregion

                HttpContext.Current.Response.Clear();
                string saveFileName = HttpUtility.UrlEncode(DateTime.Now.ToString("yyyyMMddhhssffff") + ".doc", System.Text.Encoding.Default);
                System.IO.StringWriter tw = new System.IO.StringWriter();

                tw.Write(string.Format(wordTemplate, model.ProductName, model.ProductDis, model.TourDis, model.SendTourKnow, model.MarketPrice.ToString("C0"), model.AppPrice.ToString("C0")).ToString());
                WriteFile(tw.ToString(), saveFileName);
                FileInfo Inf = new FileInfo(Server.MapPath(@"TemFile/" + saveFileName));
                HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + saveFileName);
                HttpContext.Current.Response.Charset = "GB2312";
                HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default;
                HttpContext.Current.Response.ContentType = "application/ms-word ";
                Page.EnableViewState = false;

                HttpContext.Current.Response.WriteFile(Inf.FullName);
                HttpContext.Current.Response.Flush();
                HttpContext.Current.Response.End();

            }
        }
예제 #43
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        protected void initPage()
        {
            EyouSoft.Model.SSOStructure.MUserInfo info = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
            if (info != null)
            {
                isLogin = "******";
            }

            string id    = Utils.GetQueryStringValue("id");
            var    model = new Eyousoft_yhq.BLL.Product().GetModel(id);

            if (model != null)
            {
                yhm = model.FavourCode;
                lblproductName.Text = lblMenuTitle.Text = model.ProductName;
                lbldescript.Text    = Utils.GetText2(model.ProductDis, 100, true);
                lblprice.Text       = model.AppPrice.ToString("0");
                lblZK.Text          = ((model.AppPrice / model.MarketPrice) * 10).ToString("0.0");
                lblMarketPrice.Text = model.MarketPrice.ToString("C0");
                lblSaleCount.Text   = model.SaleNum.ToString();
                ltrDescript.Text    = model.ProductDis.Replace("\n", "<br/>");
                ltrTour.Text        = model.TourDis.Replace("\n", "<br/>");
                ltrKown.Text        = model.SendTourKnow.Replace("\n", "<br/>");
                ltrCompair.Text     = model.Scompare.Replace("\n", "<br/>");
                if (!string.IsNullOrEmpty(model.ServiceQQ))
                {
                    lblQQ.Text = string.Format("<a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?v=3&uin={0}&site=qq&menu=yes\"  ><img src=\"/images/qq.gif\"></a>", model.ServiceQQ);
                }
                else
                {
                    lblQQ.Text = "<a href=\"javascript:;\" ><img src=\"/images/qq.gif\"></a>";
                }
                if (model.AttachList != null)
                {
                    for (int i = 0; i < model.AttachList.Count; i++)
                    {
                        if (model.AttachList[i].IsWebImage)
                        {
                            lblImg.Text = string.Format("<img src=\"{0}\" style=\"width:455px;height:280px\" />", model.AttachList[i].FilePath);
                        }
                    }
                }
                else
                {
                    lblImg.Text = "<img src=\"/images/pro_mainpic.jpg\" />";
                }
                pinglunshu = new Eyousoft_yhq.BLL.Comment().GetCountNum(model.ProductID).ToString();

                if (DateTime.Compare(DateTime.Now, Utils.GetDateTime(model.ValidiDate.ToString())) > 0 && !model.IsEveryDay)
                {
                    place_Viadate.Visible   = false;
                    place_isViadate.Visible = true;
                }
                switch (model.PType)
                {
                case 2:
                    getType              = "车票";
                    lblKnow.Text         = "使用须知";
                    PlaceHolder1.Visible = PlaceHolder2.Visible = false;
                    break;

                case 3:
                    getType              = "景点门票";
                    lblKnow.Text         = "使用须知";
                    PlaceHolder1.Visible = PlaceHolder2.Visible = false;
                    break;

                default:
                    break;
                }
            }
        }
예제 #44
0
        protected void pageSave(string doType)
        {
            string id    = Utils.GetQueryStringValue("id");
            var    model = new Eyousoft_yhq.Model.Product();

            #region 实体赋值

            model.ProductName = Utils.GetFormValue(txtproductName.UniqueID);
            model.ProductType = 0;
            model.TourDate    = Utils.GetDateTimeNullable(Utils.GetFormValue(txtsendDate.UniqueID));
            model.MarketPrice = Utils.GetDecimal(Utils.GetFormValue(txtmarkPrice.UniqueID));
            model.AppPrice    = Utils.GetDecimal(Utils.GetFormValue(txtappPrice.UniqueID));
            //model.FavourCode = Utils.GetFormValue(txtcoupons.UniqueID);
            model.LinkTel       = Utils.GetFormValue(txttel.UniqueID);
            model.ProductDis    = Utils.GetFormValue(txtdescript.UniqueID);
            model.TourDis       = Utils.GetFormValue(txtStation.UniqueID);
            model.SendTourKnow  = Utils.GetFormValue(txtjoury.UniqueID);
            model.ValidiDate    = Utils.GetDateTime(Utils.GetFormValue(txtValidate.UniqueID));
            model.ProductState  = 0;
            model.AttachList    = NewGetAttach();
            model.IsEveryDay    = false;
            model.IsHot         = 0;
            model.ServiceQQ     = Utils.GetFormValue(txtkfqq.UniqueID);
            model.ContractType  = Model.ContractType.车票;
            model.ControlPeople = Utils.GetInt(Utils.GetFormValue(txtPeopleNum.UniqueID));
            model.FavourCode    = Utils.GetFormValue(txtWXcode.UniqueID);

            model.ProductSdate   = Utils.GetDateTime(Utils.GetFormValue(txtsendsDate.UniqueID));
            model.ProductOpState = (Model.ProductOp)Utils.GetInt(Utils.GetFormValue(ddl_proType.UniqueID));
            model.ZCodeViaDate   = Utils.GetDateTime(Utils.GetFormValue(txtZxingdate.UniqueID));
            model.PType          = 3;
            #endregion

            cn.myvo.smc.Service sms = new cn.myvo.smc.Service();
            string IsContact        = sms.IsIncludeKeyWord(model.ProductName);

            #region 提交保存
            bool   result = false;
            string msg    = "";

            if (string.IsNullOrEmpty(IsContact))
            {
                Response.Clear();
                Eyousoft_yhq.BLL.Product BLL = new Eyousoft_yhq.BLL.Product();
                if (doType == "add")
                {
                    result = BLL.Add(model);
                    msg    = result ? "添加成功!" : "添加失败!";
                    Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                }
                else
                {
                    model.ProductID = id;
                    result          = BLL.Update(model);
                    msg             = result ? "修改成功!" : "修改失败!";
                    Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                }
                Response.End();
            }
            else
            {
                msg = "产品名称包含敏感字符[" + IsContact + "],请修改后再保存!";
                Response.Clear();
                Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                Response.End();
            }
            #endregion
        }
예제 #45
0
        protected void sendMsg(string pid, string FavourCode)
        {
            Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting();
            if (exModel.MsgNumber > 0)
            {
                var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
                IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels();
                string code = string.Empty;

                if (model != null && model.UserName != "")
                {
                    bool isSend = new Eyousoft_yhq.BLL.SendMsg().exists(model.UserName, pid, FavourCode);
                    if (isSend)
                    {
                        result = "您已经领取过此产品的优惠码!";
                        return;
                    }
                    if (!model.valiUser)
                    {
                        var sendModel = new Eyousoft_yhq.BLL.Product().GetModel(pid);
                        if (sendModel != null && !sendModel.IsEveryDay)
                        {
                            code = string.Format("您成功获取{0},{3}出团,优惠价{1}元,优惠码:{2}!【惠旅游】"
                                                 , sendModel.ProductName
                                                 , sendModel.AppPrice.ToString("C2")
                                                 , sendModel.FavourCode
                                                 , Utils.GetDateTime(sendModel.TourDate.ToString()).ToString("yyyy-MM-dd"));

                            Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(model.UserName, code, channel[0], out result);//发送
                        }
                        else if (sendModel != null && sendModel.IsEveryDay)
                        {
                            code = string.Format("您成功获取{0},优惠价{1}元,优惠码:{2}!【惠旅游】"
                                                 , sendModel.ProductName
                                                 , sendModel.AppPrice.ToString("C2")
                                                 , sendModel.FavourCode);

                            Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(model.UserName, code, channel[0], out result);//发送
                        }
                        else
                        {
                            result = "此产品已下架!";
                        }

                        #region  短信日志
                        Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                        {
                            TelCode  = model.UserName,
                            MsgText  = code,
                            ReResult = result
                        };
                        new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                        #endregion
                    }
                }
                else
                {
                    Response.Redirect("/login.aspx");
                }
                if (result == "成功")
                {
                    int minusNum = code.Length % 70 == 0 ? code.Length / 70 : (code.Length / 70) + 1;
                    new Eyousoft_yhq.BLL.SendMsg().Add(new Eyousoft_yhq.Model.SendMSG
                    {
                        SendNum    = model.UserName,
                        SendText   = code,
                        IssueTime  = DateTime.Now,
                        ProductID  = pid,
                        minusNum   = minusNum,
                        FavourCode = FavourCode
                    });
                    result = "短信已发送,请注意查收!";
                }
                else
                {
                    result = "领取失败!";
                }
            }
            else
            {
                result = "短信系统维护中,请稍后再试!";
            }
        }
예제 #46
0
파일: WinXin.cs 프로젝트: uwitec/O2O
 /// <summary>
 /// 产品列表
 /// </summary>
 /// <param name="ToUserName">请求人</param>
 /// <param name="FromUserName">服务号OpenId</param>
 /// <param name="TypeId"></param>
 /// <returns></returns>
 private bool ProductList(string ToUserName, string FromUserName, string TypeId)
 {
     List<NewsReplyMessageItem> items = new List<NewsReplyMessageItem>();
     int rowsCount = 0;
     var list = new Eyousoft_yhq.BLL.Product().GetList(5, 1, ref rowsCount, new Eyousoft_yhq.Model.SerProduct() { PurductType = TypeId });
     foreach (var model in list)
     {
         string picUrl = "";
         //if (!String.IsNullOrEmpty(model.ProductPhoto))
         //{
         //    string Photo = model.ProductPhoto + "S_" + System.IO.Path.GetFileName(model.ProductPhoto);
         //    string file = System.IO.Path.GetFileName(Photo);
         //    picUrl = Photo.Substring(0, Photo.Length - file.Length) + "S_" + file;
         //}
         NewsReplyMessageItem itm = new NewsReplyMessageItem()
         {
             Description = model.ProductName,
             Url = "http://oa.finawin.cn/APP/WeiXin/ProductDetail.aspx?OpenId=" + FromUserName + "&id=" + model.ProductID.ToString(),
             PicUrl = picUrl,
             Title = model.ProductName
         };
         items.Add(itm);
     }
     NewsReplyMessage replyMsg = new NewsReplyMessage()
     {
         CreateTime = Tools.ConvertDateTimeInt(DateTime.Now),
         FromUserName = ToUserName,
         ToUserName = FromUserName,
         Articles = items
     };
     MessageHandler.SendReplyMessage(replyMsg);
     return true;
 }
예제 #47
0
        protected string MemberOrder(string PId)
        {
            var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();

            //用户是否登录
            if (model != null)
            {
                Eyousoft_yhq.BLL.Product ProductBll = new Eyousoft_yhq.BLL.Product();

                var ProModel = ProductBll.GetModel(PId);
                Eyousoft_yhq.Model.Order order = new Eyousoft_yhq.Model.Order();
                //产品是否存在
                if (ProModel != null)
                {
                    if (ProModel != null && ProModel.ResidueNum <= 0)
                    {
                        Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting();
                        //短信数量
                        if (exModel != null && exModel.MsgNumber > 0)
                        {
                            IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels();
                            bool IsMsgAdd = AddOrder(PId, (int)Eyousoft_yhq.Model.OrderState.未处理, ProModel.AppPrice, out order);
                            if (IsMsgAdd)
                            {
                                string result  = string.Empty; //返回发送结果
                                string sendNum = string.Empty; //发送账号
                                Eyousoft_yhq.BLL.ProductType ProductTypeBll = new Eyousoft_yhq.BLL.ProductType();
                                var ProductTypeModel = ProductTypeBll.GetModel(ProModel.ProductType);
                                var AdminUser        = new EyouSoft.Model.SSOStructure.MWebmasterInfo();
                                if (ProductTypeModel != null)
                                {
                                    for (int i = 0; i < ProductTypeModel.AdminName.Count; i++)
                                    {
                                        AdminUser = new Eyousoft_yhq.BLL.User().GetModel(ProductTypeModel.AdminName[i].AdminN);
                                        if (AdminUser != null)
                                        {
                                            sendNum = AdminUser.Telephone;
                                        }
                                        string Msg = string.Format("产品{0}有未处理订单,订单号:{1}!【惠旅游】", ProModel.ProductName, order.OrderCode);
                                        Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(sendNum, Msg, channel[0], out result);//发送
                                        #region  短信日志
                                        Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                                        {
                                            TelCode  = sendNum,
                                            MsgText  = Msg,
                                            ReResult = result
                                        };
                                        new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                                        #endregion
                                    }
                                }
                                if (result == "成功")
                                {
                                    return(UtilsCommons.AjaxReturnJson("1", "下单成功,订单由客服人员进行座位确认,在72小时内会短信通知您是否成交"));
                                }
                                return(UtilsCommons.AjaxReturnJson("1", "下单成功,我们会尽快与您联系!"));
                            }
                            else
                            {
                                return(UtilsCommons.AjaxReturnJson("0", "下单失败,请重新下单"));
                            }
                        }
                        else
                        {
                            return(UtilsCommons.AjaxReturnJson("0", "短信系统维护中,请稍后再试!"));
                        }
                    }
                    else
                    {
                        bool IsAdd = AddOrder(PId, (int)Eyousoft_yhq.Model.OrderState.待付款, ProModel.AppPrice, out order);
                        if (IsAdd)
                        {
                            return(UtilsCommons.AjaxReturnJson("99", "下单成功,请付款", order.OrderID));
                        }
                        else
                        {
                            return(UtilsCommons.AjaxReturnJson("0", "下单失败,请重新下单"));
                        }
                    }
                }
                else
                {
                    return(UtilsCommons.AjaxReturnJson("0", "商品已下价!"));
                }
            }
            else
            {
                return(UtilsCommons.AjaxReturnJson("2", "请先登录再操作!"));
            }
        }
예제 #48
0
        protected void initPage(string strid)
        {
            var model = new Eyousoft_yhq.BLL.Product().GetModel(strid);

            if (model != null)
            {
                txtproductName.Value = model.ProductName;
                if (ddltype.Items.FindByValue(model.ProductType.ToString()) != null)
                    ddltype.Items.FindByValue(model.ProductType.ToString()).Selected = true;
                if (ddl_isHot.Items.FindByValue(model.IsHot.ToString()) != null)
                    ddl_isHot.Items.FindByValue(model.IsHot.ToString()).Selected = true;
                if (ddl_contact.Items.FindByValue(((int)model.ContractType).ToString()) != null)
                    ddl_contact.Items.FindByValue(((int)model.ContractType).ToString()).Selected = true;
                #region  新增二维码,产品类型

                if (ddl_proType.Items.FindByValue(((int)model.ProductOpState).ToString()) != null)
                    ddl_proType.Items.FindByValue(((int)model.ProductOpState).ToString()).Selected = true;
                txtZxingdate.Value = model.ZCodeViaDate.ToString("yyyy-MM-dd");

                #endregion
                if (model.IsEveryDay)
                {
                    chk_Isevery.Checked = true;
                    everyDay = 1;
                }
                else
                {
                    txtsendDate.Value = Utils.GetDateTime(model.TourDate.ToString()).ToString("yyyy-MM-dd");
                }
                txtmarkPrice.Value = model.MarketPrice.ToString("0.00");
                txtappPrice.Value = model.AppPrice.ToString("0.00");
                txtWXcode.Value = model.FavourCode;
                txttel.Value = model.LinkTel;
                txtdescript.InnerText = model.ProductDis;
                txtjoury.InnerText = model.TourDis;
                txtsendMark.InnerText = model.SendTourKnow;
                txtScompare.InnerText = model.Scompare; ;
                txtValidate.Value = model.ValidiDate.ToString("yyyy-MM-dd");
                txtWXcode.Value = model.FavourCode;
                // model.AttachList
                #region 附件处理
                //附件
                StringBuilder strFile = new StringBuilder();
                StringBuilder strWebFile = new StringBuilder();
                IList<Eyousoft_yhq.Model.Attach> lstFile = model.AttachList;
                if (null != lstFile && lstFile.Count > 0)
                {
                    for (int i = 0; i < lstFile.Count; i++)
                    {
                        if (lstFile[i].IsWebImage)
                        {
                            strWebFile.AppendFormat("<span class='upload_filename'><a href='{0}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"pageOpt.RemoveFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideWebFileInfo\" value='{1}|{0}|{2}'/></span>", lstFile[i].FilePath, lstFile[i].Name, lstFile[i].IsWebImage);
                        }
                        else
                        {
                            strFile.AppendFormat("<span class='upload_filename'><a href='{0}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"pageOpt.RemoveFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{1}|{0}|{2}'/></span>", lstFile[i].FilePath, lstFile[i].Name, lstFile[i].IsWebImage);
                        }
                    }
                }
                this.lblfile.Text = strFile.ToString();//附件
                this.lblfileWeb.Text = strWebFile.ToString();//网站图片
                txtkfqq.Value = model.ServiceQQ;
                txtPeopleNum.Value = model.ControlPeople.ToString();
                #endregion

            }
        }
예제 #49
0
        protected void pageSave(string doType)
        {
            string id = Utils.GetQueryStringValue("id");
            var model = new Eyousoft_yhq.Model.Product();

            #region 实体赋值

            model.ProductName = Utils.GetFormValue(txtproductName.UniqueID);
            model.ProductType = 0;
            model.TourDate = Utils.GetDateTimeNullable(Utils.GetFormValue(txtsendDate.UniqueID));
            model.MarketPrice = Utils.GetDecimal(Utils.GetFormValue(txtmarkPrice.UniqueID));
            model.AppPrice = Utils.GetDecimal(Utils.GetFormValue(txtappPrice.UniqueID));
            //model.FavourCode = Utils.GetFormValue(txtcoupons.UniqueID);
            model.FavourCode = Utils.GetFormValue(txtWXcode.UniqueID);
            model.LinkTel = Utils.GetFormValue(txttel.UniqueID);
            model.ProductDis = Utils.GetFormValue(txtdescript.UniqueID);
            model.TourDis = Utils.GetFormValue(txtStation.UniqueID);
            model.SendTourKnow = Utils.GetFormValue(txtjoury.UniqueID);
            model.ValidiDate = Utils.GetDateTime(Utils.GetFormValue(txtValidate.UniqueID));
            model.ProductState = 0;
            model.AttachList = NewGetAttach();
            model.IsEveryDay = false;
            model.IsHot = 0;
            model.ServiceQQ = Utils.GetFormValue(txtkfqq.UniqueID);
            model.ContractType = Model.ContractType.车票;
            model.ControlPeople = Utils.GetInt(Utils.GetFormValue(txtPeopleNum.UniqueID));

            model.ProductSdate = Utils.GetDateTime(Utils.GetFormValue(txtsendsDate.UniqueID));
            model.ProductOpState = (Model.ProductOp)Utils.GetInt(Utils.GetFormValue(ddl_proType.UniqueID));
            model.ZCodeViaDate = Utils.GetDateTime(Utils.GetFormValue(txtZxingdate.UniqueID));
            model.PType = 2;
            #endregion

            cn.myvo.smc.Service sms = new cn.myvo.smc.Service();
            string IsContact = sms.IsIncludeKeyWord(model.ProductName);

            #region 提交保存
            bool result = false;
            string msg = "";

            if (string.IsNullOrEmpty(IsContact))
            {
                Response.Clear();
                Eyousoft_yhq.BLL.Product BLL = new Eyousoft_yhq.BLL.Product();
                if (doType == "add")
                {
                    result = BLL.Add(model);
                    msg = result ? "添加成功!" : "添加失败!";
                    Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                }
                else
                {
                    model.ProductID = id;
                    result = BLL.Update(model);
                    msg = result ? "修改成功!" : "修改失败!";
                    Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                }
                Response.End();
            }
            else
            {
                msg = "产品名称包含敏感字符[" + IsContact + "],请修改后再保存!";
                Response.Clear();
                Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                Response.End();
            }
            #endregion
        }
예제 #50
0
        protected void sendMsg(string pid, string FavourCode)
        {
            Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting();
            if (exModel.MsgNumber > 0)
            {

                var model = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
                IList<Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels();
                string code = string.Empty;

                if (model != null && model.UserName != "")
                {

                    bool isSend = new Eyousoft_yhq.BLL.SendMsg().exists(model.UserName, pid, FavourCode);
                    if (isSend)
                    {
                        result = "您已经领取过此产品的优惠码!";
                        return;
                    }
                    if (!model.valiUser)
                    {
                        var sendModel = new Eyousoft_yhq.BLL.Product().GetModel(pid);
                        if (sendModel != null && !sendModel.IsEveryDay)
                        {
                            code = string.Format("您成功获取{0},{3}出团,优惠价{1}元,优惠码:{2}!【惠旅游】"
                                , sendModel.ProductName
                                , sendModel.AppPrice.ToString("C2")
                                , sendModel.FavourCode
                                , Utils.GetDateTime(sendModel.TourDate.ToString()).ToString("yyyy-MM-dd"));

                            Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(model.UserName, code, channel[0], out result);//发送

                        }
                        else if (sendModel != null && sendModel.IsEveryDay)
                        {
                            code = string.Format("您成功获取{0},优惠价{1}元,优惠码:{2}!【惠旅游】"
                                , sendModel.ProductName
                                , sendModel.AppPrice.ToString("C2")
                                , sendModel.FavourCode);

                            Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(model.UserName, code, channel[0], out result);//发送
                        }
                        else
                        {
                            result = "此产品已下架!";
                        }

                        #region  短信日志
                        Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                        {
                            TelCode = model.UserName,
                            MsgText = code,
                            ReResult = result
                        };
                        new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                        #endregion
                    }
                }
                else
                {
                    Response.Redirect("/login.aspx");
                }
                if (result == "成功")
                {
                    int minusNum = code.Length % 70 == 0 ? code.Length / 70 : (code.Length / 70) + 1;
                    new Eyousoft_yhq.BLL.SendMsg().Add(new Eyousoft_yhq.Model.SendMSG
                    {
                        SendNum = model.UserName,
                        SendText = code,
                        IssueTime = DateTime.Now,
                        ProductID = pid,
                        minusNum = minusNum,
                        FavourCode = FavourCode
                    });
                    result = "短信已发送,请注意查收!";
                }
                else
                {
                    result = "领取失败!";
                }
            }
            else
            {
                result = "短信系统维护中,请稍后再试!";
            }
        }
예제 #51
0
        /// <summary>
        /// 添加订单
        /// </summary>
        /// <returns></returns>
        private string saveOrder()
        {
            Eyousoft_yhq.Model.OrderState Orderstate = Eyousoft_yhq.Model.OrderState.未处理;
            int orderNums = Utils.GetInt(Utils.GetFormValue("orderNum"));
            string id = Utils.GetFormValue("id");
            var model = new Eyousoft_yhq.BLL.Product().GetModel(id);
            if (model != null)
            {
                if (model.ResidueNum - orderNums >= 0)
                {
                    Orderstate = Eyousoft_yhq.Model.OrderState.待付款;
                }
                Eyousoft_yhq.BLL.Order OrderBll = new Eyousoft_yhq.BLL.Order();
                var MemberModel = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
                if (MemberModel != null)
                {
                    Eyousoft_yhq.Model.Order OrderModel = new Eyousoft_yhq.Model.Order()
                    {
                        ProductID = id,
                        OrderCode = DateTime.Now.ToString("yyyy-MM-dd "),
                        MemberID = MemberModel.UserID,
                        MemberTel = Utils.GetFormValue("receiveMobile"),
                        MemberName = Utils.GetFormValue("receiveName"),
                        MemberSex = MemberModel.ContactSex,
                        OrderState = Orderstate,
                        PayState = Eyousoft_yhq.Model.PaymentState.未支付,
                        IsCheck = true,
                        ConfirmCode = "",
                        Remark = "",
                        OrderPrice = model.AppPrice * orderNums,
                        PeopleNum = orderNums
                    };
                    int num = OrderBll.Add(OrderModel);
                    if (num > 0 && Orderstate == Eyousoft_yhq.Model.OrderState.待付款)
                    {
                        return UtilsCommons.AjaxReturnJson("1", "操作成功,请及时付款!", OrderModel.OrderID);
                    }
                    if (num > 0 && Orderstate == Eyousoft_yhq.Model.OrderState.未处理)
                    {
                        string result = string.Empty;//返回发送结果
                        string sendNum = string.Empty; //发送账号
                        Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting();
                        if (exModel == null || exModel.MsgNumber <= 0) return UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!短信发送失败,请联系我们!");
                        IList<Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels();
                        var ProductTypeModel = new Eyousoft_yhq.BLL.ProductType().GetModel(model.ProductType);

                        if (ProductTypeModel == null || ProductTypeModel.AdminName == null)
                        {
                            sendNum = HuiYuanInfo.ContactTel;
                            string Msg = "收到新订单请处理,订单号为:" + OrderModel.OrderCode.Trim() + "!【惠旅游】";

                            Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(sendNum, Msg, channel[0], out result);//发送
                            #region  短信日志
                            Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                            {
                                TelCode = sendNum,
                                MsgText = Msg,
                                ReResult = result
                            };
                            new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                            #endregion
                        }
                        else
                        {
                            for (int i = 0; i < ProductTypeModel.AdminName.Count; i++)
                            {
                                sendNum = new Eyousoft_yhq.BLL.User().GetModel(ProductTypeModel.AdminName[i].AdminN).Telephone;
                                string Msg = "收到新订单请处理,订单号为:" + OrderModel.OrderCode.Trim() + "!【惠旅游】";

                                Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(sendNum, Msg, channel[0], out result);//发送
                                #region  短信日志
                                Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                                {
                                    TelCode = sendNum,
                                    MsgText = Msg,
                                    ReResult = result
                                };
                                new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                                #endregion
                            }
                        }
                        if (result == "成功") return UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!已通知客服人员!");
                        return UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!短信发送失败,请联系我们!");

                    }
                    return UtilsCommons.AjaxReturnJson("0", "操作失败!");
                }
                else
                {
                    return UtilsCommons.AjaxReturnJson("0", "操作失败,请登陆后重新操作... ...");
                }
            }
            return UtilsCommons.AjaxReturnJson("0", "操作失败,此产品已经下架... ...");
        }
예제 #52
0
        protected void initList()
        {
            Eyousoft_yhq.BLL.Product bll = new Eyousoft_yhq.BLL.Product();
            Eyousoft_yhq.Model.SerProduct serchModel = new Eyousoft_yhq.Model.SerProduct();
            serchModel.PurductName = Utils.GetQueryStringValue("productName");

            if (Utils.GetQueryStringValue("proType") == "-2")
            {
                serchModel.PType = 2;
            }
            else if (Utils.GetQueryStringValue("proType") == "-3")
            {
                serchModel.PType = 3;
            }
            else
            {
                serchModel.PurductType = Utils.GetQueryStringValue("proType");
                serchModel.PType = 1;
            }
            serchModel.isVisable = false;
            var list = bll.GetList(pagesize, pageindex, ref recordCount, serchModel);

            if (list != null && list.Count > 0)
            {
                rpt_list.DataSource = list;
                rpt_list.DataBind();
            }
            else
            {
                PlaceHolder1.Visible = false;
            }
        }
예제 #53
0
        protected void initPage(string strid)
        {
            var model = new Eyousoft_yhq.BLL.Product().GetModel(strid);

            if (model != null)
            {
                txtproductName.Value = model.ProductName;

                #region  新增二维码,产品类型

                if (ddl_proType.Items.FindByValue(((int)model.ProductOpState).ToString()) != null)
                {
                    ddl_proType.Items.FindByValue(((int)model.ProductOpState).ToString()).Selected = true;
                }
                txtZxingdate.Value = model.ZCodeViaDate.ToString("yyyy-MM-dd");

                #endregion
                if (model.IsEveryDay)
                {
                }
                else
                {
                    txtsendsDate.Value = model.ProductSdate.ToString("yyyy-MM-dd");
                    txtsendDate.Value  = Utils.GetDateTime(model.TourDate.ToString()).ToString("yyyy-MM-dd");
                }
                txtmarkPrice.Value = model.MarketPrice.ToString("0.00");
                txtappPrice.Value  = model.AppPrice.ToString("0.00");
                txtWXcode.Value    = model.FavourCode;
                // txtcoupons.Value = model.FavourCode;
                txttel.Value          = model.LinkTel;
                txtdescript.InnerText = model.ProductDis;
                txtStation.Value      = model.TourDis;
                txtjoury.InnerText    = model.SendTourKnow;
                txtValidate.Value     = model.ValidiDate.ToString("yyyy-MM-dd");

                // model.AttachList
                #region 附件处理
                //附件
                StringBuilder strFile    = new StringBuilder();
                StringBuilder strWebFile = new StringBuilder();
                IList <Eyousoft_yhq.Model.Attach> lstFile = model.AttachList;
                if (null != lstFile && lstFile.Count > 0)
                {
                    for (int i = 0; i < lstFile.Count; i++)
                    {
                        if (lstFile[i].IsWebImage)
                        {
                            strWebFile.AppendFormat("<span class='upload_filename'><a href='{0}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"pageOpt.RemoveFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideWebFileInfo\" value='{1}|{0}|{2}'/></span>", lstFile[i].FilePath, lstFile[i].Name, lstFile[i].IsWebImage);
                        }
                        else
                        {
                            strFile.AppendFormat("<span class='upload_filename'><a href='{0}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"pageOpt.RemoveFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{1}|{0}|{2}'/></span>", lstFile[i].FilePath, lstFile[i].Name, lstFile[i].IsWebImage);
                        }
                    }
                }
                this.lblfile.Text    = strFile.ToString();    //附件
                this.lblfileWeb.Text = strWebFile.ToString(); //网站图片
                txtkfqq.Value        = model.ServiceQQ;
                txtPeopleNum.Value   = model.ControlPeople.ToString();
                #endregion
            }
        }
예제 #54
0
        protected void pageSave(string doType)
        {
            string id    = Utils.GetQueryStringValue("id");
            var    model = new Eyousoft_yhq.Model.Product();

            #region 实体赋值

            model.ProductName   = Utils.GetFormValue(txtproductName.UniqueID);
            model.ProductType   = Utils.GetInt(Utils.GetFormValue(ddltype.UniqueID));
            model.TourDate      = Utils.GetDateTimeNullable(Utils.GetFormValue(txtsendDate.UniqueID));
            model.MarketPrice   = Utils.GetDecimal(Utils.GetFormValue(txtmarkPrice.UniqueID));
            model.AppPrice      = Utils.GetDecimal(Utils.GetFormValue(txtappPrice.UniqueID));
            model.LinkTel       = Utils.GetFormValue(txttel.UniqueID);
            model.ProductDis    = Utils.GetFormValue(txtdescript.UniqueID);
            model.TourDis       = Utils.GetFormValue(txtjoury.UniqueID);
            model.SendTourKnow  = Utils.GetFormValue(txtsendMark.UniqueID);
            model.Scompare      = Utils.GetFormValue(txtScompare.UniqueID);
            model.ValidiDate    = Utils.GetDateTime(Utils.GetFormValue(txtValidate.UniqueID));
            model.ProductState  = 0;
            model.AttachList    = NewGetAttach();
            model.IsEveryDay    = Utils.GetFormValue("isEvery") == "1" ? true : false;
            model.IsHot         = Utils.GetInt(Utils.GetFormValue(ddl_isHot.UniqueID));
            model.ServiceQQ     = Utils.GetFormValue(txtkfqq.UniqueID);
            model.ContractType  = (Model.ContractType)Utils.GetInt(Utils.GetFormValue(ddl_contact.UniqueID));
            model.ControlPeople = Utils.GetInt(Utils.GetFormValue(txtPeopleNum.UniqueID));

            model.ProductOpState = (Model.ProductOp)Utils.GetInt(Utils.GetFormValue(ddl_proType.UniqueID));
            model.ZCodeViaDate   = Utils.GetDateTime(Utils.GetFormValue(txtZxingdate.UniqueID));
            model.PType          = 1;
            model.ProductSdate   = DateTime.Now;
            model.FavourCode     = Utils.GetFormValue(txtWXcode.UniqueID);

            model.FaBuRenId    = HuiYuanInfo.UserId;
            model.ShenHeStatus = Eyousoft_yhq.Model.ChanPinShenHeStatus.已审核;
            if (HuiYuanInfo.LeiXing == Eyousoft_yhq.Model.WebmasterLeiXing.供应商)
            {
                model.ShenHeStatus = Eyousoft_yhq.Model.ChanPinShenHeStatus.未审核;
            }
            #endregion



            if (new Eyousoft_yhq.BLL.Product().Exists(model))
            {
                Response.Clear();
                Response.Write(UtilsCommons.AjaxReturnJson("0", "此微信码已被使用"));
                Response.End();
            }

            cn.myvo.smc.Service sms = new cn.myvo.smc.Service();
            string IsContact        = sms.IsIncludeKeyWord(model.ProductName);
            #region 提交保存
            bool   result = false;
            string msg    = "";

            if (string.IsNullOrEmpty(IsContact))
            {
                Response.Clear();
                Eyousoft_yhq.BLL.Product BLL = new Eyousoft_yhq.BLL.Product();
                if (doType == "add")
                {
                    result = BLL.Add(model);
                    msg    = result ? "添加成功!" : "添加失败!";
                    Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                }
                else
                {
                    model.ProductID = id;
                    result          = BLL.Update(model);
                    msg             = result ? "修改成功!" : "修改失败!";
                    Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                }
                Response.End();
            }
            else
            {
                msg = "产品名称包含敏感字符[" + IsContact + "],请修改后再保存!";
                Response.Clear();
                Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                Response.End();
            }
            #endregion
        }
예제 #55
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        protected void initPage()
        {
            EyouSoft.Model.SSOStructure.MUserInfo info = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
            if (info != null)
            {
                isLogin = "******";
            }

            string id = Utils.GetQueryStringValue("id");
            var model = new Eyousoft_yhq.BLL.Product().GetModel(id);
            if (model != null)
            {
                yhm = model.FavourCode;
                lblproductName.Text = lblMenuTitle.Text = model.ProductName;
                lbldescript.Text = Utils.GetText2(model.ProductDis, 100, true);
                lblprice.Text = model.AppPrice.ToString("0");
                lblZK.Text = ((model.AppPrice / model.MarketPrice) * 10).ToString("0.0");
                lblMarketPrice.Text = model.MarketPrice.ToString("C0");
                lblSaleCount.Text = model.SaleNum.ToString();
                ltrDescript.Text = model.ProductDis.Replace("\n", "<br/>");
                ltrTour.Text = model.TourDis.Replace("\n", "<br/>");
                ltrKown.Text = model.SendTourKnow.Replace("\n", "<br/>");
                ltrCompair.Text = model.Scompare.Replace("\n", "<br/>");
                if (!string.IsNullOrEmpty(model.ServiceQQ))
                {
                    lblQQ.Text = string.Format("<a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?v=3&uin={0}&site=qq&menu=yes\"  ><img src=\"/images/qq.gif\"></a>", model.ServiceQQ);
                }
                else
                {
                    lblQQ.Text = "<a href=\"javascript:;\" ><img src=\"/images/qq.gif\"></a>";
                }
                if (model.AttachList != null)
                {
                    for (int i = 0; i < model.AttachList.Count; i++)
                    {
                        if (model.AttachList[i].IsWebImage) lblImg.Text = string.Format("<img src=\"{0}\" style=\"width:455px;height:280px\" />", model.AttachList[i].FilePath);
                    }
                }
                else
                {
                    lblImg.Text = "<img src=\"/images/pro_mainpic.jpg\" />";
                }
                pinglunshu = new Eyousoft_yhq.BLL.Comment().GetCountNum(model.ProductID).ToString();

                if (DateTime.Compare(DateTime.Now, Utils.GetDateTime(model.ValidiDate.ToString())) > 0 && !model.IsEveryDay)
                {
                    place_Viadate.Visible = false;
                    place_isViadate.Visible = true;
                }
                switch (model.PType)
                {
                    case 2:
                        getType = "车票";
                        lblKnow.Text = "使用须知";
                        PlaceHolder1.Visible = PlaceHolder2.Visible = false;
                        break;
                    case 3:
                        getType = "景点门票";
                        lblKnow.Text = "使用须知";
                        PlaceHolder1.Visible = PlaceHolder2.Visible = false;
                        break;
                    default:
                        break;
                }

            }
        }
예제 #56
0
        protected void pageSave(string doType)
        {
            string id = Utils.GetQueryStringValue("id");
            var model = new Eyousoft_yhq.Model.Product();

            #region 实体赋值

            model.ProductName = Utils.GetFormValue(txtproductName.UniqueID);
            model.ProductType = Utils.GetInt(Utils.GetFormValue(ddltype.UniqueID));
            model.TourDate = Utils.GetDateTimeNullable(Utils.GetFormValue(txtsendDate.UniqueID));
            model.MarketPrice = Utils.GetDecimal(Utils.GetFormValue(txtmarkPrice.UniqueID));
            model.AppPrice = Utils.GetDecimal(Utils.GetFormValue(txtappPrice.UniqueID));
            model.LinkTel = Utils.GetFormValue(txttel.UniqueID);
            model.ProductDis = Utils.GetFormValue(txtdescript.UniqueID);
            model.TourDis = Utils.GetFormValue(txtjoury.UniqueID);
            model.SendTourKnow = Utils.GetFormValue(txtsendMark.UniqueID);
            model.Scompare = Utils.GetFormValue(txtScompare.UniqueID);
            model.ValidiDate = Utils.GetDateTime(Utils.GetFormValue(txtValidate.UniqueID));
            model.ProductState = 0;
            model.AttachList = NewGetAttach();
            model.IsEveryDay = Utils.GetFormValue("isEvery") == "1" ? true : false;
            model.IsHot = Utils.GetInt(Utils.GetFormValue(ddl_isHot.UniqueID));
            model.ServiceQQ = Utils.GetFormValue(txtkfqq.UniqueID);
            model.ContractType = (Model.ContractType)Utils.GetInt(Utils.GetFormValue(ddl_contact.UniqueID));
            model.ControlPeople = Utils.GetInt(Utils.GetFormValue(txtPeopleNum.UniqueID));

            model.ProductOpState = (Model.ProductOp)Utils.GetInt(Utils.GetFormValue(ddl_proType.UniqueID));
            model.ZCodeViaDate = Utils.GetDateTime(Utils.GetFormValue(txtZxingdate.UniqueID));
            model.PType = 1;
            model.ProductSdate = DateTime.Now;
            model.FavourCode = Utils.GetFormValue(txtWXcode.UniqueID);

            model.FaBuRenId = HuiYuanInfo.UserId;
            model.ShenHeStatus = Eyousoft_yhq.Model.ChanPinShenHeStatus.已审核;
            if (HuiYuanInfo.LeiXing == Eyousoft_yhq.Model.WebmasterLeiXing.供应商)
            {
                model.ShenHeStatus = Eyousoft_yhq.Model.ChanPinShenHeStatus.未审核;
            }
            #endregion

            if (new Eyousoft_yhq.BLL.Product().Exists(model))
            {
                Response.Clear();
                Response.Write(UtilsCommons.AjaxReturnJson("0", "此微信码已被使用"));
                Response.End();
            }

            cn.myvo.smc.Service sms = new cn.myvo.smc.Service();
            string IsContact = sms.IsIncludeKeyWord(model.ProductName);
            #region 提交保存
            bool result = false;
            string msg = "";

            if (string.IsNullOrEmpty(IsContact))
            {
                Response.Clear();
                Eyousoft_yhq.BLL.Product BLL = new Eyousoft_yhq.BLL.Product();
                if (doType == "add")
                {
                    result = BLL.Add(model);
                    msg = result ? "添加成功!" : "添加失败!";
                    Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                }
                else
                {
                    model.ProductID = id;
                    result = BLL.Update(model);
                    msg = result ? "修改成功!" : "修改失败!";
                    Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                }
                Response.End();
            }
            else
            {
                msg = "产品名称包含敏感字符[" + IsContact + "],请修改后再保存!";
                Response.Clear();
                Response.Write(UtilsCommons.AjaxReturnJson(result ? "1" : "0", msg));
                Response.End();
            }
            #endregion
        }
예제 #57
0
        protected void DownWord()
        {
            string wordTemplate = "";
            var    model        = new Eyousoft_yhq.BLL.Product().GetModel(Utils.GetQueryStringValue("routeid"));

            if (model != null)
            {
                #region 文本内容
                wordTemplate = @"
                <html>
                <head>
                    <title>打印预览</title>
                    <style type=""text/css"">
                    body {{color:#000000;font-size:12px;font-family:""宋体"";background:#fff; margin:0px;}}
                    img {{border: thin none;}}
                    table {{border-collapse:collapse;width:790px;}}
                    td {{font-size: 12px; line-height:18px;color: #000000;  }}	
                    .headertitle {{font-family:""黑体""; font-size:25px; line-height:120%; font-weight:bold;}}
                    </style>
                </head>
                <body>
                    <div id=""divAllHtml"" style=""width: 760px; margin: 0 auto;"">
        <div id=""divContent"">
            <table width=""696"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">
                <tr>
                    <td height=""40"" align=""center"">
                        <b class=""font24"">
                            {0}</b>
                    </td>
                </tr>
            </table>
            <table width=""696"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" runat=""server""
                id=""TPlanFeature"" class=""borderline_2"">
                <tr>
                    <td height=""30"" class=""small_title"">
                        <b class=""font16"">产品介绍</b>
                    </td>
                </tr>
                <tr>
                    <td class=""td_text"">
                        {1}
                    </td>
                </tr>
            </table>
            <table width=""696"" cellspacing=""0"" cellpadding=""0"" border=""0"" align=""center"" id=""TAll""
                runat=""server"" class=""borderline_2"">
                <tbody>
                    <tr>
                        <td height=""30"" class=""small_title"">
                            <b class=""font16"">参考行程</b>
                        </td>
                    </tr>
                    <tr>
                        <td class=""td_text"">
                            {2}
                        </td>
                    </tr>
                </tbody>
            </table>
            <div id=""TOption"" runat=""server"">
                <table width=""696"" cellspacing=""0"" cellpadding=""0"" border=""0"" align=""center"" class=""list_2"">
                    <tbody>
                        <tr>
                            <td height=""30"" class=""small_title"">
                                <b class=""font16"">出团须知</b>
                            </td>
                        </tr>
                        <tr>
                            <td class=""td_text"">
                               {3}
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div runat=""server"" id=""TPlanService"">
                <table width=""696"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" runat=""server""
                    id=""TService"" class=""borderline_2"">
                    <tr>
                        <td height=""30"" class=""small_title"">
                            <b class=""font16"">价格标准</b>
                        </td>
                    </tr>
                    <tr>
                        <td class=""td_text borderline_2"">
                           市场价格:{4},会员价格:{5}
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
                </body>
                </html>";
                #endregion

                HttpContext.Current.Response.Clear();
                string saveFileName       = HttpUtility.UrlEncode(DateTime.Now.ToString("yyyyMMddhhssffff") + ".doc", System.Text.Encoding.Default);
                System.IO.StringWriter tw = new System.IO.StringWriter();

                tw.Write(string.Format(wordTemplate, model.ProductName, model.ProductDis, model.TourDis, model.SendTourKnow, model.MarketPrice.ToString("C0"), model.AppPrice.ToString("C0")).ToString());
                WriteFile(tw.ToString(), saveFileName);
                FileInfo Inf = new FileInfo(Server.MapPath(@"TemFile/" + saveFileName));
                HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + saveFileName);
                HttpContext.Current.Response.Charset         = "GB2312";
                HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default;
                HttpContext.Current.Response.ContentType     = "application/ms-word ";
                Page.EnableViewState = false;

                HttpContext.Current.Response.WriteFile(Inf.FullName);
                HttpContext.Current.Response.Flush();
                HttpContext.Current.Response.End();
            }
        }
예제 #58
0
        /// <summary>
        /// 添加订单
        /// </summary>
        /// <returns></returns>
        private string saveOrder()
        {
            Eyousoft_yhq.Model.OrderState Orderstate = Eyousoft_yhq.Model.OrderState.未处理;
            int    orderNums = Utils.GetInt(Utils.GetFormValue("orderNum"));
            string id        = Utils.GetFormValue("id");
            var    model     = new Eyousoft_yhq.BLL.Product().GetModel(id);

            if (model != null)
            {
                if (model.ResidueNum - orderNums >= 0)
                {
                    Orderstate = Eyousoft_yhq.Model.OrderState.待付款;
                }
                Eyousoft_yhq.BLL.Order OrderBll = new Eyousoft_yhq.BLL.Order();
                var MemberModel = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
                if (MemberModel != null)
                {
                    Eyousoft_yhq.Model.Order OrderModel = new Eyousoft_yhq.Model.Order()
                    {
                        ProductID   = id,
                        OrderCode   = DateTime.Now.ToString("yyyy-MM-dd "),
                        MemberID    = MemberModel.UserID,
                        MemberTel   = Utils.GetFormValue("receiveMobile"),
                        MemberName  = Utils.GetFormValue("receiveName"),
                        MemberSex   = MemberModel.ContactSex,
                        OrderState  = Orderstate,
                        PayState    = Eyousoft_yhq.Model.PaymentState.未支付,
                        IsCheck     = true,
                        ConfirmCode = "",
                        Remark      = "",
                        OrderPrice  = model.AppPrice * orderNums,
                        PeopleNum   = orderNums
                    };
                    int num = OrderBll.Add(OrderModel);
                    if (num > 0 && Orderstate == Eyousoft_yhq.Model.OrderState.待付款)
                    {
                        return(UtilsCommons.AjaxReturnJson("1", "操作成功,请及时付款!", OrderModel.OrderID));
                    }
                    if (num > 0 && Orderstate == Eyousoft_yhq.Model.OrderState.未处理)
                    {
                        string result  = string.Empty; //返回发送结果
                        string sendNum = string.Empty; //发送账号
                        Eyousoft_yhq.Model.MCompanySetting exModel = new Eyousoft_yhq.BLL.KV().GetCompanySetting();
                        if (exModel == null || exModel.MsgNumber <= 0)
                        {
                            return(UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!短信发送失败,请联系我们!"));
                        }
                        IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels();
                        var ProductTypeModel = new Eyousoft_yhq.BLL.ProductType().GetModel(model.ProductType);

                        if (ProductTypeModel == null || ProductTypeModel.AdminName == null)
                        {
                            sendNum = HuiYuanInfo.ContactTel;
                            string Msg = "收到新订单请处理,订单号为:" + OrderModel.OrderCode.Trim() + "!【惠旅游】";

                            Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(sendNum, Msg, channel[0], out result);//发送
                            #region  短信日志
                            Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                            {
                                TelCode  = sendNum,
                                MsgText  = Msg,
                                ReResult = result
                            };
                            new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                            #endregion
                        }
                        else
                        {
                            for (int i = 0; i < ProductTypeModel.AdminName.Count; i++)
                            {
                                sendNum = new Eyousoft_yhq.BLL.User().GetModel(ProductTypeModel.AdminName[i].AdminN).Telephone;
                                string Msg = "收到新订单请处理,订单号为:" + OrderModel.OrderCode.Trim() + "!【惠旅游】";

                                Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(sendNum, Msg, channel[0], out result);//发送
                                #region  短信日志
                                Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                                {
                                    TelCode  = sendNum,
                                    MsgText  = Msg,
                                    ReResult = result
                                };
                                new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                                #endregion
                            }
                        }
                        if (result == "成功")
                        {
                            return(UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!已通知客服人员!"));
                        }
                        return(UtilsCommons.AjaxReturnJson("2", "操作成功,等待审核!短信发送失败,请联系我们!"));
                    }
                    return(UtilsCommons.AjaxReturnJson("0", "操作失败!"));
                }
                else
                {
                    return(UtilsCommons.AjaxReturnJson("0", "操作失败,请登陆后重新操作... ..."));
                }
            }
            return(UtilsCommons.AjaxReturnJson("0", "操作失败,此产品已经下架... ..."));
        }