private void linkLabelAddOtherDetail_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var newSpecialistLicense = new SpecialistLicenseDetail(); _license.LicenseDetails.Add(newSpecialistLicense); AddDetailControl(newSpecialistLicense); }
public void UpdateControl(SpecialistLicenseDetail licenseDetail) { _licenseDetail = licenseDetail; textboxDescription.Text = _licenseDetail.Description; dateTimePickerIssue.Value = _licenseDetail.IssueDate; }
private void AddDetailControl(SpecialistLicenseDetail licenseDetail) { var control = new EmployeeLicenceOtherDetailControl(); control.UpdateControl(licenseDetail); control.Deleted += OtherDetailControl_Deleted; flowLayoutPanelOtherDetail.Controls.Remove(linkLabelAddOtherDetail); flowLayoutPanelOtherDetail.Controls.Add(control); flowLayoutPanelOtherDetail.Controls.Add(linkLabelAddOtherDetail); flowLayoutPanelOtherDetail.Height += 80; }