public void InitHistories()
 {
     Applicant = new ApplicantWeb.Models.Applicant();
     HistoryFields = new HistoryFields(new DateTime(2015, 09, 15), ApplicantClassLibrary.TypeHistory.Interview, "Здорово!!!");
     HistoryCreate = new HistoryCreate(HistoryFields, Applicant.ApplicantId, Applicant);
     History = new History(HistoryCreate);
     HistoryEdit = new HistoryEdit(HistoryFields);
 }
 public ActionResult Edit(HistoryEdit historyEdit)
 {
     if (Request.IsAuthenticated)
     {
         try
         {
             History history = db.Histories.Find(historyEdit.HistoryId);
             history.Edit(historyEdit);
             if (ModelState.IsValid)
             {
                 db.Entry(history).State = EntityState.Modified;
                 db.SaveChanges();
                 return View("Details", history);
             }
             return View(historyEdit);
         }
         catch
         {
             return HttpNotFound();
         }
     }
     else
     {
         return Redirect(Url.Action("Login", "Account"));
     }
 }