Example #1
0
        public ActionResult GetPackegeDetail([FromBody] HelperResources p)
        {
            var book = from b in context.Bookings
                       join h in context.Halls
                       on b.CompanyId equals h.CompanyId
                       join u in context.Users
                       on h.UId equals u.UId
                       where u.UId == p.id2 && b.BId == p.id1
                       select new
            {
                Guset          = b.NoOfGuests,
                Packege        = b.Packege,
                ChickenMain    = h.ChickenMain,
                ChickenRice    = h.ChickenRice,
                ChickenSweet   = h.ChickenSweet,
                ChickenStarter = h.ChickenStarter,
                MuttonMain     = h.MuttonMain,
                MuttonRice     = h.MuttonRice,
                MuttonSweet    = h.MuttonSweet,
                MuttonStarter  = h.MuttonStarter,
                BeefMain       = h.BeefMain,
                BeefRice       = h.BeefRice,
                BeefSweet      = h.BeefSweet,
                BeefStarter    = h.BeefStarter,
                ChickenPrice   = h.ChickenPrice,
                MuttonPrice    = h.MuttonPrice,
                BeefPrice      = h.BeefPrice,
            };

            return(Ok(book));
        }
Example #2
0
        public ActionResult MarkComplete([FromBody] HelperResources c)
        {
            Bookings booking = context.Bookings.FirstOrDefault(x => x.BId == c.id1 && x.CompanyId == c.id2);

            booking.Status = 2;
            context.SaveChanges();
            return(Ok(booking));
        }