Beispiel #1
0
        public ActionResult Create()
        {
            int ano      = DateTime.Now.Year;
            int semestre = DateTime.Now.Month;

            if (!InventarioDAO.CheckStatus())
            {
                if (InventarioDAO.Create())
                {
                    TempData["msg"]      = "Consolidado com sucesso!";
                    TempData["msg_type"] = "success";
                    return(RedirectToAction("Inventario", "Inventario"));
                }
                TempData["msg"]      = "Ocorreu um erro!";
                TempData["msg_type"] = "danger";
                return(RedirectToAction("Inventario", "Inventario"));
            }
            else
            {
                TempData["msg"]      = "Inventário já consolidado!";
                TempData["msg_type"] = "warning";
                return(RedirectToAction("Inventario", "Inventario"));
            }
        }