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

            db.StatusOfFileModel.Remove(statusOfFileModel);
            await db.SaveChangesAsync();

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

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

                return(RedirectToAction("Index"));
            }

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

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