Ejemplo n.º 1
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            RxDef RxDefCur = new RxDef();

            RxDefs.Insert(RxDefCur);            //It gets deleted if user clicks cancel
            FormRxDefEdit FormE = new FormRxDefEdit(RxDefCur);

            FormE.IsNew = true;
            FormE.ShowDialog();
            FillGrid();
        }
Ejemplo n.º 2
0
        private void butAdd2_Click(object sender, System.EventArgs e)
        {
            if (gridMain.GetSelectedIndex() == -1)
            {
                MessageBox.Show(Lan.g(this, "Please select item first"));
                return;
            }
            RxDef RxDefCur = RxDefList[gridMain.GetSelectedIndex()].Copy();

            RxDefs.Insert(RxDefCur);            //Now it has a new id.  It gets deleted if user clicks cancel. Alerts not copied.
            FormRxDefEdit FormE = new FormRxDefEdit(RxDefCur);

            FormE.IsNew = true;
            FormE.ShowDialog();
            FillGrid();
        }