Пример #1
0
        static public void SaveAnswer(DataBaseExecutor db, long qid, string username, int st,
                                      string CompilerName, long UseTime, long UseMemory, Guid Guid)
        {
            db.Execute(@"INSERT INTO Answer 
(QuestionID, Username, Status, Addtime, Complier, Type, UseTime, UseMemory,[Guid] )
values(@qid,@un,@st, Now(),@cn,0,@UseTime,@UseMemory,@Guid)", "@qid", qid, "@un", username, "@st", st,
                       "@cn", CompilerName, "@UseTime", UseTime, "@UseMemory", UseMemory
                       , "@Guid", Guid.ToString()
                       );
        }
Пример #2
0
        public static void Create(DataBaseExecutor db, string Username)
        {
            db.Execute(@"INSERT INTO [User]([Username],[NickName],[Name],[Sex],[Birthday],[Grade],[School],[SchoolDetails],[Submit],[Accepted])
VALUES(@Username,@Username,'',0,Now(),2008,'','',0,0)", "@Username", Username);
        }