Exemple #1
0
        public bool SubmitConsoleCommand(SubmitCodeModel submitCodeModel)
        {
            User currentUser = helper.GetCurrentUser(HttpContext.Current.Session["UserId"]);
            if (currentUser == null) return false;

            currentUser.consoleCommand += submitCodeModel.Code.Replace("%2B", "+") + "\n";

            return true;
        }
Exemple #2
0
        public bool Submit(SubmitCodeModel submitCodeModel)
        {
            User currentUser = helper.GetCurrentUser(HttpContext.Current.Session["UserId"]);
            if (currentUser == null) return false;

            currentUser.Code = submitCodeModel.Code.Replace("%2B", "+");
            context.SaveChanges();

            return true;
        }