Beispiel #1
0
        private void btnAdjustOrder_Click(object sender, EventArgs e)
        {
            try
            {
                List <GadgetGridRow> rows = new List <GadgetGridRow>(dgvGadgets.DataSource as BindingList <GadgetGridRow>);

                GadgetOrderAdjustForm adjust = new GadgetOrderAdjustForm(SelectedPackage, rows);
                DialogResult          dr     = adjust.ShowDialog();

                if (dr == DialogResult.OK)
                {
                    SaveGadget(SelectedPackage);
                    OnPrimaryKeyChanged(EventArgs.Empty);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void btnAdjustOrder_Click(object sender, EventArgs e)
        {
            try
            {
                List<GadgetGridRow> rows = new List<GadgetGridRow>(dgvGadgets.DataSource as BindingList<GadgetGridRow>);

                GadgetOrderAdjustForm adjust = new GadgetOrderAdjustForm(SelectedPackage, rows);
                DialogResult dr = adjust.ShowDialog();

                if (dr == DialogResult.OK)
                {
                    SaveGadget(SelectedPackage);
                    OnPrimaryKeyChanged(EventArgs.Empty);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }