Esempio n. 1
0
        public async Task <IHttpActionResult> PutAPP_VI_INVESTIGATIONS(decimal id, APP_VI_INVESTIGATIONS aPP_VI_INVESTIGATIONS)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != aPP_VI_INVESTIGATIONS.INVESTIGATION_ID)
            {
                return(BadRequest());
            }

            db.Entry(aPP_VI_INVESTIGATIONS).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!APP_VI_INVESTIGATIONSExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Esempio n. 2
0
        public async Task <ActionResult> DeleteConfirmed(decimal id)
        {
            APP_VI_INVESTIGATIONS aPP_VI_INVESTIGATIONS = await db.APP_VI_INVESTIGATIONS.FindAsync(id);

            db.APP_VI_INVESTIGATIONS.Remove(aPP_VI_INVESTIGATIONS);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
        public async Task <IHttpActionResult> GetAPP_VI_INVESTIGATIONS(decimal id)
        {
            APP_VI_INVESTIGATIONS aPP_VI_INVESTIGATIONS = await db.APP_VI_INVESTIGATIONS.FindAsync(id);

            if (aPP_VI_INVESTIGATIONS == null)
            {
                return(NotFound());
            }

            return(Ok(aPP_VI_INVESTIGATIONS));
        }
Esempio n. 4
0
        public async Task <IHttpActionResult> PostAPP_VI_INVESTIGATIONS(APP_VI_INVESTIGATIONS aPP_VI_INVESTIGATIONS)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.APP_VI_INVESTIGATIONS.Add(aPP_VI_INVESTIGATIONS);
            await db.SaveChangesAsync();

            return(CreatedAtRoute("DefaultApi", new { id = aPP_VI_INVESTIGATIONS.INVESTIGATION_ID }, aPP_VI_INVESTIGATIONS));
        }
Esempio n. 5
0
        public async Task <ActionResult> Edit([Bind(Include = "INVESTIGATION_ID,CRIME_ID,NUNC,TITLE,DESCRIPTION,STATE,CITY")] APP_VI_INVESTIGATIONS aPP_VI_INVESTIGATIONS)
        {
            if (ModelState.IsValid)
            {
                db.Entry(aPP_VI_INVESTIGATIONS).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.CRIME_ID = new SelectList(db.APP_VI_CRIMES, "CRIME_ID", "DESCRIPTION", aPP_VI_INVESTIGATIONS.CRIME_ID);
            return(View(aPP_VI_INVESTIGATIONS));
        }
Esempio n. 6
0
        public async Task <IHttpActionResult> DeleteAPP_VI_INVESTIGATIONS(decimal id)
        {
            APP_VI_INVESTIGATIONS aPP_VI_INVESTIGATIONS = await db.APP_VI_INVESTIGATIONS.FindAsync(id);

            if (aPP_VI_INVESTIGATIONS == null)
            {
                return(NotFound());
            }

            db.APP_VI_INVESTIGATIONS.Remove(aPP_VI_INVESTIGATIONS);
            await db.SaveChangesAsync();

            return(Ok(aPP_VI_INVESTIGATIONS));
        }
Esempio n. 7
0
        // GET: AppInvestigations/Details/5
        public async Task <ActionResult> Details(decimal id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            APP_VI_INVESTIGATIONS aPP_VI_INVESTIGATIONS = await db.APP_VI_INVESTIGATIONS.FindAsync(id);

            if (aPP_VI_INVESTIGATIONS == null)
            {
                return(HttpNotFound());
            }
            return(View(aPP_VI_INVESTIGATIONS));
        }
Esempio n. 8
0
        // GET: AppInvestigations/Edit/5
        public async Task <ActionResult> Edit(decimal id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            APP_VI_INVESTIGATIONS aPP_VI_INVESTIGATIONS = await db.APP_VI_INVESTIGATIONS.FindAsync(id);

            if (aPP_VI_INVESTIGATIONS == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CRIME_ID = new SelectList(db.APP_VI_CRIMES, "CRIME_ID", "DESCRIPTION", aPP_VI_INVESTIGATIONS.CRIME_ID);
            return(View(aPP_VI_INVESTIGATIONS));
        }