private void linkLabelRemark_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var newRemark = new SpecialistLicenseRemark(); _license.LicenseRemark.Add(newRemark); AddRemarkControl(newRemark); }
public void UpdateInformation(SpecialistLicenseRemark licenseRemark) { _licenseRemark = licenseRemark; dictionaryComboBoxRestriction.Type = typeof(LicenseRestriction); dictionaryComboBoxRights.Type = typeof(LicenseRemarkRights); dictionaryComboBoxRights.SelectedItem = _licenseRemark.Rights; dictionaryComboBoxRestriction.SelectedItem = _licenseRemark.LicenseRestriction; dateTimePickerIssue.Value = _licenseRemark.IssueDate; }
private void AddRemarkControl(SpecialistLicenseRemark licenseRemark) { var control = new EmployeeLicenceRemarkControl(); control.UpdateInformation(licenseRemark); control.Deleted += RemarkControl_Deleted; flowLayoutPanelRemark.Controls.Remove(linkLabelRemark); flowLayoutPanelRemark.Controls.Add(control); flowLayoutPanelRemark.Controls.Add(linkLabelRemark); flowLayoutPanelRemark.Height += 60; }