예제 #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            condiciones_pago condiciones_pago = await db.condiciones_pago.FindAsync(id);

            db.condiciones_pago.Remove(condiciones_pago);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
예제 #2
0
        public async Task <ActionResult> Edit([Bind(Include = "con_id,con_nombre")] condiciones_pago condiciones_pago)
        {
            if (ModelState.IsValid)
            {
                db.Entry(condiciones_pago).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(condiciones_pago));
        }
예제 #3
0
        public async Task <ActionResult> Create([Bind(Include = "con_id,con_nombre")] condiciones_pago condiciones_pago)
        {
            if (ModelState.IsValid)
            {
                db.condiciones_pago.Add(condiciones_pago);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

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

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