예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string queryString = RequestHelper.GetQueryString <string>("Date");

            this.year  = Convert.ToInt32(queryString.Split(new char[] { '|' })[0]);
            this.month = Convert.ToInt32(queryString.Split(new char[] { '|' })[1]);
            OrderSearchInfo orderSearch = new OrderSearchInfo();
            DateType        day         = DateType.Day;

            if (this.month == -2147483648)
            {
                day = DateType.Month;
                orderSearch.StartAddDate = Convert.ToDateTime(this.year + "-01-01");
                orderSearch.EndAddDate   = Convert.ToDateTime(this.year + "-01-01").AddYears(1);
            }
            else
            {
                this.days = ShopCommon.CountMonthDays(this.year, this.month);
                orderSearch.StartAddDate = Convert.ToDateTime(string.Concat(new object[] { this.year, "-", this.month, "-01" }));
                orderSearch.EndAddDate   = Convert.ToDateTime(string.Concat(new object[] { this.year, "-", this.month, "-01" })).AddMonths(1);
            }
            DataTable table = OrderBLL.StatisticsOrderCount(orderSearch, day);

            foreach (DataRow row in table.Rows)
            {
                this.orderCountDic.Add(Convert.ToInt32(row[0]), Convert.ToInt32(row[1]));
            }
        }
예제 #2
0
        /// <summary>
        /// 查询总记录数量
        /// </summary>
        /// <param name="orderSearchInfo"></param>
        /// <returns></returns>
        public int SearchCCCount(OrderSearchInfo orderSearchInfo)
        {
            string sql = GetSearchPublicSql(orderSearchInfo);

            sql = sql + " select @iCount; ";
            return(Convert.ToInt32(this.SQLHelper.ExecuteScalar(sql)));;
        }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         CheckAdminPower("StatisticsOrder", PowerCheckType.Single);
         OrderSearchInfo orderSearch = new OrderSearchInfo();
         orderSearch.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate");
         orderSearch.EndAddDate   = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate"));
         StartAddDate.Text        = RequestHelper.GetQueryString <string>("StartAddDate");
         EndAddDate.Text          = RequestHelper.GetQueryString <string>("EndAddDate");
         DataTable dt = OrderBLL.StatisticsOrderArea(orderSearch);
         result += "[";
         if (dt.Rows.Count > 0)
         {
             foreach (DataRow dr in dt.Rows)
             {
                 string cityName = GetProvinceName(dr["RegionID"].ToString());
                 if (cityName == "")
                 {
                     cityName = "其他";
                 }
                 statusArr = statusArr + "'" + cityName + "',";
                 result   += " {value:" + dr["Count"] + ", name:'" + cityName + "'},";
             }
             statusArr = statusArr.Substring(0, statusArr.Length - 1);
             result    = result.Substring(0, result.Length - 1);
         }
         result += "]";
     }
 }
예제 #4
0
        /// <summary>
        /// 根据状态与组织获取相关的调整单集合
        /// </summary>
        /// <param name="loggingSessionInfo">登录model</param>
        /// <param name="unit_id">组织</param>
        /// <param name="status">状态值</param>
        /// <returns></returns>
        public IList <InoutInfo> GetAJListByStatus(LoggingSessionInfo loggingSessionInfo, string unit_id, string status)
        {
            try
            {
                IList <InoutInfo> inoutInfoList   = new List <InoutInfo>();
                OrderSearchInfo   orderSearchInfo = new OrderSearchInfo();
                orderSearchInfo.unit_id = unit_id;
                //orderSearchInfo.sales_unit_id = unit_id;
                orderSearchInfo.status        = status;
                orderSearchInfo.order_type_id = "5F11A199E3CD42DE9CAE70442FC3D991";
                orderSearchInfo.StartRow      = 0;
                orderSearchInfo.EndRow        = 36500;

                InoutInfo inoutInfo = new InoutInfo();
                inoutInfo     = new InoutService().SearchInoutInfo(loggingSessionInfo, orderSearchInfo);
                inoutInfoList = inoutInfo.InoutInfoList;
                foreach (InoutInfo inout in inoutInfoList)
                {
                    inout.InoutDetailList = new InoutService().GetInoutDetailInfoByOrderId(loggingSessionInfo, inout.order_id);
                }
                return(inoutInfoList);
            }
            catch (Exception ex) {
                throw (ex);
            }
        }
예제 #5
0
        protected override void PageLoad()
        {
            base.PageLoad();
            //检查待付款订单是否超时失效,超时则更新为失效状态
            OrderBLL.CheckOrderPayTime();
            //订单自动收货
            OrderBLL.CheckOrderRecieveTimeProg();

            OrderSearchInfo orderSearch = new OrderSearchInfo();

            //orderDate =string.IsNullOrEmpty(RequestHelper.GetQueryString<string>("orderDate"))?orderDate: RequestHelper.GetQueryString<DateTime>("orderDate")<=DateTime.MinValue?orderDate: RequestHelper.GetQueryString<DateTime>("orderDate");
            searchKey               = RequestHelper.GetQueryString <string>("searchKey");
            orderPeriod             = RequestHelper.GetQueryString <int>("orderPeriod");
            orderStatus             = RequestHelper.GetQueryString <int>("OrderStatus");
            orderSearch.OrderPeriod = orderPeriod;
            orderSearch.SearchKey   = searchKey;
            //orderSearch.OrderDate = orderDate;
            //如果查找已删除订单
            if (orderStatus == (int)Entity.OrderStatus.HasDelete)
            {
                orderSearch.IsDelete = (int)BoolType.True;//已删除
            }
            else
            {
                orderSearch.OrderStatus = orderStatus;
                orderSearch.IsDelete    = (int)BoolType.False;//未删除
            }
            orderSearch.Consignee    = RequestHelper.GetQueryString <string>("Consignee");
            orderSearch.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate");
            orderSearch.EndAddDate   = RequestHelper.GetQueryString <DateTime>("EndAddDate");

            orderList = OrderBLL.SearchList(1, pageSize, orderSearch, ref Count);

            topNav = 1;
        }
예제 #6
0
        /// <summary>
        /// 根据状态与组织获取相关的配送单集合
        /// </summary>
        /// <param name="loggingSessionInfo">登录model</param>
        /// <param name="unit_id">组织</param>
        /// <param name="status">状态值</param>
        /// <returns></returns>
        public IList <InoutInfo> GetDistributionListByStatus(LoggingSessionInfo loggingSessionInfo, string unit_id, string status)
        {
            try
            {
                IList <InoutInfo> inoutInfoList   = new List <InoutInfo>();
                OrderSearchInfo   orderSearchInfo = new OrderSearchInfo();
                orderSearchInfo.unit_id = unit_id;
                //orderSearchInfo.sales_unit_id = unit_id;
                orderSearchInfo.status                  = status;
                orderSearchInfo.order_type_id           = "6F4991A2F4A84CC3902BD880BF540DF1";
                orderSearchInfo.order_reason_id         = "BAFA1B7A50914599BD7DC830B53203FA";
                orderSearchInfo.sales_unit_id_not_equal = unit_id;
                orderSearchInfo.purchase_unit_id        = unit_id;
                orderSearchInfo.if_flag                 = "0";
                orderSearchInfo.StartRow                = 0;
                orderSearchInfo.EndRow                  = 36500;

                InoutInfo inoutInfo = new InoutInfo();
                inoutInfo     = new InoutService().SearchInoutInfo(loggingSessionInfo, orderSearchInfo);
                inoutInfoList = inoutInfo.InoutInfoList;
                foreach (InoutInfo inout in inoutInfoList)
                {
                    inout.InoutDetailList = new InoutService().GetInoutDetailInfoByOrderId(loggingSessionInfo, inout.order_id);
                }
                return(inoutInfoList);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //检查待付款订单是否超时失效,超时则更新为失效状态
                OrderBLL.CheckOrderPayTime();
                //订单自动收货
                OrderBLL.CheckOrderRecieveTimeProg();

                CheckAdminPower("ReadOrder", PowerCheckType.Single);

                OrderNumber.Text  = RequestHelper.GetQueryString <string>("OrderNumber");
                Consignee.Text    = RequestHelper.GetQueryString <string>("Consignee");
                StartAddDate.Text = RequestHelper.GetQueryString <string>("StartAddDate");
                EndAddDate.Text   = RequestHelper.GetQueryString <string>("EndAddDate");
                SelfPick.Text     = RequestHelper.GetQueryString <string>("SelfPick");
                OrderSearchInfo orderSearch = new OrderSearchInfo();
                orderSearch.OrderNumber = RequestHelper.GetQueryString <string>("OrderNumber");

                orderSearch.OrderStatus = intOrderStatus;
                orderSearch.IsDelete    = (int)BoolType.False;//未删除

                orderSearch.Consignee    = RequestHelper.GetQueryString <string>("Consignee");
                orderSearch.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate");
                orderSearch.EndAddDate   = RequestHelper.GetQueryString <DateTime>("EndAddDate");
                orderSearch.SelfPick     = RequestHelper.GetQueryString <int>("SelfPick");
                PageSize           = Session["AdminPageSize"] == null ? 20 : Convert.ToInt32(Session["AdminPageSize"]);
                AdminPageSize.Text = Session["AdminPageSize"] == null ? "20" : Session["AdminPageSize"].ToString();
                var orderList = OrderBLL.SearchList(CurrentPage, PageSize, orderSearch, ref Count);

                BindControl(orderList, RecordList, MyPager);
            }
        }
예제 #8
0
        protected override void PageLoad()
        {
            base.PageLoad();
            //检查待付款订单是否超时失效,超时则更新为失效状态
            OrderBLL.CheckOrderPayTime();
            //订单自动收货
            OrderBLL.CheckOrderRecieveTimeProg();
            OrderSearchInfo orderSearch = new OrderSearchInfo();

            orderSearch.OrderNumber = RequestHelper.GetQueryString <string>("OrderNumber");
            orderStatus             = RequestHelper.GetQueryString <int>("OrderStatus") <= 0?2: RequestHelper.GetQueryString <int>("OrderStatus");
            //如果查找已删除订单
            if (orderStatus == (int)Entity.OrderStatus.HasDelete)
            {
                orderSearch.IsDelete = (int)BoolType.True;//已删除
            }
            else
            {
                orderSearch.OrderStatus = orderStatus;
                orderSearch.IsDelete    = (int)BoolType.False;//未删除
            }
            orderSearch.Consignee    = RequestHelper.GetQueryString <string>("Consignee");
            orderSearch.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate");
            orderSearch.EndAddDate   = RequestHelper.GetQueryString <DateTime>("EndAddDate");

            orderList = OrderBLL.SearchList(1, pageSize, orderSearch, ref Count);

            if (orderStatus == 2 || orderStatus == 4)
            {
                topNav = 0;
            }
        }
예제 #9
0
        public static Dictionary <int, DateTime> ReadPrepaidTestCateList(int UserId)
        {
            Dictionary <int, DateTime> prepaidTestCateList = new Dictionary <int, DateTime>();

            OrderSearchInfo orderSearch = new OrderSearchInfo();

            orderSearch.StartPayDate = DateTime.Now.AddDays(-30);
            orderSearch.UserID       = UserId;
            orderSearch.OrderStatus  = 2;
            List <OrderInfo> orderList = OrderBLL.SearchOrderList(orderSearch);

            foreach (OrderInfo info in orderList)
            {
                List <OrderDetailInfo> orderDetailList = OrderDetailBLL.ReadOrderDetailByOrder(info.ID);
                foreach (OrderDetailInfo item in orderDetailList)
                {
                    if (!prepaidTestCateList.ContainsKey(item.ProductID))
                    {
                        prepaidTestCateList.Add(item.ProductID, info.PayDate);
                    }
                }
            }

            return(prepaidTestCateList);
        }
예제 #10
0
        /// <summary>
        /// 打包
        /// </summary>
        /// <param name="Customer_Id">客户标识</param>
        /// <param name="Unit_Id">组织标识</param>
        /// <param name="maxRowCount">最大行数</param>
        /// <param name="startRowIndex">开始行号</param>
        /// <param name="bat_id">批次号</param>
        /// <returns></returns>
        public IList <InoutInfo> GetPosInoutListPackagedWeb(string Customer_Id, string Unit_Id, int maxRowCount, int startRowIndex, string bat_id)
        {
            //设置参数
            OrderSearchInfo orderSearchInfo = new OrderSearchInfo();

            orderSearchInfo.customer_id     = Customer_Id;
            orderSearchInfo.unit_id         = Unit_Id;
            orderSearchInfo.order_type_id   = "1F0A100C42484454BAEA211D4C14B80F";
            orderSearchInfo.order_reason_id = "2F6891A2194A4BBAB6F17B4C99A6C6F5";
            orderSearchInfo.StartRow        = startRowIndex;
            orderSearchInfo.EndRow          = startRowIndex + maxRowCount;

            //
            InoutService inoutService = new InoutService();
            //获取集合
            IList <InoutInfo> inoutInfoList = new List <InoutInfo>();

            inoutInfoList = inoutService.GetInoutListPackagedWeb(orderSearchInfo);
            if (inoutInfoList.Count > 0)
            {
                //修改获取的监控信息批次号
                InoutInfo inoutInfo = new InoutInfo();
                inoutInfo.bat_id        = bat_id;
                inoutInfo.InoutInfoList = inoutInfoList;
                bool b = inoutService.SetInoutUpdateUnDownloadBatIdWeb(Customer_Id, inoutInfo);
            }
            return(inoutInfoList);
        }
예제 #11
0
 protected override void PageLoad()
 {
     base.PageLoad();
     #region 订单对应状态个数
     OrderSearchInfo orderSearch = new OrderSearchInfo();
     orderSearch.UserId   = base.UserId;
     orderSearch.IsDelete = 0;
     arrT[0] = OrderBLL.SearchList(new OrderSearchInfo {
         UserId = base.UserId, IsDelete = 0
     }).Count;
     orderSearch.OrderStatus = (int)(OrderStatus.WaitPay);
     orderSearch.UserId      = base.UserId; orderSearch.IsDelete = 0;
     arrT[1] = OrderBLL.SearchList(orderSearch).Count;
     orderSearch.OrderStatus = (int)(OrderStatus.Shipping);
     orderSearch.UserId      = base.UserId; orderSearch.IsDelete = 0;
     arrT[2] = OrderBLL.SearchList(orderSearch).Count;
     orderSearch.OrderStatus = (int)(OrderStatus.HasShipping);
     orderSearch.UserId      = base.UserId; orderSearch.IsDelete = 0;
     arrT[3] = OrderBLL.SearchList(orderSearch).Count;
     orderSearch.OrderStatus = (int)(OrderStatus.WaitCheck);
     orderSearch.UserId      = base.UserId; orderSearch.IsDelete = 0;
     arrT[4] = OrderBLL.SearchList(orderSearch).Count;
     orderSearch.OrderStatus = (int)(OrderStatus.NoEffect);
     orderSearch.UserId      = base.UserId; orderSearch.IsDelete = 0;
     arrT[5] = OrderBLL.SearchList(orderSearch).Count;
     #endregion
 }
예제 #12
0
        /// <summary>
        /// 订单查询(订单类)
        /// </summary>
        /// <param name="orderSearchInfo">参数集合</param>
        /// <returns></returns>
        public OrderInfo SearchOrderInfo(OrderSearchInfo orderSearchInfo)
        {
            try
            {
                OrderInfo orderInfo = new OrderInfo();
                if (orderSearchInfo.customer_id == null || orderSearchInfo.customer_id.Equals(""))
                {
                    orderSearchInfo.customer_id = loggingSessionInfo.CurrentLoggingManager.Customer_Id;
                }
                int iCount = orderService.SearchOrderCount(orderSearchInfo);

                IList <OrderInfo> orderInfoList = new List <OrderInfo>();
                DataSet           ds            = new DataSet();
                ds = orderService.SearchOrderInfo(orderSearchInfo);
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    orderInfoList = DataTableToObject.ConvertToList <OrderInfo>(ds.Tables[0]);
                }
                orderInfo.ICount        = iCount;
                orderInfo.orderInfoList = orderInfoList;
                return(orderInfo);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
예제 #13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         base.CheckAdminPower("StatisticsOrder", PowerCheckType.Single);
         OrderSearchInfo orderSearch = new OrderSearchInfo();
         orderSearch.StartAddDate = RequestHelper.GetQueryString <DateTime>("StartAddDate");
         orderSearch.EndAddDate   = ShopCommon.SearchEndDate(RequestHelper.GetQueryString <DateTime>("EndAddDate"));
         this.StartAddDate.Text   = RequestHelper.GetQueryString <string>("StartAddDate");
         this.EndAddDate.Text     = RequestHelper.GetQueryString <string>("EndAddDate");
         DataTable table    = OrderBLL.StatisticsOrderArea(orderSearch);
         string[]  strArray = new string[] { "33FF66", "FF6600", "FFCC33", "CC3399", "CC7036", "349802", "066C93" };
         int       index    = 0;
         foreach (DataRow row in table.Rows)
         {
             object result = this.result;
             this.result = string.Concat(new object[] { result, " <set value='", row["Count"], "' name='", this.GetProvinceName(row["RegionID"].ToString()), "' color='", strArray[index], "' />" });
             index++;
             if (index == 6)
             {
                 index = 0;
             }
         }
     }
 }
예제 #14
0
        /// <summary>
        /// 订单查询(订单类)
        /// </summary>
        /// <param name="order_no">订单号码</param>
        /// <param name="order_type_id">订单类型1</param>
        /// <param name="order_reason_type_id">订单类型2</param>
        /// <param name="red_flag">红单</param>
        /// <param name="order_status">订单状态值</param>
        /// <param name="purchase_unit_id">采购单位标识(总部,门店,渠道......)</param>
        /// <param name="sales_unit_id">销售单位标识(供应商,客户,渠道,总部......)</param>
        /// <param name="order_date_begin">单据日期起</param>
        /// <param name="order_date_end">单据日期止</param>
        /// <param name="request_date_begin">预计到达日期起</param>
        /// <param name="request_date_end">预计到达日期止</param>
        /// <param name="maxRowCount">当前页显示数量</param>
        /// <param name="startRowIndex">当前开始行号</param>
        /// <returns></returns>
        public OrderInfo SearchOrderInfo(string order_no
                                         , string order_type_id
                                         , string order_reason_type_id
                                         , string red_flag
                                         , string order_status
                                         , string purchase_unit_id
                                         , string sales_unit_id
                                         , string order_date_begin
                                         , string order_date_end
                                         , string request_date_begin
                                         , string request_date_end
                                         , int maxRowCount
                                         , int startRowIndex)
        {
            OrderInfo       orderInfo       = new OrderInfo();
            OrderSearchInfo orderSearchInfo = new OrderSearchInfo();

            orderSearchInfo.order_no           = order_no;
            orderSearchInfo.order_reason_id    = order_reason_type_id;
            orderSearchInfo.sales_unit_id      = sales_unit_id;
            orderSearchInfo.red_flag           = red_flag;
            orderSearchInfo.purchase_unit_id   = purchase_unit_id;
            orderSearchInfo.status             = order_status;
            orderSearchInfo.order_date_begin   = order_date_begin;
            orderSearchInfo.order_date_end     = order_date_end;
            orderSearchInfo.request_date_begin = request_date_begin;
            orderSearchInfo.request_date_end   = request_date_end;
            orderSearchInfo.order_type_id      = order_type_id;
            orderSearchInfo.StartRow           = startRowIndex;
            orderSearchInfo.EndRow             = startRowIndex + maxRowCount;
            orderSearchInfo.customer_id        = loggingSessionInfo.CurrentLoggingManager.Customer_Id;
            orderInfo = SearchOrderInfo(orderSearchInfo);
            return(orderInfo);
        }
예제 #15
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void PageLoad()
        {
            base.PageLoad();
            int    currentPage = RequestHelper.GetQueryString <int>("Page");
            string startDate   = StringHelper.SearchSafe(RequestHelper.GetQueryString <string>("StartDate"));
            string endDate     = StringHelper.SearchSafe(RequestHelper.GetQueryString <string>("EndDate"));

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int             pageSize    = 20;
            int             count       = 0;
            OrderSearchInfo orderSearch = new OrderSearchInfo();

            orderSearch.UserId   = base.UserId;
            orderSearch.IsDelete = (int)BoolType.False;
            if (startDate != string.Empty)
            {
                orderSearch.StartAddDate = Convert.ToDateTime(startDate);
            }
            if (endDate != string.Empty)
            {
                orderSearch.EndAddDate = Convert.ToDateTime(endDate);
            }

            orderList = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count);
            commonPagerClass.CurrentPage = currentPage;
            commonPagerClass.PageSize    = pageSize;
            commonPagerClass.Count       = count;
        }
예제 #16
0
        protected override void PageLoad()
        {
            base.PageLoad();

            if (CurrentUser.UserType == (int)UserType.Provider)
            {
                dt = UserBLL.ShopIndexStatistics(base.UserId);
                OrderSearchInfo orderSearch = new OrderSearchInfo();
                orderSearch.ShopId   = base.UserId;
                orderSearch.IsDelete = (int)BoolType.False;
                int count = int.MinValue;
                orderList = OrderBLL.SearchList(1, 10, orderSearch, ref count);
            }
            else
            {
                OrderSearchInfo orderSearch = new OrderSearchInfo();
                orderSearch.UserId   = base.UserId;
                orderSearch.IsDelete = (int)BoolType.False;
                int count = 0;
                orderList = OrderBLL.SearchList(1, 10, orderSearch, ref count);
                dt        = UserBLL.UserIndexStatistics(base.UserId);

                //webservice
                //get account
                if (CurrentUser.IsTulouMember)
                {
                    bool isSuccess; string msg;
                    //var account = WebService.Account.GetAccount(CurrentUser.CardNo, CurrentUser.CardPwd, out isSuccess, out msg);
                    money = 0;// account.Acc;
                }
                point = UserAccountRecordBLL.SumPoint(base.UserId);
            }
        }
예제 #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string date = RequestHelper.GetQueryString <string>("Date");

            year  = Convert.ToInt32(date.Split('|')[0]);
            month = Convert.ToInt32(date.Split('|')[1]);
            OrderSearchInfo orderSearch = new OrderSearchInfo();
            DateType        dateType    = DateType.Day;

            if (month == int.MinValue)
            {
                dateType = DateType.Month;
                orderSearch.StartAddDate = Convert.ToDateTime(year + "-01-01");
                orderSearch.EndAddDate   = Convert.ToDateTime(year + "-01-01").AddYears(1);
            }
            else
            {
                days = ShopCommon.CountMonthDays(year, month);
                orderSearch.StartAddDate = Convert.ToDateTime(year + "-" + month + "-01");
                orderSearch.EndAddDate   = Convert.ToDateTime(year + "-" + month + "-01").AddMonths(1);
            }
            DataTable dt = OrderBLL.StatisticsSaleTotal(orderSearch, dateType);

            foreach (DataRow dr in dt.Rows)
            {
                orderCountDic.Add(Convert.ToInt32(dr[0]), Convert.ToInt32(dr[1]));
                orderMoneyDic.Add(Convert.ToInt32(dr[0]), Convert.ToDecimal(dr[2]));
            }
        }
예제 #18
0
        public DataTable StatisticsOrderStatus(OrderSearchInfo orderSearch)
        {
            MssqlCondition mssqlCondition = new MssqlCondition();

            this.PrepareCondition(mssqlCondition, orderSearch);
            SqlParameter[] pt = new SqlParameter[] { new SqlParameter("@condition", SqlDbType.NVarChar) };
            pt[0].Value = mssqlCondition.ToString();
            return(ShopMssqlHelper.ExecuteDataTable(ShopMssqlHelper.TablePrefix + "StatisticsOrderStatus", pt));
        }
예제 #19
0
        protected override void PageLoad()
        {
            base.PageLoad();
            //检查用户的待付款订单是否超时失效,超时则更新为失效状态
            OrderBLL.CheckOrderPayTime(base.UserId);
            type = RequestHelper.GetQueryString <string>("type");

            topNav = 7;

            string keywords    = RequestHelper.GetQueryString <string>("keywords");
            int    currentPage = RequestHelper.GetQueryString <int>("Page");

            if (currentPage < 1)
            {
                currentPage = 1;
            }
            int             pageSize    = 10;
            int             count       = 0;
            OrderSearchInfo orderSearch = new OrderSearchInfo();

            orderSearch.UserId   = base.UserId;
            orderSearch.IsDelete = 0;
            if (!string.IsNullOrEmpty(keywords))
            {
                orderSearch.OrderNumber = keywords;
            }
            if (!string.IsNullOrEmpty(type))
            {
                int tt = 0;
                switch (type)
                {
                case "2": tt = 2; break;

                case "3": tt = 4; break;

                case "4": tt = 5; break;

                case "1": tt = 1; break;
                }
                orderSearch.OrderStatus = tt;
            }

            orderList = OrderBLL.SearchList(currentPage, pageSize, orderSearch, ref count);

            commonPagerClass.Init(currentPage, pageSize, count, !string.IsNullOrEmpty(isMobile));
            #region 对应状态个数
            arrT[0] = OrderBLL.SearchList(new OrderSearchInfo {
                UserId = base.UserId, IsDelete = 0
            }).Count;
            orderSearch.OrderStatus = 2;
            arrT[1] = OrderBLL.SearchList(orderSearch).Count;
            orderSearch.OrderStatus = 1;
            arrT[2] = OrderBLL.SearchList(orderSearch).Count;
            orderSearch.OrderStatus = 5;
            arrT[3] = OrderBLL.SearchList(orderSearch).Count;
            #endregion
        }
예제 #20
0
        public object Search2(OrderSearchInfo info)
        {
            info.CheckPagingInfoState();

            List <Order> list = BllFactory.GetOrderBLL().Search(info);

            var result = new GridResult <Order>(list, info.TotalRecords);

            return(new JsonResult(result));
        }
예제 #21
0
        public DataTable StatisticsSaleTotal(OrderSearchInfo orderSearch, DateType dateType)
        {
            MssqlCondition mssqlCondition = new MssqlCondition();

            this.PrepareCondition(mssqlCondition, orderSearch);
            SqlParameter[] pt = new SqlParameter[] { new SqlParameter("@condition", SqlDbType.NVarChar), new SqlParameter("@dateType", SqlDbType.Int) };
            pt[0].Value = mssqlCondition.ToString();
            pt[1].Value = (int)dateType;
            return(ShopMssqlHelper.ExecuteDataTable(ShopMssqlHelper.TablePrefix + "StatisticsSaleTotal", pt));
        }
예제 #22
0
 public void PrepareCondition(MssqlCondition mssqlCondition, OrderSearchInfo orderSearch, ProductSearchInfo productSearch)
 {
     mssqlCondition.Add("[OrderNumber]", orderSearch.OrderNumber, ConditionType.Like);
     mssqlCondition.Add("[AddDate]", orderSearch.StartAddDate, ConditionType.MoreOrEqual);
     mssqlCondition.Add("[AddDate]", orderSearch.EndAddDate, ConditionType.LessOrEqual);
     mssqlCondition.Add("[UserName]", orderSearch.UserName, ConditionType.Like);
     mssqlCondition.Add("[Name]", productSearch.Name, ConditionType.Like);
     //mssqlCondition.Add("[BrandID]", productSearch.BrandID, ConditionType.Equal);
     mssqlCondition.Add("[ClassID]", productSearch.ClassID, ConditionType.Like);
     mssqlCondition.Add("[ProductID]", productSearch.InProductID, ConditionType.In);
 }
예제 #23
0
        /// <summary>
        /// 统计已付款汇总
        /// </summary>
        /// <param name="orderSearch"></param>
        /// <returns></returns>
        public DataTable StatisticsPaidTotal(OrderSearchInfo orderSearch)
        {
            string condition = PrepareCondition(orderSearch).ToString();

            SqlParameter[] parameters =
            {
                new SqlParameter("@condition", SqlDbType.NVarChar)
            };
            parameters[0].Value = condition;
            return(ShopMssqlHelper.ExecuteDataTable("StatisticsPaidTotal", parameters));
        }
예제 #24
0
 public void PrepareCondition(MssqlCondition mssqlCondition, OrderSearchInfo orderSearch)
 {
     mssqlCondition.Add("[OrderNumber]", orderSearch.OrderNumber, ConditionType.Like);
     mssqlCondition.Add("[OrderStatus]", orderSearch.OrderStatus, ConditionType.Equal);
     mssqlCondition.Add("[Consignee]", orderSearch.Consignee, ConditionType.Like);
     mssqlCondition.Add("[RegionID]", orderSearch.RegionID, ConditionType.Like);
     mssqlCondition.Add("[ShippingID]", orderSearch.ShippingID, ConditionType.Equal);
     mssqlCondition.Add("[AddDate]", orderSearch.StartAddDate, ConditionType.MoreOrEqual);
     mssqlCondition.Add("[AddDate]", orderSearch.EndAddDate, ConditionType.LessOrEqual);
     mssqlCondition.Add("[UserID]", orderSearch.UserID, ConditionType.Equal);
     mssqlCondition.Add("[UserName]", orderSearch.UserName, ConditionType.Like);
 }
예제 #25
0
        // 根据指定的查询日期范围及分页参数,获取订单记录列表
        public List <Order> Search(OrderSearchInfo option)
        {
            option.EndDate = option.EndDate.AddDays(1);

            var query = from ord in WebSiteDB.MyNorthwind.Orders.AsQueryable()
                        where ord.OrderDate >= option.StartDate && ord.OrderDate < option.EndDate
                        orderby ord.OrderDate descending
                        select ord;

            // 获取订单列表,此时将返回符合分页的结果。
            return(query.GetPagingList <Order>(option));
        }
예제 #26
0
        public object Search(OrderSearchInfo info, int?page)
        {
            info.PageIndex = page.HasValue ? page.Value - 1 : 0;
            info.PageSize  = AppHelper.DefaultPageSize;

            OrderListModel data = new OrderListModel();

            // 搜索数据库
            data.List       = BllFactory.GetOrderBLL().Search(info);
            data.SearchInfo = info;

            return(new PageResult("/Pages/Style1/Controls/OrderList.cshtml", data));
        }
예제 #27
0
파일: Index.cs 프로젝트: xuefuruanjian/ems
        protected override void PageLoad()
        {
            base.PageLoad();
            this.user          = UserBLL.ReadUserMore(base.UserID);
            this.userGradeName = UserGradeBLL.ReadUserGradeCache(base.GradeID).Name;
            this.dt            = UserBLL.UserIndexStatistics(base.UserID);
            OrderSearchInfo order = new OrderSearchInfo();

            order.UserID = base.UserID;
            int count = -2147483648;

            this.orderList = OrderBLL.SearchOrderList(1, 10, order, ref count);
        }
예제 #28
0
        public DataTable StatisticsOrderArea(OrderSearchInfo orderSearch)
        {
            string condition = PrepareCondition(orderSearch).ToString();

            SqlParameter[] parameters =
            {
                new SqlParameter("@type",      SqlDbType.VarChar),
                new SqlParameter("@condition", SqlDbType.NVarChar)
            };
            parameters[0].Value = "StatisticsOrderArea";
            parameters[1].Value = condition;
            return(ShopMssqlHelper.ExecuteDataTable("usp_Order", parameters));
        }
예제 #29
0
        /// <summary>
        /// 盘点单查询
        /// </summary>
        /// <param name="loggingSessionInfo">登录model</param>
        /// <param name="order_no">单据号码</param>
        /// <param name="status">状态标识</param>
        /// <param name="unit_id">单位标识</param>
        /// <param name="warehouse_id">仓库标识</param>
        /// <param name="order_date_begin">单据日期开始【yyyy-MM-dd】</param>
        /// <param name="order_date_end">单据日期结束【yyyy-MM-dd】</param>
        /// <param name="complete_date_begin">完成日期开始【yyyy-MM-dd】</param>
        /// <param name="complete_date_end">完成日期结束【yyyy-MM-dd】</param>
        /// <param name="data_from_id">数据来源标识</param>
        /// <param name="maxRowCount">每页最大数量</param>
        /// <param name="startRowIndex">开始行号</param>
        /// <returns></returns>
        public CCInfo SearchCCInfo(LoggingSessionInfo loggingSessionInfo
                                   , string order_no
                                   , string status
                                   , string unit_id
                                   , string warehouse_id
                                   , string order_date_begin
                                   , string order_date_end
                                   , string complete_date_begin
                                   , string complete_date_end
                                   , string data_from_id
                                   , int maxRowCount
                                   , int startRowIndex
                                   )
        {
            try
            {
                OrderSearchInfo orderSearchInfo = new OrderSearchInfo();
                orderSearchInfo.order_no            = order_no;
                orderSearchInfo.status              = status;
                orderSearchInfo.unit_id             = unit_id;
                orderSearchInfo.warehouse_id        = warehouse_id;
                orderSearchInfo.order_date_begin    = order_date_begin;
                orderSearchInfo.order_date_end      = order_date_end;
                orderSearchInfo.complete_date_begin = complete_date_begin;
                orderSearchInfo.complete_date_end   = complete_date_end;
                orderSearchInfo.data_from_id        = data_from_id;
                orderSearchInfo.StartRow            = startRowIndex;
                orderSearchInfo.EndRow              = startRowIndex + maxRowCount;
                orderSearchInfo.customer_id         = loggingSessionInfo.CurrentLoggingManager.Customer_Id;

                orderSearchInfo.order_type_id = "51BE351BFA5E49A490103669EA21BC3C";


                CCInfo ccInfo = new CCInfo();
                int    iCount = ccService.SearchCCCount(orderSearchInfo);

                IList <CCInfo> ccInfoList = new List <CCInfo>();
                DataSet        ds         = ccService.SearchCCInfo(orderSearchInfo);
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    ccInfoList = DataTableToObject.ConvertToList <CCInfo>(ds.Tables[0]);
                }

                ccInfo.ICount     = iCount;
                ccInfo.CCInfoList = ccInfoList;
                return(ccInfo);
            }
            catch (Exception ex) {
                throw (ex);
            }
        }
예제 #30
0
        private void SearchInoutDetailInfoByVip()
        {
            var             inoutService = new InoutService(Default.GetLoggingSession());
            OrderSearchInfo queryInfo    = new OrderSearchInfo();

            queryInfo.vip_no          = "0334f76bad484c02af4dd8c32802025b";;
            queryInfo.order_type_id   = "1F0A100C42484454BAEA211D4C14B80F";
            queryInfo.order_reason_id = "2F6891A2194A4BBAB6F17B4C99A6C6F5";
            queryInfo.red_flag        = "1";
            queryInfo.StartRow        = 0;
            queryInfo.EndRow          = 0 + 15;
            queryInfo.unit_id         = "bae1ed3ce4db4524a6d2398299075fbf";
            var data = inoutService.SearchInoutDetailInfoByVip(queryInfo);
        }