private void fab_OnClick(object sender, EventArgs e) { var wizard = new SupplierWizard(); wizard.EditMode = EnumHelper.EditMode.Add; wizard.ShowDialog(); }
void wizSupplier_Closed(object sender, EventArgs e) { SupplierWizard wizSupplier = sender as SupplierWizard; if (wizSupplier.SupplierId != 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)) { SupplierWizard wizSupplier = new SupplierWizard(); wizSupplier.EditMode = EnumHelper.EditMode.Edit; wizSupplier.SupplierId = id; wizSupplier.Closed += new EventHandler(wizSupplier_Closed); wizSupplier.ShowDialog(); } } }
private void SaveNewMessageHandler(object sender, EventArgs e) { if (((Form)sender).DialogResult == DialogResult.Yes) { if (Save()) { if (this.SupplierId != Guid.Empty) { Helper.DesktopHelper.RefreshMainList <SupplierList>(); this.Close(); SupplierWizard wizard = new SupplierWizard(); wizard.EditMode = EnumHelper.EditMode.Add; wizard.ShowDialog(); } } } }