Beispiel #1
0
        public List <DogClasses> GetDog_ClassesByDog_IDAndShow_Entry_Class_ID(Guid dog_ID, Guid show_Entry_Class_ID)
        {
            List <DogClasses> retVal = new List <DogClasses>();

            try
            {
                DogClassesBL dogClasses = new DogClassesBL(_connString);
                tblDogClasses = dogClasses.GetDog_ClassesByDog_IDAndShow_Entry_Class_ID(dog_ID, show_Entry_Class_ID);

                if (tblDogClasses != null && tblDogClasses.Rows.Count > 0)
                {
                    foreach (DataRow row in tblDogClasses.Rows)
                    {
                        DogClasses dogClass = new DogClasses(_connString, Utils.DBNullToGuid(row["Dog_Class_ID"]));
                        retVal.Add(dogClass);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(retVal);
        }
Beispiel #2
0
        public DogClasses(string connString, Guid dog_Class_ID)
        {
            _connString = connString;

            try
            {
                DogClassesBL dogClasses = new DogClassesBL(_connString);
                tblDogClasses = dogClasses.GetDog_ClassByDog_Class_ID(dog_Class_ID);
                DataRow row = tblDogClasses.Rows[0];

                _dog_Class_ID        = dog_Class_ID;
                _entrant_ID          = Utils.DBNullToGuid(row["Entrant_ID"]);
                _dog_ID              = Utils.DBNullToGuid(row["Dog_ID"]);
                _show_Entry_Class_ID = Utils.DBNullToGuid(row["Show_Entry_Class_ID"]);
                _preferred_Part      = Utils.DBNullToInt(row["Preferred_Part"]);
                _show_Final_Class_ID = Utils.DBNullToGuid(row["Show_Final_Class_ID"]);
                _handler_ID          = Utils.DBNullToGuid(row["Handler_ID"]);
                _ring_No             = Utils.DBNullToShort(row["Ring_No"]);
                _running_Order       = Utils.DBNullToShort(row["Running_Order"]);
                _special_Request     = Utils.DBNullToString(row["Special_Request"]);
                if (_show_Entry_Class_ID != null && _show_Entry_Class_ID != new Guid())
                {
                    Guid             sec_id = new Guid(_show_Entry_Class_ID.ToString());
                    ShowEntryClasses sec    = new ShowEntryClasses(_connString, sec_id);
                    if (sec.IsNFC)
                    {
                        IsNFC = true;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #3
0
        public List <DogClasses> GetDog_ClassesByEntrant_ID(Guid entrant_ID, bool excl_NFC)
        {
            List <DogClasses> retVal = new List <DogClasses>();

            try
            {
                DogClassesBL dogClasses = new DogClassesBL(_connString);
                tblDogClasses = dogClasses.GetDog_ClassesByEntrant_ID(entrant_ID);

                if (tblDogClasses != null && tblDogClasses.Rows.Count > 0)
                {
                    foreach (DataRow row in tblDogClasses.Rows)
                    {
                        DogClasses dogClass = new DogClasses(_connString, Utils.DBNullToGuid(row["Dog_Class_ID"]));
                        if ((excl_NFC && !dogClass.IsNFC) || !excl_NFC)
                        {
                            retVal.Add(dogClass);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(retVal);
        }
Beispiel #4
0
        public int GetEntryCountByShow_Final_Class_ID(Guid show_Final_Class_ID)
        {
            int retVal = 0;

            try
            {
                DogClassesBL dogClasses = new DogClassesBL(_connString);
                retVal = dogClasses.GetEntryCountByShow_Final_Class_ID(show_Final_Class_ID);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(retVal);
        }
Beispiel #5
0
        public short GetMaxRunningOrderForClass(Guid show_Final_Class_ID)
        {
            short retVal = 0;

            try
            {
                DogClassesBL dogClasses = new DogClassesBL(_connString);
                retVal = dogClasses.GetMaxRunningOrderForClass(show_Final_Class_ID);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(retVal);
        }
Beispiel #6
0
        public bool Update_Dog_Class(Guid dog_Class_ID, Guid user_ID)
        {
            bool retVal = false;

            try
            {
                DogClassesBL dogClasses = new DogClassesBL(_connString);
                retVal = dogClasses.Update_Dog_Classes(dog_Class_ID, _entrant_ID, _dog_ID, _show_Entry_Class_ID, _preferred_Part,
                                                       _show_Final_Class_ID, _handler_ID, _ring_No, _running_Order, _special_Request, _deleteDogClass, user_ID);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(retVal);
        }
Beispiel #7
0
        public Guid?Insert_Dog_Class(Guid user_ID)
        {
            Guid?retVal = null;

            try
            {
                DogClassesBL dogClasses = new DogClassesBL(_connString);
                retVal = (Guid?)dogClasses.Insert_Dog_Classes(_entrant_ID, _dog_ID, _show_Entry_Class_ID,
                                                              _preferred_Part, _handler_ID, _special_Request, _running_Order, user_ID);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(retVal);
        }
Beispiel #8
0
        public DogClasses(Guid dog_Class_ID)
        {
            DogClassesBL dogClasses = new DogClassesBL();
            tblDogClasses = dogClasses.GetDog_ClassByDog_Class_ID(dog_Class_ID);

            Dog_Class_ID = dog_Class_ID;
            IsEntrant_IDNull = tblDogClasses[0].IsEntrant_IDNull();
            if (!IsEntrant_IDNull)
                Entrant_ID = tblDogClasses[0].Entrant_ID;
            IsDog_IDNull = tblDogClasses[0].IsDog_IDNull();
            if (!IsDog_IDNull)
                Dog_ID = tblDogClasses[0].Dog_ID;
            IsShow_Entry_Class_IDNull = tblDogClasses[0].IsShow_Entry_Class_IDNull();
            if (!IsShow_Entry_Class_IDNull)
                Show_Entry_Class_ID = tblDogClasses[0].Show_Entry_Class_ID;
            IsShow_Final_Class_IDNull = tblDogClasses[0].IsShow_Final_Class_IDNull();
            if (!IsShow_Final_Class_IDNull)
                Show_Final_Class_ID = tblDogClasses[0].Show_Final_Class_ID;
            IsHandler_IDNull = tblDogClasses[0].IsHandler_IDNull();
            if (!IsHandler_IDNull)
                Handler_ID = tblDogClasses[0].Handler_ID;
            IsRing_NoNull = tblDogClasses[0].IsRing_NoNull();
            if (!IsRing_NoNull)
                Ring_No = tblDogClasses[0].Ring_No;
            IsRunning_OrderNull = tblDogClasses[0].IsRunning_OrderNull();
            if (!IsRunning_OrderNull)
                Running_Order = tblDogClasses[0].Running_Order;
            IsSpecial_RequestNull = tblDogClasses[0].IsSpecial_RequestNull();
            if (!IsSpecial_RequestNull)
                Special_Request = tblDogClasses[0].Special_Request;
            if (Show_Entry_Class_ID != null)
            {
                Guid sec_id = new Guid(Show_Entry_Class_ID.ToString());
                ShowEntryClasses sec = new ShowEntryClasses(sec_id);
                if (sec.IsNFC)
                    IsNFC = true;
            }
        }
Beispiel #9
0
        public bool Update_Dog_Class(Guid dog_Class_ID, Guid user_ID)
        {
            bool success = false;

            DogClassesBL dogClasses = new DogClassesBL();
            success = dogClasses.Update_Dog_Classes(dog_Class_ID, Entrant_ID, Dog_ID, Show_Entry_Class_ID,
                Show_Final_Class_ID, Handler_ID, Ring_No, Running_Order, Special_Request, DeleteDogClass, user_ID);

            return success;
        }
Beispiel #10
0
        public Guid? Insert_Dog_Class(Guid user_ID)
        {
            DogClassesBL dogClasses = new DogClassesBL();
            Guid? newID = (Guid?)dogClasses.Insert_Dog_Classes(Entrant_ID, Dog_ID, Show_Entry_Class_ID,
                Handler_ID, Special_Request, user_ID);

            return newID;
        }
Beispiel #11
0
        public short GetMaxRunningOrderForClass(Guid show_Final_Class_ID)
        {
            short maxRunningOrder = 0;

            DogClassesBL dogClasses = new DogClassesBL();
            maxRunningOrder = dogClasses.GetMaxRunningOrderForClass(show_Final_Class_ID);

            return maxRunningOrder;
        }
Beispiel #12
0
        public int GetEntryCountByShow_Final_Class_ID(Guid show_Final_Class_ID)
        {
            int entryCount = 0;
            DogClassesBL dogClasses = new DogClassesBL();
            entryCount = dogClasses.GetEntryCountByShow_Final_Class_ID(show_Final_Class_ID);

            return entryCount;
        }
Beispiel #13
0
        public List<DogClasses> GetDog_ClassesByShow_Final_Class_ID(Guid show_Final_Class_ID)
        {
            List<DogClasses> dogClassesList = new List<DogClasses>();
            DogClassesBL dogClasses = new DogClassesBL();
            tblDogClasses = dogClasses.GetDog_ClassesByShow_Final_Class_ID(show_Final_Class_ID);

            if (tblDogClasses != null && tblDogClasses.Count > 0)
            {
                foreach (sss.tblDog_ClassesRow row in tblDogClasses)
                {
                    DogClasses dogClass = new DogClasses(row.Dog_Class_ID);
                    dogClassesList.Add(dogClass);
                }
            }

            return dogClassesList;
        }
Beispiel #14
0
        public List<DogClasses> GetDog_ClassesByEntrant_ID(Guid entrant_ID, bool excl_NFC)
        {
            List<DogClasses> dogClassesList = new List<DogClasses>();
            DogClassesBL dogClasses = new DogClassesBL();
            tblDogClasses = dogClasses.GetDog_ClassesByEntrant_ID(entrant_ID);

            if (tblDogClasses != null && tblDogClasses.Count > 0)
            {
                foreach (sss.tblDog_ClassesRow row in tblDogClasses)
                {
                    DogClasses dogClass = new DogClasses(row.Dog_Class_ID);
                    if ((excl_NFC && !dogClass.IsNFC) || !excl_NFC)
                        dogClassesList.Add(dogClass);
                }
            }

            return dogClassesList;
        }