Beispiel #1
0
 public DetailHrace(ItemHrac hrac, SpravaHracu spravaHracu)
 {
     InitializeComponent();
     StartPosition  = FormStartPosition.CenterScreen;
     _domainHraci   = new DomainHraci();
     _domainPost    = new DomainPost();
     _domainKluby   = new DomainKluby();
     Hrac           = hrac;
     form           = spravaHracu;
     Initialization = GetPostList();
     LoadInfo();
 }
Beispiel #2
0
 public VlozitHrace(ItemHrac hracik, int id, SpravaHracu spravaHracu)
 {
     InitializeComponent();
     StartPosition  = FormStartPosition.CenterScreen;
     _domainPost    = new DomainPost();
     _domainKluby   = new DomainKluby();
     _domainHraci   = new DomainHraci();
     _id            = id;
     form           = spravaHracu;
     Hrac           = hracik;
     Initialization = InitializeAsync();
 }
Beispiel #3
0
        private void DataGridView1_CellClick2(object sender, DataGridViewCellEventArgs e)
        {
            var table = (DataGridView)sender;

            if (!(table.Columns[e.ColumnIndex] is DataGridViewButtonColumn) || e.RowIndex < 0)
            {
                return;
            }

            var a = (int)table.Rows[e.RowIndex].Cells["kID"].Value;

            //Lze vymenit DbHraci za HraciXML a naopak
            using (var detail = new SpravaHracu(a, new DbHraci()))
            {
                if (detail.ShowDialog() == DialogResult.OK)
                {
                }
            }
        }
Beispiel #4
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var table = (DataGridView)sender;

            if (e.RowIndex >= 0 && e.ColumnIndex == 1)
            {
                var value = (int)table.Rows[e.RowIndex].Cells["kid"].Value;
                var klub  = GetKlub(value);
                var aha   = new DetailKlubu(klub, value, this);
                aha.Show();
            }

            if (!(table.Columns[e.ColumnIndex] is DataGridViewButtonColumn) || e.RowIndex < 0)
            {
                return;
            }
            var a        = (int)table.Rows[e.RowIndex].Cells["kid"].Value;
            var soupiska = new SpravaHracu(a);

            soupiska.Show();
            Close();
        }