Exemple #1
0
        public List<ClassNames> GetClass_Names()
        {
            List<ClassNames> classNameList = new List<ClassNames>();
            ClassNamesBL classNames = new ClassNamesBL();
            lkpClassNames = classNames.GetClass_Names();

            if (lkpClassNames != null && lkpClassNames.Count > 0)
            {
                foreach (sss.lkpClass_NamesRow row in lkpClassNames)
                {
                    ClassNames className = new ClassNames(row.Class_Name_ID);
                    classNameList.Add(className);
                }
            }

            return classNameList;
        }
Exemple #2
0
        private void SetOwnerDogCounts(sss.tblOwnersDogsClassesDrawnListRow row, Guid show_ID)
        {
            RunningOrders.OwnerDogCount = 0;
            RunningOrders.OwnerDogsInClassCount = 0;
            RunningOrders.ClassesPerOwnerEnteredCount = 0;
            RunningOrders.ClassesPerDogEnteredCount = 0;

            List<Guid> ownerDogsList = new List<Guid>();
            List<Guid> ownerDogsInClassList = new List<Guid>();
            List<Guid> classesPerOwnerEnteredList = new List<Guid>();
            List<Guid> classesPerDogEnteredList = new List<Guid>();
            DogClasses dogClass = new DogClasses();
            List<DogClasses> dogClasses1 = dogClass.GetDog_ClassesByDog_ID((Guid)row.Dog_ID);
            foreach (DogClasses dogClass1 in dogClasses1)
            {
                ShowFinalClasses sfc = new ShowFinalClasses((Guid)dogClass1.Show_Final_Class_ID);
                if ((Guid)sfc.Show_ID == show_ID)
                {
                    if (classesPerDogEnteredList.IndexOf((Guid)dogClass1.Show_Entry_Class_ID) == -1)
                        classesPerDogEnteredList.Add((Guid)dogClass1.Show_Entry_Class_ID);
                }
            }
            DogOwners dogOwner = new DogOwners();
            List<DogOwners> dogOwnerList = dogOwner.GetDogOwnersByOwner_ID(row.Owner_ID);
            foreach (DogOwners dogOwnerRow in dogOwnerList)
            {
                List<DogClasses> dogClasses = dogClass.GetDog_ClassesByEntrant_ID(row.Entrant_ID);
                foreach (DogClasses dcRow in dogClasses)
                {
                    ShowFinalClasses sfc = new ShowFinalClasses((Guid)dcRow.Show_Final_Class_ID);
                    if ((Guid)sfc.Show_ID == show_ID)
                    {
                        Guid dog_ID = (Guid)dcRow.Dog_ID;
                        Guid dog_Class_ID = (Guid)dcRow.Dog_Class_ID;
                        Guid show_Entry_Class_ID = (Guid)dcRow.Show_Entry_Class_ID;
                        ShowEntryClasses sec = new ShowEntryClasses(show_Entry_Class_ID);
                        ClassNames cn = new ClassNames(int.Parse(sec.Class_Name_ID.ToString()));
                        if (cn.Class_Name_Description != "NFC")
                        {
                            if (ownerDogsList.IndexOf(dog_ID) == -1)
                                ownerDogsList.Add(dog_ID);
                            if (classesPerOwnerEnteredList.IndexOf(show_Entry_Class_ID) == -1)
                                classesPerOwnerEnteredList.Add(show_Entry_Class_ID);
                            if (dcRow.Show_Entry_Class_ID == sfc.Show_Entry_Class_ID)
                            {
                                if (ownerDogsInClassList.IndexOf(dog_ID) == -1)
                                    ownerDogsInClassList.Add(dog_ID);
                            }
                        }
                    }
                }
            }
            RunningOrders.OwnerDogCount = ownerDogsList.Count;
            RunningOrders.OwnerDogsInClassCount = ownerDogsInClassList.Count;
            RunningOrders.ClassesPerOwnerEnteredCount = classesPerOwnerEnteredList.Count;
            RunningOrders.ClassesPerDogEnteredCount = classesPerDogEnteredList.Count;
        }