Example #1
0
        public async Task <IActionResult> Create([Bind("WarningId,WarningNumber,StudentId,Date")] Warning warning)
        {
            if (ModelState.IsValid)
            {
                _context.Add(warning);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(warning));
        }
Example #2
0
        public async Task <IActionResult> Create([Bind("Id,EnteryDate,VistorName,VisitorID,StudentFirstName,StudentLasttName,ExitDate,ApartmentNum,Room,Signature")] VisitorsLog visitorsLog)
        {
            if (ModelState.IsValid)
            {
                _context.Add(visitorsLog);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(visitorsLog));
        }
Example #3
0
        public async Task <IActionResult> Create([Bind("MessageID,Addressee,Subject,Content")] Message message)
        {
            if (ModelState.IsValid)
            {
                _context.Add(message);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(message));
        }
Example #4
0
        public async Task <IActionResult> Create([Bind("ID,StundetId,FirstName,LastName,Password,Email,ApartmentNum,Room")] User user)
        {
            if (ModelState.IsValid)
            {
                _context.Add(user);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(user));
        }
        public async Task <IActionResult> Create([Bind("ID,StundetId,LastName,FirstName,RoomType,LivingWithReligious,LivingWithSmoker,ReligiousType,HealthCondition,PartnerId1,PartnerId2,PartnerId3,PartnerId4")] ApprovalKit approvalKit)
        {
            if (ModelState.IsValid)
            {
                _context.Add(approvalKit);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(approvalKit));
        }
Example #6
0
        public async Task <IActionResult> Create([Bind("ID,StundetId,LastName,FirstName,Bday,gender,City,Adress,PostalCode,PhoneNumber,FieldOfStudy,SteadyYear,TypeOfService,HealthCondition,Seniority,ApertmantType,ParentID,ParentLastName,PartnerFirstName,ParentAge")] Registration registration)
        {
            if (ModelState.IsValid)
            {
                _context.Add(registration);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(registration));
        }
Example #7
0
        public async Task <IActionResult> Create([Bind("ID,Apartment,RoomNum,FullName,PhoneNumber,Description")] FaultForm faultForm)
        {
            if (ModelState.IsValid)
            {
                _context.Add(faultForm);
                await _context.SaveChangesAsync();

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