コード例 #1
0
ファイル: MOrdersController.cs プロジェクト: wangweicoder/Erp
        /// <summary>
        /// 更多订单
        /// </summary>
        /// <returns></returns>
        public ActionResult GetMobleListMore()
        {
            Business.Sys_OrdersManaage Sys_OrdersManaage = new Business.Sys_OrdersManaage();
            StringBuilder sb      = new StringBuilder();
            string        UsersId = Utility.ChangeText.GetUsersId().ToString();

            if (!string.IsNullOrEmpty(UsersId))
            {
                sb.Append(" and UsersId='" + UsersId + "'");
            }
            string OrderState = Request["OrderState"];

            if (!string.IsNullOrEmpty(OrderState))
            {
                if (OrderState == "1")
                {
                    sb.Append(" and OrdersState='" + OrderState + "'");
                }
                else if (OrderState != "1")
                {
                    sb.Append(" and OrdersState!='1'");
                }
            }
            int page = int.Parse(Request["page"]);

            if (page > 1)
            {
                page = (page - 1) * 10 + 1;
            }
            List <Model.Orders> List = Sys_OrdersManaage.GetOrdersList(0, page, sb.ToString());;

            return(Json(List, JsonRequestBehavior.AllowGet));
            //return Content(JsonConvert.SerializeObject(List));
        }
コード例 #2
0
ファイル: MOrdersController.cs プロジェクト: wangweicoder/Erp
        /// <summary>
        /// 订单
        /// </summary>
        /// <returns></returns>
        public List <Model.Orders> OrdersList(int limit, int offset, string UsersId, string OrderState)
        {
            Business.Sys_OrdersManaage Sys_OrdersManaage = new Business.Sys_OrdersManaage();
            StringBuilder sb = new StringBuilder();

            if (!string.IsNullOrEmpty(UsersId))
            {
                sb.Append(" and UsersId='" + UsersId + "'");
            }
            if (!string.IsNullOrEmpty(OrderState))
            {
                if (OrderState == "1")
                {
                    sb.Append(" and OrdersState='" + OrderState + "'");
                }
                else if (OrderState != "1")
                {
                    sb.Append(" and OrdersState!='1'");
                }
            }
            return(Sys_OrdersManaage.GetOrdersList(limit, offset, sb.ToString()));
        }
コード例 #3
0
ファイル: OrdersController.cs プロジェクト: wangweicoder/Erp
        ///<summary>
        ///分页获得数据信息
        ///</summary>
        ///<param name="limit">页码大小</param>
        ///<param name="offset">从第几条数据开始</param>
        ///<param name="UserName">用户名</param>
        ///<param name="Role">角色ID</param>
        ///<returns></returns>
        public JsonResult GetOrdersList(int limit, int offset, string OrdersId, string OrdersState)
        {
            Business.Sys_OrdersManaage Sys_OrdersManaage = new Business.Sys_OrdersManaage();
            StringBuilder sb = new StringBuilder();

            if (!string.IsNullOrEmpty(OrdersId))
            {
                sb.Append(" and OrderId='" + OrdersId + "'");
            }
            if (!string.IsNullOrEmpty(OrdersState))
            {
                sb.Append(" and OrdersState='" + OrdersState + "'");
            }
            return(Json(new { total = Sys_OrdersManaage.GetOrdersCount(sb.ToString()), rows = Sys_OrdersManaage.GetOrdersList(limit, offset, sb.ToString()) }, JsonRequestBehavior.AllowGet));
        }