public ActionResult Casting(CastingModel casting) { db.CastingModels.Add(casting); db.SaveChanges(); return(RedirectToAction("Casting")); }
public ActionResult DeleteConfirmed(int id) { CastingModel castingModel = db.CastingModels.Find(id); db.CastingModels.Remove(castingModel); db.SaveChanges(); return(RedirectToAction("Index")); }
public async Task <ActionResult> DeleteConfirmed(int id) { CastingModel castingModel = await db.CastingModels.FindAsync(id); db.CastingModels.Remove(castingModel); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Name,Email,Resume,Title,SubTitle")] CastingModel castingModel) { if (ModelState.IsValid) { db.Entry(castingModel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(castingModel)); }
public ActionResult Create([Bind(Include = "Id,Name,Email,Resume,Title,SubTitle")] CastingModel castingModel) { if (ModelState.IsValid) { db.CastingModels.Add(castingModel); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(castingModel)); }
public async Task <ActionResult> Edit([Bind(Include = "Id,CastHeader,CastResumeHeader,ImageContentId")] CastingModel castingModel) { if (ModelState.IsValid) { db.Entry(castingModel).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.ImageContentId = new SelectList(db.ImageContents, "Id", "ImageUrlName", castingModel.ImageContentId); return(View(castingModel)); }
// GET: Admin/CastingModels/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CastingModel castingModel = await db.CastingModels.FindAsync(id); if (castingModel == null) { return(HttpNotFound()); } return(View(castingModel)); }
// GET: Admin/CastingModels/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CastingModel castingModel = db.CastingModels.Find(id); if (castingModel == null) { return(HttpNotFound()); } return(View(castingModel)); }
// GET: Admin/CastingModels/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CastingModel castingModel = await db.CastingModels.FindAsync(id); if (castingModel == null) { return(HttpNotFound()); } ViewBag.ImageContentId = new SelectList(db.ImageContents, "Id", "ImageUrlName", castingModel.ImageContentId); return(View(castingModel)); }
public CastingViewModel(FFACE fface) { this._fface = fface; this._castingModel = new CastingModel(fface); this.CastSpellCommand = new RelayCommand( (x) => { var success = _castingModel.CastSpell(); Success = success; }); timer.Tick += timer_Tick; timer.Interval = 50; timer.Enabled = true; }