internal static List <ReasonForSubmission> GetCollection(DataTable dataItems)
        {
            List <ReasonForSubmission> listCollection = new List <ReasonForSubmission>();
            ReasonForSubmission        current        = null;

            if (dataItems != null)
            {
                for (int i = 0; i < dataItems.Rows.Count; i++)
                {
                    current = new ReasonForSubmission(dataItems.Rows[i]);
                    listCollection.Add(current);
                }
            }
            else
            {
                throw new Exception("You cannot create a ReasonForSubmission collection from a null data table.");
            }

            return(listCollection);
        }
        /// <summary>
        /// Determines whether the specified System.Object is equal to the current object.
        /// </summary>
        /// <param name="obj">The System.Object to compare with the current object.</param>
        /// <returns>Returns true if the specified System.Object is equal to the current object; otherwise, false.</returns>
        public override bool Equals(Object obj)
        {
            ReasonForSubmission ReasonForSubmissionobj = obj as ReasonForSubmission;

            return((ReasonForSubmissionobj == null) ? false : (this.ReasonForSubmissionID == ReasonForSubmissionobj.ReasonForSubmissionID));
        }
Exemple #3
0
 public static List <ReasonForSubmission> GetAllReasonForSubmission()
 {
     return(ReasonForSubmission.GetCollection(ExecuteDataTable("spr_GetAllReasonForSubmissions")));
 }