예제 #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            BoardFlightLists boardFlightLists = await db.BoardFlightLists.FindAsync(id);

            db.BoardFlightLists.Remove(boardFlightLists);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
예제 #2
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,BoardsId,NumberShift,TimeBegin,TimeEnd,WorkTypesId,RoutesId,RLength,IsBack")] BoardFlightLists boardFlightLists)
        {
            if (ModelState.IsValid)
            {
                db.Entry(boardFlightLists).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.BoardsId    = new SelectList(db.Boards, "Id", "Name", boardFlightLists.BoardsId);
            ViewBag.RoutesId    = new SelectList(db.Routes, "Id", "Name", boardFlightLists.RoutesId);
            ViewBag.WorkTypesId = new SelectList(db.WorkTypes, "Id", "Name", boardFlightLists.WorkTypesId);
            return(View(boardFlightLists));
        }
예제 #3
0
        // GET: Guides/BoardFlightLists/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BoardFlightLists boardFlightLists = await db.BoardFlightLists.FindAsync(id);

            if (boardFlightLists == null)
            {
                return(HttpNotFound());
            }
            return(View(boardFlightLists));
        }
예제 #4
0
        // GET: Guides/BoardFlightLists/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BoardFlightLists boardFlightLists = await db.BoardFlightLists.FindAsync(id);

            if (boardFlightLists == null)
            {
                return(HttpNotFound());
            }
            ViewBag.BoardsId    = new SelectList(db.Boards, "Id", "Name", boardFlightLists.BoardsId);
            ViewBag.RoutesId    = new SelectList(db.Routes, "Id", "Name", boardFlightLists.RoutesId);
            ViewBag.WorkTypesId = new SelectList(db.WorkTypes, "Id", "Name", boardFlightLists.WorkTypesId);
            return(View(boardFlightLists));
        }