public List <SatyamAggregatedProgressiveResultsTableEntry> getEntries(string SQLCommandString)
        {
            List <SatyamAggregatedProgressiveResultsTableEntry> ret = new List <SatyamAggregatedProgressiveResultsTableEntry>();
            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"];
                    int    ResultsAggregated      = (int)reader["ResultsAggregated"];

                    SatyamAggregatedProgressiveResultsTableEntry entry = new SatyamAggregatedProgressiveResultsTableEntry(ID, JobTemplateType, UserID, JobGUID, JSonString, SatyamTaskTableEntryID, ResultsAggregated);
                    ret.Add(entry);
                }
                reader.Close();
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            finally
            {
            }
            return(ret);
        }
        public SatyamAggregatedProgressiveResultsTableEntry getLatestEntryWithMostResultsAggregatedByTaskID(int taskID)
        {
            string SQLCommandString = "SELECT TOP 1 * FROM " + TableName + " WHERE SatyamTaskTableEntryID = '" + taskID.ToString() + "' ORDER BY RESULTSAGGREGATED DESC";
            SatyamAggregatedProgressiveResultsTableEntry entries = getEntry(SQLCommandString);

            return(entries);
        }
        public SatyamAggregatedProgressiveResultsTableEntry getEntryByTaskID(int taskID)
        {
            string SQLCommandString = "SELECT * FROM " + TableName + " WHERE SatyamTaskTableEntryID = '" + taskID.ToString() + "'";
            SatyamAggregatedProgressiveResultsTableEntry entry = getEntry(SQLCommandString);

            return(entry);
        }
 public void AddEntry(SatyamAggregatedProgressiveResultsTableEntry entry)
 {
     AddEntry(entry.JobTemplateType, entry.UserID, entry.JobGUID, entry.ResultString, entry.SatyamTaskTableEntryID, entry.ResultsAggregated);
 }