コード例 #1
0
        public ActionResult SaveBuild()
        {
            var pc = (Computer)Session["CurrentBuild"];
            var cr = new ComputerRepo(new ComputerMssql());

            try
            {
                cr.Add(pc, Session["Username"].ToString());
                Session["CurrentBuild"] = new Computer();
            }
            catch (NullReferenceException x)
            {
                return(RedirectToAction("MissingParts", "Error"));
            }

            return(RedirectToAction("NewBuild", "Build"));
        }