Esempio n. 1
0
        private void btnNewOffice_Click(object sender, EventArgs e)
        {
            UserControl ucDetails = new ucOfficeDetails()
            {
                Dock = DockStyle.Fill
            };

            _navigationService.ShowDetailsUC(ucDetails);
        }
Esempio n. 2
0
        private void dgvOffices_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            //var id = dgvOffices.CurrentRow.Cells[Name = "Id"].Value.ToString();
            //UserControl ucDetails = new ucOfficeDetails(int.Parse(id)) { Dock = DockStyle.Fill };
            //_navigationService.ShowDetailsUC(ucDetails);
            var         item      = dgvOffices.CurrentRow.DataBoundItem;
            UserControl ucDetails = new ucOfficeDetails(item as Office);

            _navigationService.ShowDetailsUC(ucDetails);
        }