public List <SatyamResultsTableEntry> getEntries(string SQLCommandString) { List <SatyamResultsTableEntry> ret = new List <SatyamResultsTableEntry>(); SqlCommand sqlCommand = new SqlCommand(SQLCommandString, dbAccess.getSQLConnection()); sqlCommand.CommandTimeout = 200; try { SqlDataReader reader = sqlCommand.ExecuteReader(); while (reader.Read()) { int ID = (int)reader["ID"]; string UserID = (string)reader["UserID"]; string JobGUID = (string)reader["JobGUID"]; string JobTemplateType = (string)reader["JobTemplateType"]; string JSonString = (string)reader["ResultString"]; int SatyamTaskTableEntryID = (int)reader["SatyamTaskTableEntryID"]; DateTime PageLoadTime = (DateTime)reader["PageLoadTime"]; DateTime SubmitTime = (DateTime)reader["SubmitTime"]; string Status = (string)reader["Status"]; SatyamResultsTableEntry entry = new SatyamResultsTableEntry(ID, JobTemplateType, UserID, JobGUID, JSonString, SatyamTaskTableEntryID, PageLoadTime, SubmitTime, Status); ret.Add(entry); } reader.Close(); } catch (SqlException ex) { throw ex; } finally { } return(ret); }
public void AddEntry(SatyamResultsTableEntry entry) { AddEntry(entry.JobTemplateType, entry.UserID, entry.JobGUID, entry.ResultString, entry.SatyamTaskTableEntryID, entry.PageLoadTime, entry.SubmitTime); }