Exemplo n.º 1
0
        public DogEventResultsForm( Dog dog )
            : this()
        {
            Dog = dog;

            LoadAndDisplay();
        }
Exemplo n.º 2
0
 public static List<DogEventResults> List( Dog dog )
 {
     using( var db = Database.Get() )
     {
         return db.Fetch<DogEventResults>
             ( "INNER JOIN DogEvent ON DogEvent.Id = DogEventResults.DogEventId WHERE DogId=@0 ORDER BY DogEvent.Date DESC", dog.Id );
     }
 }
Exemplo n.º 3
0
        public static DogPhoto Create( Dog dog )
        {
            var photo = new DogPhoto()
            {
                DogId = dog.Id
            };

            return photo;
        }
Exemplo n.º 4
0
        public static DogEventResults Create( Dog dog, DogEvent dogEvent )
        {
            var result = new DogEventResults()
            {
                DogId = dog.Id,
                DogEventId = dogEvent.Id
            };

            return result;
        }
Exemplo n.º 5
0
        public EditDogForm( Dog dog )
        {
            Dog = dog;

            InitializeComponent();

            UI();

            Bind();
        }
Exemplo n.º 6
0
        public static Dog Create()
        {
            var dog = new Dog()
            {
                Name = "<Naam>",
                Race = "<Ras>"
            };

            return dog;
        }
Exemplo n.º 7
0
 public static List<DogPhoto> List( Dog dog )
 {
     using( var db = Database.Get() )
     {
         try
         {
             return db.Fetch<DogPhoto>( "WHERE DogId=@0", dog.Id );
         }
         catch { return null; }
     }
 }
Exemplo n.º 8
0
 public static MemberDog Load( Dog dog, Member member )
 {
     using( var db = Database.Get() )
     {
         try
         {
             return db.Single<MemberDog>( "WHERE Memberid=@0 AND DogId=@1", member.Id, dog.Id );
         }
         catch { return null; }
     }
 }
Exemplo n.º 9
0
        public EditDogEventResultsForm( Member member, Dog dog, DogEvent dogEvent, DogEventResults results )
        {
            Member = member;
            Dog = dog;
            DogEvent = dogEvent;
            DogEventResults = results;

            InitializeComponent();

            UI();

            Bind();
        }
Exemplo n.º 10
0
        public static Member Load( Dog dog )
        {
            using( var db = Database.Get() )
            {
                var members = db.Fetch<Member>(
                    @"INNER JOIN
                            MemberDog
                        ON
                            MemberDog.MemberId = Member.Id
                        WHERE
                            MemberDog.DogId=@0
                        ORDER BY
                            MemberDog.Date DESC", dog.Id );

                return members.First();

            }
        }
Exemplo n.º 11
0
        public DogChartsForm( Dog dog, Member member, List<DogEventResults> dogEventResults )
        {
            Dog = dog;
            Member = member;

            InitializeComponent();

            Text = string.Format( "Resultaten voor " + GetTitleTemplate() );

            PrepareData( dogEventResults );

            AddHighJumpChart();
            AddFarJumpChart();
            AddWallClimbChart();
            AddTugOfWarChart();
            AddSprintRaceChart();
            AddWeightPullChart();

            ChartSelectionComboBox.SelectedIndex = 0;
        }
Exemplo n.º 12
0
        public void SetSelectedDog( Dog dog )
        {
            var ix = dogs.FindIndex( delegate( Dog r )
            {
                return dog != null && r.Id == dog.Id;
            } );

            DogsListView.SelectIndex( ix );
            DogsListView.EnsureVisible( ix );
        }
Exemplo n.º 13
0
 private void Push( Dog dog )
 {
     popped = dog;
 }
Exemplo n.º 14
0
        private ListViewItem CreateListItem( Member member, Dog dog )
        {
            var item = new ListViewItem( dog.Name );

            item.SubItems.Add( member.FullName );
            item.SubItems.Add( dog.Race );

            return item;
        }
Exemplo n.º 15
0
 public void LoadDogEventResults( Dog dog )
 {
     dogEventResults = DogEventResultsDAL.List( dog );
 }
Exemplo n.º 16
0
        private ListViewItem CreateListItem( Dog dog, Member member, DogEvent dogEvent, DogEventResults results )
        {
            var item = new ListViewItem( dog.Name );
            item.SubItems.Add( dogEvent.Date.ToShortDateString() );
            item.SubItems.Add( member.FullName );
            item.SubItems.Add( results.HighJump.ToString() );
            item.SubItems.Add( results.FarJump.ToString() );
            item.SubItems.Add( results.WallClimb.ToString() );
            item.SubItems.Add( results.TugOfWar.ToString() );
            item.SubItems.Add( results.SprintRace.ToString() );
            item.SubItems.Add( results.WeightPull.ToString() );

            return item;
        }