Example #1
0
        // Written by James Hibbard
        /// <summary>
        ///     Returns the WorkInfo for the given TaskID
        /// </summary>
        /// <param name="TaskID">The TaskID to specify the row</param>
        /// <returns>If the taskID has a Work record, a WorkInfo object containing all info about the row, if it doesn't, returns null.</returns>
        public WorkInfo getTaskWorkInfo(int TaskID)
        {
            WorkTableAdapter workAdapter = new WorkTableAdapter();

            NuRacingDataSet.WorkDataTable workTable = workAdapter.GetDataByTaskID(TaskID);
            if (workTable.Rows.Count == 0)
            {
                return(null);
            }
            else
            {
                return(new WorkInfo((NuRacingDataSet.WorkRow)workTable.Rows[0]));
            }
        }
Example #2
0
 // Written by James Hibbard
 /// <summary>
 ///     Returns the WorkInfo for the given TaskID
 /// </summary>
 /// <param name="TaskID">The TaskID to specify the row</param>
 /// <returns>If the taskID has a Work record, a WorkInfo object containing all info about the row, if it doesn't, returns null.</returns>
 public WorkInfo getTaskWorkInfo(int TaskID)
 {
     WorkTableAdapter workAdapter = new WorkTableAdapter();
     NuRacingDataSet.WorkDataTable workTable = workAdapter.GetDataByTaskID(TaskID);
     if (workTable.Rows.Count == 0)
     {
         return null;
     }
     else
     {
         return new WorkInfo((NuRacingDataSet.WorkRow)workTable.Rows[0]);
     }
 }