private void dataGridView_visitors_clicked(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView button = sender as DataGridView;
            DataGridViewCellCollection selectedUser = button.CurrentRow.Cells as DataGridViewCellCollection;

            //Returns the selected FlatNumber ID
            long flatId = long.Parse(selectedUser["FlatNumber"].Value.ToString());
            TimeSpan visitTime = TimeSpan.Parse(selectedUser["VisitTime"].Value.ToString());
            DateTime visitDate = DateTime.Parse(selectedUser["VisitDate"].Value.ToString());

            AddVisitor visitorDetails = new AddVisitor(flatId,visitTime,visitDate);
            visitorDetails.Show();
        }
Пример #2
0
 private void linkLabel_addVisitor_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e)
 {
     AddVisitor newVisitor = new AddVisitor();
     newVisitor.Show();
 }