示例#1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            VictimServicesModel victimServicesModel = await db.VictimServicesModel.FindAsync(id);

            db.VictimServicesModel.Remove(victimServicesModel);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
示例#2
0
        public async Task <ActionResult> Edit([Bind(Include = "VictimServicesID,VictimServices")] VictimServicesModel victimServicesModel)
        {
            if (ModelState.IsValid)
            {
                db.Entry(victimServicesModel).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(victimServicesModel));
        }
示例#3
0
        public async Task <ActionResult> Create([Bind(Include = "VictimServicesID,VictimServices")] VictimServicesModel victimServicesModel)
        {
            if (ModelState.IsValid)
            {
                db.VictimServicesModel.Add(victimServicesModel);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(victimServicesModel));
        }
示例#4
0
        // GET: VictimServicesModels/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            VictimServicesModel victimServicesModel = await db.VictimServicesModel.FindAsync(id);

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