Exemplo n.º 1
0
        public ActionResult LoadOrders(string cusID)
        {
            var model = new CustomerModels();

            model.ListOrders = _facOrder.GetListOrder(cusID);
            if (model.ListOrders != null && model.ListOrders.Any())
            {
                int index = 0;
                model.ListOrders.ForEach(o => {
                    o.OffSet = index++;
                });
            }
            return(PartialView("_TableChooseOrders", model));
        }
Exemplo n.º 2
0
        public JsonResult LoadGrid()
        {
            var model = new List <CMS_OrderModels>();

            try
            {
                model = _fac.GetListOrder().Where(o => o.OrderType == (byte)CMS_Common.Commons.EOrderType.Expense).ToList();
                if (model != null && model.Any())
                {
                    model.ForEach(o =>
                    {
                        o.sCreatedDate = o.CreatedDate.ToString("dd/MM/yyyy hh:mm tt");
                    });
                }
            }
            catch (Exception ex)
            {
                NSLog.Logger.Error("LoadGrid_Order : ", ex);
            }
            return(Json(model, JsonRequestBehavior.AllowGet));
        }