private void ShowWizard(Guid productId) { Cursor.Current = Cursors.WaitCursor; Wizard.ProductWizard oWizard = new Wizard.ProductWizard(productId); oWizard.EditMode = productId == Guid.Empty ? Mode.New : Mode.Edit; oWizard.Closed += new EventHandler(oWizard_Closed); oWizard.ShowDialog(); }
protected override void cmdSaveNew_Click(object sender, EventArgs e) { //base.cmdSaveNew_Click(sender, e); if (MessageBox.Show("Save Record, then open a new wizard?", "Save Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { if (!this.Text.Contains("ReadOnly")) { if (Save()) { FormChanged = Modified.Clean; this.Close(); ProductWizard wizard = new ProductWizard(); wizard.ProductId = Guid.Empty; wizard.EditMode = Mode.New; wizard.ShowDialog(); } } else { MessageBox.Show("Readonly transaction cannot be modified!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }