public IHttpActionResult PostCompanyRequestProgrammingLang(CompanyRequestProgrammingLang companyRequestProgrammingLang) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.CompanyRequestProgrammingLangs.Add(companyRequestProgrammingLang); try { db.SaveChanges(); } catch (DbUpdateException) { if (CompanyRequestProgrammingLangExists(companyRequestProgrammingLang.CRPLName)) { return(Conflict()); } else { throw; } } return(CreatedAtRoute("DefaultApi", new { id = companyRequestProgrammingLang.CRPLName }, companyRequestProgrammingLang)); }
public IHttpActionResult PutCompanyRequestProgrammingLang(string id, CompanyRequestProgrammingLang companyRequestProgrammingLang) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != companyRequestProgrammingLang.CRPLName) { return(BadRequest()); } db.Entry(companyRequestProgrammingLang).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!CompanyRequestProgrammingLangExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public ActionResult DeleteConfirmed(string id) { CompanyRequestProgrammingLang companyRequestProgrammingLang = db.CompanyRequestProgrammingLangs.Find(id); db.CompanyRequestProgrammingLangs.Remove(companyRequestProgrammingLang); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CRPLName,RequestId,CRPLExperience")] CompanyRequestProgrammingLang companyRequestProgrammingLang) { if (ModelState.IsValid) { db.Entry(companyRequestProgrammingLang).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RequestId = new SelectList(db.CompanyRequests, "RequestId", "CompanyRequestJobTitle", companyRequestProgrammingLang.RequestId); return(View(companyRequestProgrammingLang)); }
public IHttpActionResult GetCompanyRequestProgrammingLang(string id) { CompanyRequestProgrammingLang companyRequestProgrammingLang = db.CompanyRequestProgrammingLangs.Find(id); if (companyRequestProgrammingLang == null) { return(NotFound()); } return(Ok(companyRequestProgrammingLang)); }
// GET: CompanyRequestProgrammingLangs/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CompanyRequestProgrammingLang companyRequestProgrammingLang = db.CompanyRequestProgrammingLangs.Find(id); if (companyRequestProgrammingLang == null) { return(HttpNotFound()); } return(View(companyRequestProgrammingLang)); }
public IHttpActionResult DeleteCompanyRequestProgrammingLang(string id) { CompanyRequestProgrammingLang companyRequestProgrammingLang = db.CompanyRequestProgrammingLangs.Find(id); if (companyRequestProgrammingLang == null) { return(NotFound()); } db.CompanyRequestProgrammingLangs.Remove(companyRequestProgrammingLang); db.SaveChanges(); return(Ok(companyRequestProgrammingLang)); }
// GET: CompanyRequestProgrammingLangs/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CompanyRequestProgrammingLang companyRequestProgrammingLang = db.CompanyRequestProgrammingLangs.Find(id); if (companyRequestProgrammingLang == null) { return(HttpNotFound()); } ViewBag.RequestId = new SelectList(db.CompanyRequests, "RequestId", "CompanyRequestJobTitle", companyRequestProgrammingLang.RequestId); return(View(companyRequestProgrammingLang)); }