Exemple #1
0
        //usuwanie skryptu
        public ActionResult RemoveScript(int id)
        {
            Script sc = new Script();

            SQL sql = new SQL();
            sql.Connect();
            sc = sql.ReturnScriptByID(id);
            sql.DeleteScriptFromList(sc.ID);
            File f = new File();
            f.RemoveFile(sc.Path);
            sql.DeleteScriptFromScript(sc.ID);
            //AccountVM vm = new AccountVM(User.Identity.Name);
            User user = sql.ReturnUserByName(User.Identity.Name);
            AccountVM vm = new AccountVM(user);
            sql.Close();
            return View("Account", vm);
        }