Exemple #1
0
        public List <DogBreeders> GetDogBreedersByBreeder_ID(Guid breeder_ID)
        {
            List <DogBreeders> dogBreederList = new List <DogBreeders>();

            try
            {
                DogBreedersBL dogBreeders = new DogBreedersBL(_connString);
                lnkDogBreeders = dogBreeders.GetDog_BreedersByBreeder_ID(breeder_ID);

                if (lnkDogBreeders != null && lnkDogBreeders.Rows.Count > 0)
                {
                    foreach (DataRow row in lnkDogBreeders.Rows)
                    {
                        DogBreeders dogBreeder = new DogBreeders(_connString, Utils.DBNullToGuid(row["Dog_Breeder_ID"]));
                        dogBreederList.Add(dogBreeder);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(dogBreederList);
        }
Exemple #2
0
        public bool Update_Dog_Breeder(Guid original_ID, Guid user_ID)
        {
            bool retVal = false;

            try
            {
                DogBreedersBL dogBreeders = new DogBreedersBL(_connString);
                retVal = dogBreeders.Update_Dog_Breeders(original_ID, _dog_ID, _breeder_ID, _deleteDogBreeder, user_ID);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(retVal);
        }
Exemple #3
0
        public DogBreeders(string connString, Guid dog_Breeder_ID)
        {
            _connString = connString;

            try
            {
                DogBreedersBL dogBreeders = new DogBreedersBL(_connString);
                lnkDogBreeders = dogBreeders.GetDog_BreedersByDog_Breeder_ID(dog_Breeder_ID);
                DataRow row = lnkDogBreeders.Rows[0];

                _dog_Breeder_ID = dog_Breeder_ID;
                _dog_ID         = Utils.DBNullToGuid(row["Dog_ID"]);
                _breeder_ID     = Utils.DBNullToGuid(row["Breeder_ID"]);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #4
0
        public Guid?Insert_Dog_Breeder(Guid user_ID)
        {
            Guid?retVal = null;

            try
            {
                DogBreedersBL dogBreeders = new DogBreedersBL(_connString);
                if (_dog_ID != null && _breeder_ID != null)
                {
                    retVal = dogBreeders.Insert_Dog_Breeders(_dog_ID, _breeder_ID, user_ID);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(retVal);
        }
Exemple #5
0
        public DogBreeders(Guid dog_Breeder_ID)
        {
            DogBreedersBL dogBreeders = new DogBreedersBL();
            lnkDogBreeders = dogBreeders.GetDog_BreedersByDog_Breeder_ID(dog_Breeder_ID);

            Dog_Breeder_ID = dog_Breeder_ID;
            Dog_ID = lnkDogBreeders[0].Dog_ID;
            Breeder_ID = lnkDogBreeders[0].Breeder_ID;
        }
Exemple #6
0
        public bool Update_Dog_Breeder(Guid original_ID, Guid user_ID)
        {
            bool success = false;

            DogBreedersBL dogBreeders = new DogBreedersBL();
            success = dogBreeders.Update_Dog_Breeders(original_ID, Dog_ID, Breeder_ID, DeleteDogBreeder, user_ID);

            return success;
        }
Exemple #7
0
        public Guid? Insert_Dog_Breeder(Guid user_ID)
        {
            DogBreedersBL dogBreeders = new DogBreedersBL();
            Guid? newID = null;
            if (Dog_ID != null && Breeder_ID != null)
                newID = dogBreeders.Insert_Dog_Breeders(Dog_ID, Breeder_ID, user_ID);

            return newID;
        }
Exemple #8
0
        public List<DogBreeders> GetDogBreedersByDog_ID(Guid dog_ID)
        {
            List<DogBreeders> dogBreederList = new List<DogBreeders>();
            DogBreedersBL dogBreeders = new DogBreedersBL();
            lnkDogBreeders = dogBreeders.GetDog_BreedersByDog_ID(dog_ID);

            if (lnkDogBreeders != null && lnkDogBreeders.Count > 0)
            {
                foreach (sss.lnkDog_BreedersRow row in lnkDogBreeders)
                {
                    DogBreeders dogBreeder = new DogBreeders(row.Dog_Breeder_ID);
                    dogBreederList.Add(dogBreeder);
                }
            }

            return dogBreederList;
        }