Exemple #1
0
        private void fab_OnClick(object sender, EventArgs e)
        {
            var wizard = new SupplierWizard();

            wizard.EditMode = EnumHelper.EditMode.Add;
            wizard.ShowDialog();
        }
Exemple #2
0
        void wizSupplier_Closed(object sender, EventArgs e)
        {
            SupplierWizard wizSupplier = sender as SupplierWizard;

            if (wizSupplier.SupplierId != System.Guid.Empty)
            {
                BindList();
                this.Update();
            }
        }
Exemple #3
0
 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();
         }
     }
 }
Exemple #4
0
        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();
                    }
                }
            }
        }