示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ramos ramos = db.ramos.Find(id);

            db.ramos.Remove(ramos);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "ram_idn,ram_codigo_umas,ram_nombre")] ramos ramos)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ramos).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(ramos));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "ram_idn,ram_codigo_umas,ram_nombre")] ramos ramos)
        {
            if (ModelState.IsValid)
            {
                db.ramos.Add(ramos);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(ramos));
        }
示例#4
0
文件: ds_siete.cs 项目: flobos/S7SL
 public void InsertRamos(ramos ramos)
 {
     if ((ramos.EntityState != EntityState.Detached))
     {
         this.ObjectContext.ObjectStateManager.ChangeObjectState(ramos, EntityState.Added);
     }
     else
     {
         this.ObjectContext.ramos.AddObject(ramos);
     }
 }
示例#5
0
文件: ds_siete.cs 项目: flobos/S7SL
 public void DeleteRamos(ramos ramos)
 {
     if ((ramos.EntityState != EntityState.Detached))
     {
         this.ObjectContext.ObjectStateManager.ChangeObjectState(ramos, EntityState.Deleted);
     }
     else
     {
         this.ObjectContext.ramos.Attach(ramos);
         this.ObjectContext.ramos.DeleteObject(ramos);
     }
 }
示例#6
0
        // GET: ramos/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ramos ramos = db.ramos.Find(id);

            if (ramos == null)
            {
                return(HttpNotFound());
            }
            return(View(ramos));
        }
示例#7
0
文件: ds_siete.cs 项目: flobos/S7SL
 public void UpdateRamos(ramos currentramos)
 {
     this.ObjectContext.ramos.AttachAsModified(currentramos, this.ChangeSet.GetOriginal(currentramos));
 }