public ActionResult DeleteConfirmed(int id) { GraduationYear graduationYear = db.GraduationYears.Find(id); db.GraduationYears.Remove(graduationYear); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "GraduationYearId,GraduationYearName")] GraduationYear graduationYear) { if (ModelState.IsValid) { db.Entry(graduationYear).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(graduationYear)); }
public ActionResult Create([Bind(Include = "GraduationYearId,GraduationYearName")] GraduationYear graduationYear) { if (ModelState.IsValid) { db.GraduationYears.Add(graduationYear); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(graduationYear)); }
// GET: GraduationYears/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GraduationYear graduationYear = db.GraduationYears.Find(id); if (graduationYear == null) { return(HttpNotFound()); } return(View(graduationYear)); }
internal void AddNewEducation() { // Populate the Excel Sheet GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile"); Thread.Sleep(1000); // Click the Education tab EducationTab.Click(); // Click the Add New button Thread.Sleep(1000); EducationNewButton.Click(); // Input the College/University Name field with valid characers InstituteName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "InstituteName")); // Input the Country of College/University field valid characers CountryName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Country")); // Input the Title field valid characers TitleName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title")); // Input the Degree field valid characers DegreeName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Degree")); // Input the Year of graduation field valid characers GraduationYear.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "GraduationYear")); Thread.Sleep(500); // Click the Add button EducationAddButton.Click(); Base.test.Log(LogStatus.Info, "Education has been added"); Thread.Sleep(500); // Verify if add the new Education successfully IWebElement actualtext = GlobalDefinitions.driver.FindElement(By.XPath("//div[contains(@class,'ns-type-success')]")); Assert.That(actualtext.Text, Is.EqualTo("Education has been added")); }
public GraduationYear Create(GraduationYear obj) { throw new NotImplementedException(); }