Beispiel #1
0
        public JsonResult GetOrder()
        {
            var result       = new eSaleModel.Order();
            var orderService = new eSalesService.OrderService(this.GetDBConnectionString());
            var store        = new eSaleModel.Store();

            result.OrderId      = 0;
            result.CustName     = "%" + null + "%";
            result.EmpId        = 0;
            result.ShipperId    = 0;
            result.OrderDate    = null;
            result.RequiredDate = null;
            result.ShippedDate  = null;

            store.identifier = "OrderId";
            store.items      = orderService.GetOrderByCondition(result);
            return(this.Json(store, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public JsonResult GetOrderByCondition(eSaleModel.Order condition)
        {
            var result       = new eSaleModel.Order();
            var orderService = new eSalesService.OrderService(this.GetDBConnectionString());
            var store        = new eSaleModel.Store();

            result.O_OrderId    = "%" + Convert.ToString(condition.OrderId) + "%";
            result.CustName     = "%" + (condition.CustName) + "%";
            result.EmpId        = condition.EmpName == null ? 0 : Int32.Parse(condition.EmpName);
            result.ShipperId    = condition.ShipperName == null ? 0 : Int32.Parse(condition.ShipperName);
            result.OrderDate    = condition.OrderDate;
            result.RequiredDate = condition.RequiredDate;
            result.ShippedDate  = condition.ShippedDate;


            store.identifier = "OrderId";
            store.items      = orderService.GetOrderByCondition(result);

            return(this.Json(store, JsonRequestBehavior.AllowGet));
        }