public ActionResult DeleteConfirmed(int id) { MatterType matterType = dbContext.MatterTypes.Find(id); dbContext.MatterTypes.Remove(matterType); dbContext.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Name,Active,CreateDate,UpdateDate")] MatterType matterType) { if (ModelState.IsValid) { matterType.UpdateDate = DateTime.Now; dbContext.Entry(matterType).State = EntityState.Modified; dbContext.SaveChanges(); return(RedirectToAction("Index")); } return(View(matterType)); }
public ActionResult Create([Bind(Include = "Id,Name,Active,CreateDate,UpdateDate")] MatterType matterType) { if (ModelState.IsValid) { matterType.CreateDate = DateTime.Now; matterType.Active = true; dbContext.MatterTypes.Add(matterType); dbContext.SaveChanges(); return(RedirectToAction("Index")); } return(View(matterType)); }
// GET: Admin/MatterType/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MatterType matterType = dbContext.MatterTypes.Find(id); if (matterType == null) { return(HttpNotFound()); } return(View(matterType)); }
public MatterChange(MatterType _type, float _amount) { type = _type; amount = _amount; }
public Matter(MatterType _type, float _amount) { type = _type; amount = 0; AddAmount(_amount); }
private void SetType(MatterType type) { currentType = type; Env.CurrentTileText.text = currentType.ToString(); }