public async Task <IActionResult> Create([Bind("Id,Name,Desc,ExtraBeds,View,IsBalcony,BasicPrice,ImgUrl")] RoomType roomType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(roomType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(roomType));
        }
        public async Task <IActionResult> Create([Bind("Tz,Name,PhoneNumber,Address,Email")] Client client)
        {
            if (ModelState.IsValid)
            {
                _context.Add(client);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(client));
        }
        public async Task <IActionResult> Create([Bind("Id,WorkerId,Name,PhoneNumber,Email,WorkerType")] Worker worker)
        {
            if (ModelState.IsValid)
            {
                _context.Add(worker);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Login)));
            }
            return(View(worker));
        }
        public async Task <IActionResult> Create([Bind("Id,FromDate,ToDate,NumOfAdults,NumOfKids,NumOfInfants,TotalPrice")] Order order)
        {
            if (ModelState.IsValid)
            {
                _context.Add(order);
                await _context.SaveChangesAsync();


                return(RedirectToAction(nameof(Index)));
            }
            return(View(order));
        }
        public async Task <IActionResult> Create([Bind("RoomId,OrderId")] RoomsOrders roomsOrders)
        {
            if (ModelState.IsValid)
            {
                _context.Add(roomsOrders);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["OrderId"] = new SelectList(_context.Order, "Id", "ClientID", roomsOrders.OrderId);
            ViewData["RoomId"]  = new SelectList(_context.Room, "Id", "Id", roomsOrders.RoomId);
            return(View(roomsOrders));
        }
        public async Task <IActionResult> Create([Bind("Id,Type,IsTwinBed,Floor,IsAvailable")] Room room)
        {
            if (HttpContext.Session.GetString("Name") == null)
            {
                return(RedirectToAction("Login", "Workers"));
            }
            if (ModelState.IsValid)
            {
                _context.Add(room);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(room));
        }