コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            JassDeriver jassderiver = db.JassDerivers.Find(id);

            db.JassDerivers.Remove(jassderiver);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
        //
        // GET: /Deriver/Details/5

        public ActionResult Details(int id = 0)
        {
            JassDeriver jassderiver = db.JassDerivers.Find(id);

            if (jassderiver == null)
            {
                return(HttpNotFound());
            }
            return(View(jassderiver));
        }
コード例 #3
0
 public ActionResult Edit(JassDeriver jassderiver)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jassderiver).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.JassVariableID = new SelectList(db.JassVariables, "JassVariableID", "Name", jassderiver.JassVariableID);
     ViewBag.JassFormulaID  = new SelectList(db.JassFormulas, "JassFormulaID", "Name", jassderiver.JassFormulaID);
     ViewBag.JassGridID     = new SelectList(db.JassGrids, "JassGridID", "Name", jassderiver.JassGridID);
     return(View(jassderiver));
 }
コード例 #4
0
        //
        // GET: /Deriver/Edit/5

        public ActionResult Edit(int id = 0)
        {
            JassDeriver jassderiver = db.JassDerivers.Find(id);

            if (jassderiver == null)
            {
                return(HttpNotFound());
            }
            ViewBag.JassVariableID = new SelectList(db.JassVariables, "JassVariableID", "Name", jassderiver.JassVariableID);
            ViewBag.JassFormulaID  = new SelectList(db.JassFormulas, "JassFormulaID", "Name", jassderiver.JassFormulaID);
            ViewBag.JassGridID     = new SelectList(db.JassGrids, "JassGridID", "Name", jassderiver.JassGridID);
            return(View(jassderiver));
        }
コード例 #5
0
        public ActionResult Create(JassDeriver jassderiver)
        {
            if (ModelState.IsValid)
            {
                db.JassDerivers.Add(jassderiver);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.JassVariableID = new SelectList(db.JassVariables, "JassVariableID", "Name", jassderiver.JassVariableID);
            ViewBag.JassFormulaID  = new SelectList(db.JassFormulas, "JassFormulaID", "Name", jassderiver.JassFormulaID);
            ViewBag.JassGridID     = new SelectList(db.JassGrids, "JassGridID", "Name", jassderiver.JassGridID);

            return(View(jassderiver));
        }
コード例 #6
0
        public ActionResult ProcessDeriverUpLoadNoClean(int id = 0)
        {
            JassWeatherAPI.ProcessDeriverModel result = new JassWeatherAPI.ProcessDeriverModel();
            try
            {
                JassDeriver jassderiver = db.JassDerivers.Find(id);

                result = apiCaller.processDeriverAll(jassderiver, true, false);
            }
            catch (Exception e)
            {
                apiCaller.createBuilderLog("EXCEPTION", "Deriver Clean", e.Message + e.StackTrace, new TimeSpan(), false);
                ViewBag.JassMessage = "ERROR when creating";
            }

            return(View("ProcessDeriver", result));
        }