public ActionResult DeleteConfirmed(int id)
        {
            CostPlace costPlace = db.CostPlaces.Find(id);

            db.CostPlaces.Remove(costPlace);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,CostCode,CostName,OrganizationCode,OrganizationName,ForwardedBill")] CostPlace costPlace)
 {
     if (ModelState.IsValid)
     {
         db.Entry(costPlace).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(costPlace));
 }
        public ActionResult Create([Bind(Include = "Id,CostCode,CostName,OrganizationCode,OrganizationName,ForwardedBill")] CostPlace costPlace)
        {
            if (ModelState.IsValid)
            {
                db.CostPlaces.Add(costPlace);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(costPlace));
        }
        // GET: CostPlaces/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CostPlace costPlace = db.CostPlaces.Find(id);

            if (costPlace == null)
            {
                return(HttpNotFound());
            }
            return(View(costPlace));
        }