public ActionResult DeleteConfirmed(int id) { PartA partA = db.PartAs.Find(id); db.PartAs.Remove(partA); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "PartAID,ProjectID,ProposalTitle,ProposalNumber,SponsorID,PrimaryContact,DesiredDateComplete,SVPApproved,LongerThanTwoWeeks,ProjectOverview,BusinessCase,CoreInterfaces,BusinessRisks")] PartA partA) { if (ModelState.IsValid) { db.Entry(partA).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ProjectID = new SelectList(db.Projects, "ProjectID", "ProjectName", partA.ProjectID); ViewBag.SponsorID = new SelectList(db.Sponsors, "SponsorID", "SponsorName", partA.SponsorID); return(View(partA)); }
// GET: PartAs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PartA partA = db.PartAs.Find(id); if (partA == null) { return(HttpNotFound()); } return(View(partA)); }
// GET: PartAs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PartA partA = db.PartAs.Find(id); if (partA == null) { return(HttpNotFound()); } ViewBag.ProjectID = new SelectList(db.Projects, "ProjectID", "ProjectName", partA.ProjectID); ViewBag.SponsorID = new SelectList(db.Sponsors, "SponsorID", "SponsorName", partA.SponsorID); return(View(partA)); }
public override string ToString() { return(string.Format("{0}.{1}.{2}.{3}", PartA.ToString(), PartB.ToString(), PartC.ToString(), PartD.ToString())); }
public void AddPartA() { this.mPartA = new PartA(); }
public bool Matches(string partA, string partB) { return((PartA == "*" || PartA.InvariantEquals(partA)) && (PartB == "*" || PartB.InvariantEquals(partB))); }
public bool Matches(string?partA, string?partB) { return((PartA == "*" || (PartA?.InvariantEquals(partA) ?? false)) && (PartB == "*" || (PartB?.InvariantEquals(partB) ?? false))); }