Example #1
0
        public NomineeScoreType MaxNomineeScoreTypeDBId()
        {
            NomineeScoreType max = NomineeScoreType.Empty;

            for (int i = 0; i < this.Count; i++)
            {
                max = (this[i] as NomineeScoreType).Id > max.Id ? this[i] as NomineeScoreType : max;
            }
            return(max);
        }
Example #2
0
        // Calls CaseInsensitiveComparer.Compare with the parameters reversed.
        int IComparer.Compare(object x, object y)
        {
            NomineeScoreType n1 = (NomineeScoreType)x;
            NomineeScoreType n2 = (NomineeScoreType)y;

            if (n1.DateTime > n2.DateTime)
            {
                return(1);
            }
            if (n1.DateTime < n2.DateTime)
            {
                return(-1);
            }
            else
            {
                return(0);
            }
        }
Example #3
0
        // Calls CaseInsensitiveComparer.Compare with the parameters reversed.
        int IComparer.Compare(object x, object y)
        {
            NomineeScoreType n1 = (NomineeScoreType)x;
            NomineeScoreType n2 = (NomineeScoreType)y;

            if (n1.ScoreType.Position.Id > n2.ScoreType.Position.Id)
            {
                return(1);
            }
            if (n1.ScoreType.Position.Id < n2.ScoreType.Position.Id)
            {
                return(-1);
            }
            else
            {
                return(0);
            }
        }
Example #4
0
        public bool IsContains(NomineeScoreType nomineeScoreType)
        {
            //finds out whether this NomineeScoreTypeArr contains the given NomineeScoreType.
            NomineeScoreType x;

            for (int i = 0; i < this.Count; i++)
            {
                x = (this[i] as NomineeScoreType);
                if (x.Id == nomineeScoreType.Id || nomineeScoreType.Id == 0)
                {
                    if (x.Equals(nomineeScoreType))
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Example #5
0
        public void Fill()
        {
            this.Clear();
            DataTable dataTable = NomineeScoreType_Dal.GetDataTable();


            DataRow          dataRow;
            NomineeScoreType nomineeScoreType;

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

                nomineeScoreType = new NomineeScoreType(dataRow);

                Add(nomineeScoreType);
            }
        }