Ejemplo n.º 1
0
 private void PopulateDogList()
 {
     List<DogClasses> tblDog_Classes;
     DogClasses dogClasses = new DogClasses();
     Guid entrant_ID = new Guid(Common.Entrant_ID);
     DogList dogList = new DogList();
     tblDog_Classes = dogClasses.GetDog_ClassesByEntrant_ID(entrant_ID);
     if (tblDog_Classes != null && tblDog_Classes.Count > 0)
     {
         DogOwnerList dogOwnerList = new DogOwnerList();
         foreach (DogClasses dogClassRow in tblDog_Classes)
         {
             Dogs dog = new Dogs((Guid)dogClassRow.Dog_ID);
             dogList.AddDog(dog);
         }
     }
     if (dogList != null)
         Common.MyDogList = dogList.MyDogList;
 }
Ejemplo n.º 2
0
 protected void AddDogToList(string current_Dog_ID)
 {
     Guid dog_ID = new Guid(current_Dog_ID);
     Dogs dog = new Dogs(dog_ID);
     DogList dogList = new DogList();
     dogList.MyDogList = Common.MyDogList;
     Dogs dg = null;
     if (dogList.MyDogList != null)
         dg = dogList.MyDogList.Find(delegate(Dogs d) { return d.Dog_ID == dog_ID; });
     if (dg == null)
     {
         int dogCount = dogList.AddDog(dog);
         PopulateDogGridView(dogList.MyDogList);
         Common.MyDogList = dogList.MyDogList;
     }
 }
Ejemplo n.º 3
0
 protected void EntryGridView_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         EntryGridRowIndex = e.Row.RowIndex;
         Entrant_ID = EntryGridView.DataKeys[EntryGridRowIndex].Value.ToString();
         if (!string.IsNullOrEmpty(Entrant_ID))
         {
             Guid entrant_ID = new Guid(Entrant_ID);
             GridView gvDogs = e.Row.FindControl("DogGridView") as GridView;
             GridView gvOwners = e.Row.FindControl("OwnerGridView") as GridView;
             List<DogClasses> tblDog_Classes;
             DogClasses dogClasses = new DogClasses();
             tblDog_Classes = dogClasses.GetDog_ClassesByEntrant_ID(entrant_ID, ExclNFC);
             if (tblDog_Classes != null && tblDog_Classes.Count > 0)
             {
                 DogOwnerList dogOwnerList = new DogOwnerList();
                 DogList dogList = new DogList();
                 foreach (DogClasses dogClassRow in tblDog_Classes)
                 {
                     Dogs dog = new Dogs((Guid)dogClassRow.Dog_ID);
                     dogList.AddDog(dog);
                     List<DogOwners> lnkDog_Owners;
                     DogOwners dogOwner = new DogOwners();
                     lnkDog_Owners = dogOwner.GetDogOwnersByDog_ID((Guid)dogClassRow.Dog_ID);
                     if (lnkDog_Owners != null && lnkDog_Owners.Count > 0)
                     {
                         foreach (DogOwners dogOwnerRow in lnkDog_Owners)
                         {
                             People person = new People(dogOwnerRow.Owner_ID);
                             dogOwnerList.AddOwner(person);
                         }
                         gvOwners.DataSource = dogOwnerList.MyDogOwnerList;
                         gvOwners.DataBind();
                     }
                     dogList.SortDogList();
                     gvDogs.DataSource = dogList.MyDogList;
                     gvDogs.DataBind();
                 }
             }
         }
     }
 }