Esempio n. 1
0
        public static void UpdateKSA(long ksaID, string ksaText, bool?active)
        {
            KSA currentKSA = new KSA(ksaID);

            currentKSA.KSAText = ksaText;
            currentKSA.Active  = active;
            currentKSA.UpdateKSA();
        }
Esempio n. 2
0
        public static void AddKSA(long ksaID, string ksaText, bool?active)
        {
            KSA currentKSA = new KSA();

            currentKSA.KSAID   = -1;
            currentKSA.KSAText = ksaText;
            currentKSA.Active  = active;
            currentKSA.Add();
        }
Esempio n. 3
0
        internal static List <KSA> GetCollection(DataTable dataItems)
        {
            List <KSA> listCollection = new List <KSA>();
            KSA        current        = null;

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

            return(listCollection);
        }
Esempio n. 4
0
        public static List <KSA> GetSeriesGradeKSA(int seriesID, int grade)
        {
            List <KSA> ksaCollection = new List <KSA>();
            KSA        current       = null;
            DataTable  dataItems     = ExecuteDataTable("spr_GetAllKSABySeriesGrade", seriesID, grade);

            if (dataItems != null)
            {
                for (int i = 0; i < dataItems.Rows.Count; i++)
                {
                    current = new KSA(dataItems.Rows[i]);
                    ksaCollection.Add(current);
                }
            }
            else
            {
                throw new Exception("KSA collection could not be populated for this series and grade.");
            }

            return(ksaCollection);
        }
Esempio n. 5
0
        /// <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)
        {
            KSA KSAobj = obj as KSA;

            return((KSAobj == null) ? false : (this.KSAID == KSAobj.KSAID));
        }