Ejemplo n.º 1
0
        public ActionResult Delete()
        {
            if (Session["IsAdmin"] is false)
            {
                return(RedirectToAction("Logout", "Home"));
            }
            string menuid = this.HttpContext.Request["menuid"];

            try
            {
                this.SetConnectionDB();


                int          output       = 0;
                MenuServices menuServices = new MenuServices(this.DBConnection);

                output = menuServices.Delete(Int32.Parse(menuid));
                if (menuServices.ERROR != null)
                {
                    BI_Project.Helpers.FileHelper.SaveFile(menuServices.ERROR, this.LOG_FOLDER + "/ERROR_" + this.GetType().ToString() + BI_Project.Helpers.Utility.APIStringHelper.GenerateFileId() + ".txt");
                }
            }
            catch (Exception ex)
            {
            }


            return(RedirectToAction("List"));
        }