예제 #1
0
        public JsonResult GetMaxSINo()
        {
            var result =
                _localPurchaseService.GetAllLocalPurchase().Select(m => m.ShippingInstruction.Value);
            var siList    = result.Select(si => Regex.Match(si, @"\d+").Value).Select(data => Convert.ToInt32(data)).ToList();
            int resultInt = siList.Max() + 1;

            return(Json("LP-" + resultInt, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public ActionResult LocalPurchase_Read([DataSourceRequest] DataSourceRequest request)
        {
            var localPurchase         = _localPurchaseService.GetAllLocalPurchase().OrderByDescending(m => m.LocalPurchaseID).ToList();
            var localPurchseToDisplay = GetLocalPurchase(localPurchase);

            return(Json(localPurchseToDisplay.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
        }