// GET: Selection/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } List <Knowledge> nn = new List <Knowledge>(); Candidates candidates = db.Candidates.Find(id); OccupationArea occupationArea = db.OccupationArea.Find(id); InformationBank informationBanks = db.InformationBank.Find(id); Knowledge knowledge = db.Knowledge.Find(id); model.Candidates = candidates; model.OccupationArea = occupationArea; model.InformationBank = informationBanks; model.Knowledge = knowledge; nn.Add(model.Knowledge); ViewBag.REP = nn.ToList(); if (model == null) { return(HttpNotFound()); } return(View(model)); }
// GET: Knowledges/Edit/5 public ActionResult DeveloperEdit(int?id) { var model = new CandidatesModel(); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Candidates candidates = db.Candidates.Find(id); OccupationArea occupationArea = db.OccupationArea.Find(id); InformationBank informationBank = db.InformationBank.Find(id); Knowledge knowledge = db.Knowledge.Find(id); model.Candidates = candidates; model.OccupationArea = occupationArea; model.InformationBank = informationBank; model.Knowledge = knowledge; if (model == null) { return(HttpNotFound()); } return(View(model)); }
public OccupationArea OccupationArea(CandidatesModel model) { var occupation = new OccupationArea() { OccupationAreaID = model.Candidates.CandidateID, Name = model.OccupationArea.Name, Skype = model.OccupationArea.Skype, Linkedin = model.OccupationArea.Linkedin, Cyte = model.OccupationArea.Cyte, State = model.OccupationArea.State, Portfolio = model.OccupationArea.Portfolio, Willingness = model.OccupationArea.Willingness, Horary = model.OccupationArea.Horary, Salary = model.OccupationArea.Salary, }; db.OccupationArea.Add(occupation); return(occupation); }
public ActionResult DeleteConfirmed(int id) { Candidates candidates = db.Candidates.Find(id); OccupationArea occupationArea = db.OccupationArea.Find(id); InformationBank informationBanks = db.InformationBank.Find(id); Knowledge knowledge = db.Knowledge.Find(id); model.Candidates = candidates; model.OccupationArea = occupationArea; model.InformationBank = informationBanks; model.Knowledge = knowledge; db.Candidates.Remove(model.Candidates); db.OccupationArea.Remove(model.OccupationArea); db.InformationBank.Remove(model.InformationBank); db.Knowledge.Remove(model.Knowledge); db.SaveChanges(); return(RedirectToAction("Talents")); }
public void Developer() { HomeofficeController controller = new HomeofficeController(); CandidatesModel model = new CandidatesModel(); var candidates = new Candidates() { CandidateID = 2092, Email = "*****@*****.**" }; var occupation = new OccupationArea() { OccupationAreaID = 2092, Name = "tes", Skype = "tes", Linkedin = "https://linkedin.com/in/test", Cyte = "Itabuna", State = "Bahia", Portfolio = "https://github.com/test", Willingness = "Morning", Horary = "7-8", Salary = 20, }; var information = new InformationBank() { InformationBankID = 2092, Cpf = "05453390573", BanK = "Banco do Brasil", Agency = "987898", AccountType = "corrente", AccountNumber = "6457" }; var knowledge = new Knowledge() { KnowledgeID = 2092, Ionic = 3, Android = 5, Ios = 4, Majento = 2, WordPress = 3, Html = 4, Css = 4, Bootstrap = 4, Django = 3, Jquery = 3, Angular = 4, Vue = 4, SqlServer = 5, MySql = 5, Java = 5, Phyton = 3, Cake = 4, Php = 4, AspNetMvc = 4, Ruby = 4, C = 3, C_ = 3, Photoshop = 3, Illustraitor = 4, Salesforce = 4, Seo = 3, OtherLanguage = "JS-2", Crud = "https://github.com/test", }; model.Candidates = candidates; model.OccupationArea = occupation; model.InformationBank = information; model.Knowledge = knowledge; controller.ModelState.AddModelError("", "error"); //string expectedView = "Developer"; var actual = controller.Developer(model) as ViewResult; Assert.IsNotNull(actual); //Assert.AreEqual(expectedView, actual.ViewName); Assert.AreEqual(model, actual.Model); }
public void UpdateOccupationArea(OccupationArea area) { Db.OccupationArea.Update(area); }
public void AddOccupationArea(OccupationArea area) { Db.OccupationArea.Add(area); }