Beispiel #1
0
        public JsonResult ReadData([DataSourceRequest] DataSourceRequest request)
        {
            OrderTmcRepository repository = new OrderTmcRepository();
            var qr = repository.LimsTmcOutViewGetAsQuarable();

            qr = base.FilterByCurrentUser(qr, repository.GetContext());
            qr = qr.OrderByDescending(m => m.CreatedDate);
            var data = qr;

            return(Json(data.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public JsonResult ReadData([DataSourceRequest] DataSourceRequest request)
        {
            OrderTmcRepository repository = new OrderTmcRepository();
            var qr = repository.LimsTmcOutViewGetAsQuarable();

            qr = base.FilterOwnerByCurrentUser(qr, repository.GetContext());
            qr = qr.OrderByDescending(m => m.CreatedDate);
            var data = qr.Where(lto => lto.StateType == TmcOut.TmcOutStatuses.Ordered ||
                                lto.StateType == TmcOut.TmcOutStatuses.Issued || lto.StateType == TmcOut.TmcOutStatuses.Rejected);

            // || lto.StateType == TmcOut.TmcOutStatuses.Issued

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