//Cree une investigation public ActionResult Create(int id) { Hypothesis investigation = new Hypothesis(); investigation.IDUser = MsiRepoUser.GetIdByLogin(User.Identity.Name); investigation.IDTicket = id; return View("Create", investigation); }
public ActionResult Create(Hypothesis investigation) { if (investigation != null) { investigation.StateSolved = 0; investigation.DateCreation = DateTime.Now; MsiRepoHypo.Add(investigation); MsiRepoHypo.Save(); return View("CreateHypoSuccess"); } return View(); }
/// <summary> /// Créez un nouvel objet Hypothesis. /// </summary> /// <param name="hypothesisID">Valeur initiale de la propriété hypothesisID.</param> /// <param name="title">Valeur initiale de la propriété title.</param> /// <param name="dateCreation">Valeur initiale de la propriété DateCreation.</param> /// <param name="stateSolved">Valeur initiale de la propriété StateSolved.</param> /// <param name="contents">Valeur initiale de la propriété Contents.</param> /// <param name="iDTicket">Valeur initiale de la propriété IDTicket.</param> public static Hypothesis CreateHypothesis(global::System.Int32 hypothesisID, global::System.String title, global::System.DateTime dateCreation, global::System.Int32 stateSolved, global::System.String contents, global::System.Int32 iDTicket) { Hypothesis hypothesis = new Hypothesis(); hypothesis.hypothesisID = hypothesisID; hypothesis.title = title; hypothesis.DateCreation = dateCreation; hypothesis.StateSolved = stateSolved; hypothesis.Contents = contents; hypothesis.IDTicket = iDTicket; return hypothesis; }
/// <summary> /// Méthode déconseillée pour ajouter un nouvel objet à l'EntitySet Hypothesis. Utilisez la méthode .Add de la propriété ObjectSet<T> associée à la place. /// </summary> public void AddToHypothesis(Hypothesis hypothesis) { base.AddObject("Hypothesis", hypothesis); }
public ActionResult Edit(Hypothesis investigation) { if (ModelState.IsValid) { MsiRepoHypo.Update(investigation); MsiRepoHypo.Save(); return View("EditHypoSuccess"); } return View(investigation); }
public void Update(Hypothesis investigation) { MsiRepo.Hypothesis.Attach(investigation); MsiRepo.ObjectStateManager.ChangeObjectState(investigation, EntityState.Modified); }
public void Delete(Hypothesis investigation) { MsiRepo.Hypothesis.DeleteObject(investigation); }
public void Add(Hypothesis investigation) { MsiRepo.Hypothesis.AddObject(investigation); }
public InvestigationDetailViewModel(Hypothesis hypothese, Ticket ticket, List<Hypothesis> investigation) { this.hypothese = hypothese; this.Ticket = ticket; this.Investigation = investigation; }