public ActionResult DeleteConfirmed(int id)
        {
            IrrigationSystem irrigationSystem = db.IrrigationSystems.Find(id);

            db.IrrigationSystems.Remove(irrigationSystem);
            db.SaveChanges();
            return(RedirectToAction("Create"));
        }
 public ActionResult Edit([Bind(Include = "IrrigationSysID,MunicipalityID,AreasIrrigable,NatlIrrigationSys,NIAAssisted,OtherAgency,PrivateIrrigation,PumpSystem,IrrigationDev,RemainingAreas,YearTaken")] IrrigationSystem irrigationSystem)
 {
     if (ModelState.IsValid)
     {
         db.Entry(irrigationSystem).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Create"));
     }
     return(View(irrigationSystem));
 }
        public ActionResult Create([Bind(Prefix = "Item1", Include = "IrrigationSysID,MunicipalityID,AreasIrrigable,NatlIrrigationSys,NIAAssisted,OtherAgency,PrivateIrrigation,PumpSystem,IrrigationDev,RemainingAreas,YearTaken")] IrrigationSystem irrigationSystem)
        {
            if (ModelState.IsValid)
            {
                db.IrrigationSystems.Add(irrigationSystem);
                db.SaveChanges();
                return(RedirectToAction("Create"));
            }

            return(View(irrigationSystem));
        }
        // GET: StatusOfIrrigationSystem/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            IrrigationSystem irrigationSystem = db.IrrigationSystems.Find(id);

            if (irrigationSystem == null)
            {
                return(HttpNotFound());
            }
            return(View(irrigationSystem));
        }
        // GET: StatusOfIrrigationSystem/Edit/5
        public ActionResult Edit(int?id)
        {
            MunicipalityDD();
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            IrrigationSystem irrigationSystem = db.IrrigationSystems.Find(id);

            if (irrigationSystem == null)
            {
                return(HttpNotFound());
            }
            return(View(irrigationSystem));
        }
Ejemplo n.º 6
0
 public IASystem()
 {
     IrrigationAdvSystem = IrrigationSystem.Instance;
 }
Ejemplo n.º 7
0
 public void Main()
 {
     IASystem = IrrigationSystem.Instance;
 }