public HomoSapiens(string firstName, string lastName, UniversityDepartment department, AllExistingGenders gender) { FirstName = firstName; LastName = lastName; Department = department; Gender = gender; }
public async Task <ActionResult> DeleteConfirmed(Guid id) { UniversityDepartment universityDepartment = await db.UniversityDepartment.FindAsync(id); db.UniversityDepartment.Remove(universityDepartment); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "ID,UniversityID,DepartmentID,DateTime,IsDeleted")] UniversityDepartment universityDepartment) { if (ModelState.IsValid) { db.Entry(universityDepartment).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.DepartmentID = new SelectList(db.Department, "ID", "Name", universityDepartment.DepartmentID); ViewBag.UniversityID = new SelectList(db.University, "ID", "Name", universityDepartment.UniversityID); return(View(universityDepartment)); }
// GET: UniversityDepartments/Details/5 public async Task <ActionResult> Details(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } UniversityDepartment universityDepartment = await db.UniversityDepartment.FindAsync(id); if (universityDepartment == null) { return(HttpNotFound()); } return(View(universityDepartment)); }
public async Task <ActionResult> Create([Bind(Include = "ID,UniversityID,DepartmentID,DateTime,IsDeleted")] UniversityDepartment universityDepartment) { if (ModelState.IsValid) { universityDepartment.ID = Guid.NewGuid(); db.UniversityDepartment.Add(universityDepartment); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.DepartmentID = new SelectList(db.Department, "ID", "Name", universityDepartment.DepartmentID); ViewBag.UniversityID = new SelectList(db.University, "ID", "Name", universityDepartment.UniversityID); return(View(universityDepartment)); }
// GET: UniversityDepartments/Edit/5 public async Task <ActionResult> Edit(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } UniversityDepartment universityDepartment = await db.UniversityDepartment.FindAsync(id); if (universityDepartment == null) { return(HttpNotFound()); } ViewBag.DepartmentID = new SelectList(db.Department, "ID", "Name", universityDepartment.DepartmentID); ViewBag.UniversityID = new SelectList(db.University, "ID", "Name", universityDepartment.UniversityID); return(View(universityDepartment)); }
public Teacher(string firstName, string lastName, UniversityDepartment department, AllExistingGenders gender) : base(firstName, lastName, department, gender) { }