示例#1
0
 private static bool UpdateUserResult(string authcode, int testid, ImageArray result)
 {
     try
     {
         SqlDatabase db = new SqlDatabase(Properties.Settings.Default.connString);
         return(UpdateUserResult(authcode, testid, result, ref db));
     }
     catch
     {
         return(false);
     }
 }
示例#2
0
 private static bool UpdateUserResult(string authcode, int testid, ImageArray result, ref SqlDatabase db)
 {
     try
     {
         using (DbCommand cmd = db.GetStoredProcCommand("UpdateUserResult"))
         {
             db.AddInParameter(cmd, "authcode", DbType.String, authcode);
             db.AddInParameter(cmd, "testid", DbType.Int32, testid);
             db.AddInParameter(cmd, "imagesdisplayed", DbType.Int32, result.ImagesDisplayed);
             db.AddInParameter(cmd, "userinput", DbType.Int32, result.UserInput);
             db.AddInParameter(cmd, "imagefile", DbType.String, result.ImageFile);
             db.AddInParameter(cmd, "index", DbType.Int32, result.Index);
             db.ExecuteNonQuery(cmd);
             return(true);
         }
     }
     catch
     {
         return(false);
     }
 }
示例#3
0
 private static bool UpdateUserResult(string authcode, int testid, ImageArray result, ref SqlDatabase db)
 {
     try
     {
         using (DbCommand cmd = db.GetStoredProcCommand("UpdateUserResult"))
         {
             db.AddInParameter(cmd, "authcode", DbType.String, authcode);
             db.AddInParameter(cmd, "testid", DbType.Int32, testid);
             db.AddInParameter(cmd, "imagesdisplayed", DbType.Int32, result.ImagesDisplayed);
             db.AddInParameter(cmd, "userinput", DbType.Int32, result.UserInput);
             db.AddInParameter(cmd, "imagefile", DbType.String, result.ImageFile);
             db.AddInParameter(cmd, "index", DbType.Int32, result.Index);
             db.ExecuteNonQuery(cmd);
             return true;
         }
     }
     catch
     {
         return false;
     }
 }
示例#4
0
 private static bool UpdateUserResult(string authcode, int testid, ImageArray result)
 {
     try
     {
         SqlDatabase db = new SqlDatabase(Properties.Settings.Default.connString);
         return UpdateUserResult(authcode, testid, result, ref db);
     }
     catch
     {
         return false;
     }
 }