Exemplo n.º 1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            ThirdPartyReportModel thirdPartyReportModel = await db.ThirdPartyReportModel.FindAsync(id);

            db.ThirdPartyReportModel.Remove(thirdPartyReportModel);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Edit([Bind(Include = "ThirdPartyReportID,ThirdPartyReport")] ThirdPartyReportModel thirdPartyReportModel)
        {
            if (ModelState.IsValid)
            {
                db.Entry(thirdPartyReportModel).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(thirdPartyReportModel));
        }
Exemplo n.º 3
0
        public async Task <ActionResult> Create([Bind(Include = "ThirdPartyReportID,ThirdPartyReport")] ThirdPartyReportModel thirdPartyReportModel)
        {
            if (ModelState.IsValid)
            {
                db.ThirdPartyReportModel.Add(thirdPartyReportModel);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(thirdPartyReportModel));
        }
Exemplo n.º 4
0
        // GET: ThirdPartyReportModels/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ThirdPartyReportModel thirdPartyReportModel = await db.ThirdPartyReportModel.FindAsync(id);

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