public async Task <IActionResult> Create([Bind("PkUserId,Fname,Lname,Email,Contact,Pswd,Dob,CreatedDate,FkRoleId,IsActive,IsDeleted")] MstUser mstUser) { if (ModelState.IsValid) { _context.Add(mstUser); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(mstUser)); }
public async Task <IActionResult> Create([Bind("PkDeptId,DepartmentName,IsActive")] MstDepartment mstDepartment) { if (ModelState.IsValid) { _context.Add(mstDepartment); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(mstDepartment)); }
public async Task <IActionResult> Create([Bind("PkAdminId,EmployeeId,FirstName,LastName,DateOfBirth,Email,Contact,Pswd,Address,FatherName,CreatedDate,IsActive,IsDeleted")] AdminDetail adminDetail) { if (ModelState.IsValid) { _context.Add(adminDetail); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(adminDetail)); }
public async Task <IActionResult> Create([Bind("PkSemId,Semester,IsActive")] MstSemester mstSemester) { if (ModelState.IsValid) { _context.Add(mstSemester); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(mstSemester)); }
public async Task <IActionResult> Create([Bind("PkRoleId,RoleName,IsActive")] MstRole mstRole) { if (ModelState.IsValid) { _context.Add(mstRole); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(mstRole)); }
public async Task <IActionResult> Create([Bind("PkSubjectId,FkSemId,SubjectName,IsActive")] MstSubject mstSubject) { if (ModelState.IsValid) { _context.Add(mstSubject); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["FkSemId"] = new SelectList(_context.MstSemesters, "PkSemId", "PkSemId", mstSubject.FkSemId); return(View(mstSubject)); }
public async Task <IActionResult> Create([Bind("PkFacultyId,FacultyId,FirstName,LastName,DateOfBirth,Address,Email,Contact,Pswd,FkDeptId,FatherName,CreatedDate,IsActive,IsDeleted")] FacultyDetail facultyDetail) { if (ModelState.IsValid) { _context.Add(facultyDetail); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["FkDeptId"] = new SelectList(_context.MstDepartments, "PkDeptId", "PkDeptId", facultyDetail.FkDeptId); return(View(facultyDetail)); }
public async Task <IActionResult> Create([Bind("PkStudentId,EnrollId,Email,FirstName,LastName,DateOfBirth,Contact,Address,Pswd,Course,FatherName,CreatedDate,IsActive,IsDeleted,")] StudentDetail studentDetail) { if (ModelState.IsValid) { studentDetail.CreatedDate = DateTime.Now; _context.Add(studentDetail); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(studentDetail)); }
public async Task <IActionResult> Create([Bind("PkAttndId,FkStudId,Attendance,CreatedDate")] AttendanceDetail attendanceDetail) { if (ModelState.IsValid) { attendanceDetail.CreatedDate = DateTime.Now; _context.Add(attendanceDetail); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["FkStudId"] = new SelectList(_context.StudentDetails, "PkStudentId", "Contact", attendanceDetail.FkStudId); return(View(attendanceDetail)); }
public async Task <IActionResult> Create([Bind("PkMarksId,FkSemId,FkStudId,FkSubId,SessionalMarks,MainExamMarks,TotalMarks")] MarksDetail marksDetail) { if (ModelState.IsValid) { _context.Add(marksDetail); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["FkSemId"] = new SelectList(_context.MstSemesters, "PkSemId", "PkSemId", marksDetail.FkSemId); ViewData["FkStudId"] = new SelectList(_context.StudentDetails, "PkStudentId", "Contact", marksDetail.FkStudId); ViewData["FkSubId"] = new SelectList(_context.MstSubjects, "PkSubjectId", "PkSubjectId", marksDetail.FkSubId); return(View(marksDetail)); }