private void fab_OnClick(object sender, EventArgs e) { var wizard = new StaffWizard(); wizard.EditMode = EnumHelper.EditMode.Add; wizard.ShowDialog(); }
void wizSupplier_Closed(object sender, EventArgs e) { StaffWizard wizStaff = sender as StaffWizard; if (wizStaff.StaffId != System.Guid.Empty) { BindList(); this.Update(); } }
private void ShowItem() { if (lvList.SelectedItem != null) { Guid id = Guid.Empty; if (Guid.TryParse(lvList.SelectedItem.SubItems[2].Text, out id)) { StaffWizard wizStaff = new StaffWizard(); wizStaff.EditMode = EnumHelper.EditMode.Edit; wizStaff.StaffId = id; wizStaff.Closed += new EventHandler(wizSupplier_Closed); wizStaff.ShowDialog(); } } }