예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            JassBuilderLog jassbuilderlog = db.JassBuilderLogs.Find(id);

            db.JassBuilderLogs.Remove(jassbuilderlog);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
        //
        // GET: /BuilderLog/Details/5

        public ActionResult Details(int id = 0)
        {
            JassBuilderLog jassbuilderlog = db.JassBuilderLogs.Find(id);

            if (jassbuilderlog == null)
            {
                return(HttpNotFound());
            }
            return(View(jassbuilderlog));
        }
예제 #3
0
        //
        // GET: /BuilderLog/Edit/5

        public ActionResult Edit(int id = 0)
        {
            JassBuilderLog jassbuilderlog = db.JassBuilderLogs.Find(id);

            if (jassbuilderlog == null)
            {
                return(HttpNotFound());
            }
            ViewBag.JassBuilderID = new SelectList(db.JassBuilders, "JassBuilderID", "Name", jassbuilderlog.JassBuilderID);
            return(View(jassbuilderlog));
        }
예제 #4
0
 public ActionResult Edit(JassBuilderLog jassbuilderlog)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jassbuilderlog).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.JassBuilderID = new SelectList(db.JassBuilders, "JassBuilderID", "Name", jassbuilderlog.JassBuilderID);
     return(View(jassbuilderlog));
 }
예제 #5
0
        public ActionResult Create(JassBuilderLog jassbuilderlog)
        {
            if (ModelState.IsValid)
            {
                db.JassBuilderLogs.Add(jassbuilderlog);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.JassBuilderID = new SelectList(db.JassBuilders, "JassBuilderID", "Name", jassbuilderlog.JassBuilderID);
            return(View(jassbuilderlog));
        }
예제 #6
0
        //
        // GET: /Request/Details/5

        public ActionResult ProcessSource(int id = 0)
        {
            APIRequest  apiRequest      = db.APIRequests.Find(id);
            JassBuilder tempJassBuilder = new JassBuilder();

            tempJassBuilder.APIRequest = apiRequest;

            JassBuilderLog builderLog = apiCaller.createBuilderLog(tempJassBuilder, "ProcessBuilder_Start", "Manual from Request Controller", "Start", new TimeSpan(), true);

            var result = apiCaller.processSource(tempJassBuilder, (int)apiRequest.sampleYear, (int)apiRequest.sampleMonth, (int)apiRequest.sampleWeeky, (int)apiRequest.sampleDay, true, false, builderLog);

            ViewBag.Message = result;

            return(View());
        }
예제 #7
0
        public ActionResult ProcessBuilder(int id = 0)
        {
            JassBuilder    jassbuilder = db.JassBuilders.Find(id);
            JassBuilderLog builderLog  = apiCaller.createBuilderLog(jassbuilder, "ProcessBuilder_Start", "Test", "Start", DateTime.Now - DateTime.Now, true);
            int            year        = (jassbuilder.year == null) ? 0 : (int)jassbuilder.year;
            int            month       = (jassbuilder.month == null) ? 0 : (int)jassbuilder.month;
            int            weeky       = (jassbuilder.weeky == null) ? 0 : (int)jassbuilder.weeky;
            int            day         = (jassbuilder.day == null) ? 0 : (int)jassbuilder.day;
            var            result      = apiCaller.processBuilder(jassbuilder, year, month, weeky, day, false, builderLog);

            if (jassbuilder == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Message = result;

            return(View(jassbuilder));
        }