Exemplo n.º 1
0
        // GET: EventLogError/Delete/5
        public ActionResult Delete(Nullable <long> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Db            db            = new Db(DbServices.ConnectionString);
            EventLogError eventLogError = EventLogErrorServices.Get(id.Value, db);

            if (eventLogError == null)
            {
                return(HttpNotFound());
            }
            return(View(eventLogError));
        }
Exemplo n.º 2
0
        // GET: EventLogError/Edit/5
        public ActionResult Edit(Nullable <long> eventLog)
        {
            Db db = new Db(DbServices.ConnectionString);

            if (eventLog == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EventLogError eventLogError = EventLogErrorServices.Get(eventLog.Value, db);

            if (eventLogError == null)
            {
                return(HttpNotFound());
            }

            ViewBag.EventLogList = new SelectList(EventLogServices.List(db), "Id", "Name", eventLogError.EventLog);
            return(View(eventLogError));
        }