コード例 #1
0
        public PositionNominee MaxPositionNomineeDBId()
        {
            PositionNominee max = PositionNominee.Empty;

            for (int i = 0; i < this.Count; i++)
            {
                max = (this[i] as PositionNominee).DBId > max.DBId ? this[i] as PositionNominee : max;
            }
            return(max);
        }
コード例 #2
0
 public bool IsContains(PositionNominee positionNominee)
 {
     //finds out whether this PositionNomineeArr contains the given PositionNominee.
     for (int i = 0; i < this.Count; i++)
     {
         if ((this[i] as PositionNominee).DBId == positionNominee.DBId || positionNominee.DBId == 0)
         {
             if ((this[i] as PositionNominee).Equals(positionNominee))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
コード例 #3
0
        public void Fill(bool isOrderedByNominee = true)
        {
            this.Clear();
            DataTable dataTable = PositionNominee_Dal.GetDataTable(isOrderedByNominee);


            DataRow         dataRow;
            PositionNominee positionNominee;

            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                dataRow = dataTable.Rows[i];

                positionNominee = new PositionNominee(dataRow);

                Add(positionNominee);
            }
        }