Beispiel #1
0
        public ActionResult DeleteEqpmtType(tbl_eqpmt_type_mgmt eqpmtTypeDelete)
        {
            tbl_eqpmt_type_mgmt tbl_eqpmt_type_mgmt = db.tbl_eqpmt_type_mgmt.Find(eqpmtTypeDelete.id);

            db.tbl_eqpmt_type_mgmt.Remove(tbl_eqpmt_type_mgmt);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public ActionResult UpdateEqpmtType(tbl_eqpmt_type_mgmt eqpmtTypeUpdate)
        {
            using (allpax_sale_minerEntities entities = new allpax_sale_minerEntities())
            {
                tbl_eqpmt_type_mgmt UpdatedEqpmtType = (from c in entities.tbl_eqpmt_type_mgmt
                                                        where c.id == eqpmtTypeUpdate.id
                                                        select c).FirstOrDefault();
                UpdatedEqpmtType.eqpmtType = eqpmtTypeUpdate.eqpmtType;

                entities.SaveChanges();
            }

            return(RedirectToAction("Index"));
        }
Beispiel #3
0
        public ActionResult AddEqpmtType(tbl_eqpmt_type_mgmt eqpmtTypeAdd)
        {
            using (allpax_sale_minerEntities entities = new allpax_sale_minerEntities())
            {
                entities.tbl_eqpmt_type_mgmt.Add(new tbl_eqpmt_type_mgmt
                {
                    eqpmtType = eqpmtTypeAdd.eqpmtType
                });


                entities.SaveChanges();
            }

            return(new EmptyResult());
        }
 public ActionResult UpdateEqpmtType(tbl_eqpmt_type_mgmt eqpmtTypeUpdate)
 {
     db.Database.ExecuteSqlCommand("UPDATE cmps411.tbl_eqpmt_type_mgmt SET eqpmtType={1} WHERE id={0}",
                                   eqpmtTypeUpdate.id, eqpmtTypeUpdate.eqpmtType);
     return(RedirectToAction("Index"));
 }
 public ActionResult DeleteEqpmtType(tbl_eqpmt_type_mgmt eqpmtTypeDelete)
 {
     db.Database.ExecuteSqlCommand("DELETE FROM cmps411.tbl_eqpmt_type_mgmt WHERE id=({0})", eqpmtTypeDelete.id);
     return(RedirectToAction("Index"));
 }
        public ActionResult AddEqpmtType(tbl_eqpmt_type_mgmt eqpmtTypeAdd)
        {
            db.Database.ExecuteSqlCommand("INSERT into cmps411.tbl_eqpmt_type_mgmt(eqpmtType) VALUES(@p0)", @eqpmtTypeAdd.eqpmtType);

            return(new EmptyResult());
        }