//
        // GET: /Bug/Edit/5
        public ActionResult Edit(int id = 0)
        {
            Bug bugDB = BugDAL.GetBugById(id);
            if (bugDB == null)
            {
                return RedirectToAction("DeletedBug");
            }

            BugViewModel bug = new BugViewModel(bugDB);

            ViewBag.StatusList = new SelectList(StatusList, bug.Status);
            ViewBag.PriorityList = new SelectList(PriorityList, bug.Priority);

            return View(bug);
        }
        public ActionResult Edit(BugViewModel bug)
        {
            if (ModelState.IsValid)
            {
                BugDAL.UpdateBug(
                    bug.BugId,
                    bug.Priority,
                    bug.Status,
                    bug.Description
                    );

                InfoCardDAL.UpdateBugInfoCard(WebSecurity.CurrentUserId, bug.BugId, "Edited");

                return RedirectToAction("Index");
            }

            ViewBag.StatusList = new SelectList(StatusList, bug.Status);
            ViewBag.PriorityList = new SelectList(PriorityList, bug.Priority);

            return View(bug);
        }
        //
        // GET: /Bug/Details/5
        public ActionResult Details(int id = 0)
        {
            Bug bugDB = BugDAL.GetBugById(id);
            if (bugDB == null)
            {
                return RedirectToAction("DeletedBug");
            }

            BugViewModel bug = new BugViewModel(bugDB);
            return View(bug);
        }