Exemplo n.º 1
0
        public void BindDdl()
        {
            string url      = WebToolHelper.GetProfilesUrl();
            var    rollInfo = new DB.BLL.MY_Bll(DBEnum.Slave).GetModelList("SELECT R.*,CONCAT(@PathAdd,R.Picture) AS NPicture FROM M_Roll AS R WHERE R.IsEnable =1 ORDER BY R.OrderBy ASC", new { PathAdd = url }).Select(info => { return(new { info.NPicture, info.TargetSysID, info.TargetUrl }); });

            repeaterNoticeList.DataSource = rollInfo;
            repeaterNoticeList.DataBind();
            string cpyName = WebLoginHelper.GetSimpleName();

            if (!string.IsNullOrEmpty(cpyName))
            {
                cpyNameSpan.InnerHtml = cpyName + "商品专供";
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.HttpMethod.ToLower() == "get")//获取用户端的传输方式(全转化为小写)是否是get传值
            {
                string openid = Convert.ToString(HttpContext.Current.Session[WebLoginHelper.SESSION_OPENID]);

                if (!string.IsNullOrEmpty(openid))
                {
                    DSMT_TAE_ServiceSoapClient pmtCilent      = new DSMT_TAE_ServiceSoapClient();
                    GetQueryUserInfoEntity     userInfoEntity = new GetQueryUserInfoEntity();
                    try
                    {
                        userInfoEntity.OpenID = new DESHelper().Decrypt(openid);
                        new VerifyHelper().EncryptPmtEntity(userInfoEntity);
                        BackQueryUserInfoEntity backUserInfo = pmtCilent.QueryUserInfo(userInfoEntity);
                        new VerifyHelper().CheckPmtSign(ref backUserInfo);
                        uOpenID.InnerHtml = openid;//将加密后的openID写入隐藏控件
                        if (backUserInfo != null)
                        {
                            if (!string.IsNullOrEmpty(backUserInfo.UserNo) && !string.IsNullOrEmpty(backUserInfo.UserPhone))//判断职员编号是否为空//并且手机号码不为空
                            {
                                string telphoneNo  = backUserInfo.UserPhone;
                                string telphoneEnc = new DESHelper().Encrypt(telphoneNo);
                                telephoneNo.Value           = WebToolHelper.HiddenTelephoneNo(telphoneNo); //"18758305045";//替换*号符
                                telephoneUserName.InnerHtml = WebToolHelper.HiddenTelephoneUserName(backUserInfo.RealName);
                                telephoneNo.Attributes.Add("disabled", "disabled");
                                telephoneNo.Attributes.Add("mydata", telphoneEnc);
                                BindingInfo bindingInfo = new BindingInfo();
                                bindingInfo.CpySysID   = backUserInfo.CpySysID;
                                bindingInfo.CpyName    = backUserInfo.CpyName;
                                bindingInfo.SimpleName = backUserInfo.SimpleName;
                                bindingInfo.RealName   = backUserInfo.RealName;
                                bindingInfo.UserGender = backUserInfo.UserGender;
                                bindingInfo.UserNo     = backUserInfo.UserNo;
                                string jsonUserInfo = new JavaScriptSerializer().Serialize(bindingInfo);
                                telephoneUserName.Attributes.Add("mydata", new DESHelper().Encrypt(jsonUserInfo));
                            }
                        }
                    }
                    catch (Exception es) { FileHelper.logger.Error(Convert.ToString(es)); Response.Redirect("/web/mall_Index.aspx?", false); }
                }
                else
                {
                    FileHelper.logger.Info("获取COOKIE的openID失败");
                }
            }
        }
Exemplo n.º 3
0
 private void BindGrid()
 {
     try
     {
         string goodsSysID = Request.QueryString["goodsId"].Trim();
         string url        = WebToolHelper.GetProfilesUrl();
         if (!string.IsNullOrEmpty(goodsSysID))
         {
             StringBuilder strSql = new StringBuilder();
             strSql.Append(" SELECT *,CONCAT(@PathAdd,GLY.ImgUrl) AS NImgUrl FROM M_GoodsGallery AS GLY WHERE GLY.GoodsID =@GoodsID ");
             object dt = new DB.BLL.MY_Bll(DBEnum.Slave).GetModelList(strSql.ToString(), new { PathAdd = url, GoodsID = goodsSysID }).Select(info => { return(new { info.NImgUrl }); });
             repeaterGoodsPicetureShow.DataSource = dt;
             repeaterGoodsPicetureShow.DataBind();
             strSql.Clear();
             strSql.Append(" SELECT G.GoodsID,G.GoodsSn,G.GoodsName,G.BrandID,G.Weight,G.GoodsBrief,G.GoodsDesc,G.MarketPrice,G.ShopPrice,G.QuotaNumber,G.GoodsNumber,B.BrandName,S.SuppliersName,C.CateName,G.SaleNumber,FT.FareTime,");
             strSql.Append(" CASE WHEN FT.FareType=10 THEN '按件数计费' WHEN FT.FareType= 20 THEN '按重量计费' WHEN FT.FareType= 30 THEN '按体积计费' ELSE '未指定运费模板' END NFareType , ");
             strSql.Append(" CONCAT('默认运费:',ROUND(FC.FirstCount),'(件/公斤)内:',FC.FirstMoney,'元,','续:',FC.ContinueMoney,'/(件/公斤)')  AS NFareInfo ");
             strSql.Append(" FROM M_Goods AS G ");
             strSql.Append(" LEFT JOIN M_Brand AS B ON B.BrandID = G.BrandID  ");
             strSql.Append(" LEFT JOIN M_Category AS C ON G.CateID = C.CateID ");
             strSql.Append(" LEFT JOIN M_Suppliers AS S ON S.SuppliersID = G.SuppliersID ");
             strSql.Append(" LEFT JOIN M_FareTemplate AS FT ON G.FareSysID= FT.FareSysID ");
             strSql.Append(" LEFT JOIN M_FareCarry AS FC ON G.FareSysID =FC.FareSysID ");
             strSql.Append(" WHERE G.GoodsID = @GoodsID AND G.IsDelete=0 ORDER BY FC.IsDefault DESC LIMIT 1 ");
             IEnumerable <dynamic> goodsInfo = new DB.BLL.MY_Bll(DBEnum.Slave).GetModelList(strSql.ToString(), new { GoodsID = goodsSysID });
             string fileUrl = WebToolHelper.GetProfilesUrl();
             foreach (var item in goodsInfo)
             {
                 item.GoodsDesc = WebToolHelper.ReplaceImgUrl_1(item.GoodsDesc.ToString(), fileUrl);
             }
             repeaterGoodsInfo.DataSource = goodsInfo.Select(info => { return(new { info.GoodsID, info.GoodsSn, info.GoodsName, info.GoodsDesc, info.MarketPrice, info.ShopPrice, info.GoodsNumber, info.BrandName, info.SuppliersName, info.SaleNumber, info.CateName, info.GoodsBrief, Weight = info.Weight <= 0.1 ? "小于 1":info.Weight, info.NFareType, info.NFareInfo, info.FareTime, info.QuotaNumber, NQuotaNumber = (info.QuotaNumber <= 0) ? "不限购":"件" }); });
             repeaterGoodsInfo.DataBind();
         }
     }
     catch
     {
         Response.Redirect("/web/mall_Index.aspx", false);
     }
 }
Exemplo n.º 4
0
        public void BindDdl()
        {
            string parentCateIDStr = string.Empty;

            if (HttpRuntime.Cache["parentCateID"] == null)
            {
                string url    = WebToolHelper.GetProfilesUrl();
                string strSql = "SELECT *, CONCAT(@AddPath,ShowImage) AS NPicture  FROM M_Category WHERE IsDelete = 0 AND IsEnable =1 AND ShowInNav =1 AND ParentID = 0";
                IEnumerable <dynamic> info      = new DB.BLL.MY_Bll(DBEnum.Slave).GetModelList(strSql, new { AddPath = url });
                StringBuilder         innerText = new StringBuilder();
                foreach (var item in info)
                {
                    innerText.Append("<li name=\"parentCateID\"><a href=\"javascript:void(0);\" mydata=\"" + item.CateID + "\" > " + item.CateName + " </a></li>");
                }
                parentCateIDStr = innerText.ToString();
                HttpRuntime.Cache.Insert("parentCateID", parentCateIDStr, null, DateTime.Now.AddMinutes(60), System.Web.Caching.Cache.NoSlidingExpiration);
            }
            else
            {
                parentCateIDStr = Convert.ToString(HttpRuntime.Cache["parentCateID"]);
            }
            gridTopCategoryList.InnerHtml = parentCateIDStr;
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string feeAmount = new WebToolHelper().GetProfilesEncryptInfo(FieldName.FeeAmount, "159");

            emCartFeeAmount.Attributes.Add("mydata", feeAmount);
        }