Example #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            BadDateReportModel badDateReportModel = await db.BadDateReportModel.FindAsync(id);

            db.BadDateReportModel.Remove(badDateReportModel);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Example #2
0
        public async Task <ActionResult> Edit([Bind(Include = "BadDateReportId,BadDateReport")] BadDateReportModel badDateReportModel)
        {
            if (ModelState.IsValid)
            {
                db.Entry(badDateReportModel).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(badDateReportModel));
        }
Example #3
0
        public async Task <ActionResult> Create([Bind(Include = "BadDateReportId,BadDateReport")] BadDateReportModel badDateReportModel)
        {
            if (ModelState.IsValid)
            {
                db.BadDateReportModel.Add(badDateReportModel);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(badDateReportModel));
        }
Example #4
0
        // GET: BadDateReportModels/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BadDateReportModel badDateReportModel = await db.BadDateReportModel.FindAsync(id);

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