Exemple #1
0
        public ActionResult Casting(CastingModel casting)
        {
            db.CastingModels.Add(casting);
            db.SaveChanges();

            return(RedirectToAction("Casting"));
        }
Exemple #2
0
        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"));
        }
Exemple #4
0
 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));
 }
Exemple #5
0
        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));
        }
Exemple #8
0
        // 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;
            }
Exemple #11
0
            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;
            }