public async Task <IActionResult> Create([Bind("PaymentTypeId,DateCreated,AccNum,UserId")] PaymentType paymentType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(paymentType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(paymentType));
        }
        public async Task <IActionResult> Create([Bind("CategoryId,Title")] Category category)
        {
            if (ModelState.IsValid)
            {
                _context.Add(category);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(category));
        }
Example #3
0
        public async Task <IActionResult> Create([Bind("CheckId,UserId,OpenTime,Closed,PaymentTypeId,Room")] Check check)
        {
            if (ModelState.IsValid)
            {
                _context.Add(check);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(check));
        }
Example #4
0
        public async Task <IActionResult> Create([Bind("ItemId,Title,Quantity,CategoryId,ImagePath")] Item item)
        {
            if (ModelState.IsValid)
            {
                _context.Add(item);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(item));
        }
        public async Task <IActionResult> Create([Bind("ChecklistId,Runner,Completed,TimeCreated")] CheckList checkList)
        {
            if (ModelState.IsValid)
            {
                _context.Add(checkList);
                await _context.SaveChangesAsync();

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