コード例 #1
0
        public VWOrderMsgEntity GetVWOrderMsgByMemId(int memid)
        {
            string sql = @"SELECT  [MemId],a.[TotalNum] AS PurchaseTotalNum,[WaitPayNum],[WaitSellerDeliverNum],[WaitReciveNum],[WaitCommentNum]
,[CancelNum]  FROM dbo.[OrderMsgMem]  a WITH(NOLOCK)  WHERE a.[MemId]=@MemId";

            DbCommand cmd = db.GetSqlStringCommand(sql);

            db.AddInParameter(cmd, "@MemId", DbType.Int32, memid);
            VWOrderMsgEntity entity = new VWOrderMsgEntity();

            using (IDataReader reader = db.ExecuteReader(cmd))
            {
                if (reader.Read())
                {
                    entity.MemId                = StringUtils.GetDbInt(reader["MemId"]);
                    entity.PurchaseTotalNum     = StringUtils.GetDbInt(reader["PurchaseTotalNum"]);
                    entity.WaitPayNum           = StringUtils.GetDbInt(reader["WaitPayNum"]);
                    entity.WaitSellerDeliverNum = StringUtils.GetDbInt(reader["WaitSellerDeliverNum"]);
                    entity.WaitReciveNum        = StringUtils.GetDbInt(reader["WaitReciveNum"]);
                    entity.WaitCommentNum       = StringUtils.GetDbInt(reader["WaitCommentNum"]);
                    entity.CancelNum            = StringUtils.GetDbInt(reader["CancelNum"]);
                }
            }
            return(entity);
        }
コード例 #2
0
        /// <summary>
        /// 网站首页
        /// </summary>
        /// <returns></returns>
        public ActionResult OrderList()
        {
            int _pagesize    = CommonKey.PageSizeOrderMobile;
            int _pageindex   = QueryString.IntSafeQ("pageindex", 1);
            int _recordCount = 0;

            string _keyword   = QueryString.SafeQ("k");
            int    _status    = QueryString.IntSafeQ("s", 0);
            int    _term      = QueryString.IntSafeQ("t", 0);
            int    orderstyle = QueryString.IntSafeQ("os", 0);

            if (orderstyle == 0)
            {
                orderstyle = (int)OrderStyleEnum.Normal;
            }
            IList <ConditionUnit> _wherelist = new List <ConditionUnit>();

            _wherelist.Add(new ConditionUnit {
                FieldName = SearchFieldName.SeachDefault, CompareValue = _keyword
            });
            _wherelist.Add(new ConditionUnit {
                FieldName = SearchFieldName.OrderStatus, CompareValue = _status
            });
            _wherelist.Add(new ConditionUnit {
                FieldName = SearchFieldName.OrderTerm, CompareValue = _term
            });
            _wherelist.Add(new ConditionUnit {
                FieldName = SearchFieldName.MemId, CompareValue = memid
            });
            _wherelist.Add(new ConditionUnit {
                FieldName = SearchFieldName.OrderStyle, CompareValue = orderstyle
            });

            IList <VWOrderEntity> _Orderlist = OrderBLL.Instance.GetVWOrderList(_pagesize, _pageindex, ref _recordCount, _wherelist);
            VWOrderMsgEntity      _msgentity = OrderMsgMemBLL.Instance.GetVWOrderMsgByMemId(memid);

            ViewBag.SearchOrderStatus = _status;
            ViewBag.SearchOrderTerm   = _term;
            string _url     = "/Member/OrderList?os=" + orderstyle + "&s=" + _status + "&t=" + _term + "&k=" + _keyword;
            string _pageStr = HTMLPage.SetOrderListPage(_recordCount, _pagesize, _pageindex, _url);

            ViewBag.PageStr    = _pageStr;
            ViewBag.Orderlist  = _Orderlist;
            ViewBag.VWOrderMsg = _msgentity;
            ViewBag.Status     = _status;
            ViewBag.Key        = _keyword;
            ViewBag.Term       = _term;

            ViewBag.TotalNum   = _recordCount;
            ViewBag.OrderStyle = orderstyle;
            int maxpage = _recordCount / _pagesize;

            if (_recordCount % _pagesize > 0)
            {
                maxpage = maxpage + 1;
            }
            ViewBag.MaxPageIndex = maxpage;

            return(View());
        }
コード例 #3
0
        public VWOrderMsgEntity GetVWOrderMsgByMemId(int memid)
        {
            ///实时统计
            VWOrderMsgEntity _entity = OrderDA.Instance.GetOrderMsgByMemId(memid);

            //return OrderMsgMemDA.Instance.GetVWOrderMsgByMemId(memid);
            return(_entity);
        }
コード例 #4
0
        public ActionResult Home()
        {
            VWMemberEntity   _memberentity = MemberInfoBLL.Instance.GetVWMemberInfoByMemId(memid);
            VWOrderMsgEntity _msgentity    = OrderMsgMemBLL.Instance.GetVWOrderMsgByMemId(memid);

            ViewBag.VWOrderMsg = _msgentity;
            ViewBag.Member     = _memberentity;
            int FavoritNum = MemFavoritesBLL.Instance.GetMemFavoritesNum(memid);

            ViewBag.FavoritesNum = FavoritNum;
            int CouponsNum = MemCouponsBLL.Instance.GetCanUseCouponsNum(memid);

            ViewBag.CouponsNum = CouponsNum;
            ViewBag.PageMenu   = "4";
            return(View());
        }