Ejemplo n.º 1
0
        public ActionResult Issue()
        {
            var gridModel = new IssueCardsGridModel();

            SetupIssueGridModel(gridModel.CardsGrid);
            return(View(gridModel));
        }
Ejemplo n.º 2
0
        public ActionResult Issue_RequestData()
        {
            var gridModel = new IssueCardsGridModel();

            SetupIssueGridModel(gridModel.CardsGrid);
            var vehicles =
                (from v in db.Vehicles where !(from c in db.Cards select c.Vehicle).Contains(v.Id)
                 //join d in db.Drivers on v.Driver equals d.Id into vd
                 //from veh in vd.DefaultIfEmpty()
                 select new
            {
                v.Id,
                v.PlateNo,
                v.MotorNo,
                v.BrandModel,
                v.Comment,
                v.OwnerName
            }).ToList();
            var veh2 = vehicles.Select(s => new { CardNo = "", s.Id, s.PlateNo, s.BrandModel, s.MotorNo, s.OwnerName, s.Comment });

            return(gridModel.CardsGrid.DataBind(veh2.ToList().AsQueryable()));
        }