internal static List <JobAnalysisDuty> GetCollection(DataTable dataItems) { List <JobAnalysisDuty> listCollection = new List <JobAnalysisDuty>(); JobAnalysisDuty current = null; if (dataItems != null) { for (int i = 0; i < dataItems.Rows.Count; i++) { current = new JobAnalysisDuty(dataItems.Rows[i]); listCollection.Add(current); } } else { throw new Exception("You cannot create a JobAnalysisDuty collection from a null data table."); } return(listCollection); }
public List <JobAnalysisDuty> GetJobAnalysisDuty() { List <JobAnalysisDuty> childDataCollection = null; if (base.ValidateKeyField(this._JAID)) { try { DataTable dt = ExecuteDataTable("spr_GetJobAnalysisDutyByJAID", this._JAID); // fill collection list childDataCollection = JobAnalysisDuty.GetCollection(dt); } catch (Exception ex) { HandleException(ex); } } return(childDataCollection); }
/// <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) { JobAnalysisDuty JobAnalysisDutyobj = obj as JobAnalysisDuty; return((JobAnalysisDutyobj == null) ? false : (this.JADutyID == JobAnalysisDutyobj.JADutyID)); }