private void btnEdit_Click(object sender, RoutedEventArgs e) { ServiceModeModel smm = dgvServiceMode.SelectedItem as ServiceModeModel; if (smm != null) { int id = Convert.ToInt32(smm.ID1); smm.IfEditDetails = true; ServiceModeDetails cd = new ServiceModeDetails(this, smm); cd.ShowDialog(); } else { MessageBox.Show("No record selected!"); } }
private void btnAdd_Click(object sender, RoutedEventArgs e) { ServiceModeDetails cd = new ServiceModeDetails(this); cd.ShowDialog(); }