コード例 #1
0
        private void CreateOverpricing()
        {
            // вызвать диалог добавление прихода
            OverpricingEditView v = new OverpricingEditView();

            v.ShowDialog();
            LoadOverpricings();
        }
コード例 #2
0
        private void EditOverpicing()
        {
            int         id       = 0;
            overpricing b        = null;
            DataGrid    dataGrid = dgOverpricing;

            if (dataGrid.SelectedItem != null)
            {
                object sel = dataGrid.SelectedItem;
                b  = (overpricing)sel;
                id = b.id;
            }
            if (id > 0)
            {
                OverpricingEditView v = new OverpricingEditView(b.id);
                v.ShowDialog();
                LoadOverpricings();
            }
        }