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

            db.PlanesEmpresas.Remove(planesEmpresas);
            await db.SaveChangesAsync();

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

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

                return(RedirectToAction("Index"));
            }

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

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