Ejemplo n.º 1
0
        private void btnCopyValueSet_Click(object sender, EventArgs e)
        {
            PxValueSet source = (PxValueSet)pxValueSetBindingSource.DataSource;
            PxValueSet copy   = new PxValueSet()
            {
                Valueset        = "Copy_of_" + source.Valueset,
                Elimination     = source.Elimination,
                PresText        = source.PresText,
                PresTextEnglish = source.PresTextEnglish,
                ValuePool       = source.ValuePool,
                ValuePres       = source.ValuePres,
            };

            List <PxValue> values = (List <PxValue>)dgwValues.DataSource;

            foreach (var val in values)
            {
                copy.Values.Add(new PxValue()
                {
                    ValueCode = val.ValueCode, ValueText = val.ValueText, ValueTextEnglish = val.ValueTextEnglish, Footnote = "N"
                });
            }


            CreateValueSetDialog dlg = new CreateValueSetDialog();

            dlg.SelectedValueSet = copy;
            dlg.ShowDialog();
        }
Ejemplo n.º 2
0
        private void btnNewValueSet_Click(object sender, EventArgs e)
        {
            CreateValueSetDialog dlg = new CreateValueSetDialog();

            dlg.SelectedValueSet = new Model.PxValueSet();
            dlg.ShowDialog();
        }
Ejemplo n.º 3
0
 private void btnNewValueSet_Click(object sender, EventArgs e)
 {
     CreateValueSetDialog dlg = new CreateValueSetDialog();
     dlg.SelectedValueSet = new Model.PxValueSet();
     dlg.ShowDialog();
 }
Ejemplo n.º 4
0
        private void btnCopyValueSet_Click(object sender, EventArgs e)
        {
            PxValueSet source = (PxValueSet)pxValueSetBindingSource.DataSource;
            PxValueSet copy = new PxValueSet() {
                Valueset = "Copy_of_" + source.Valueset,
                Elimination = source.Elimination,
                PresText = source.PresText,
                PresTextEnglish = source.PresTextEnglish,
                ValuePool = source.ValuePool,
                ValuePres = source.ValuePres,
            };

            List<PxValue> values = (List<PxValue>)dgwValues.DataSource;

            foreach (var val in values)
            {
                copy.Values.Add(new PxValue() { ValueCode = val.ValueCode, ValueText = val.ValueText, ValueTextEnglish = val.ValueTextEnglish , Footnote = "N"});
            }

            CreateValueSetDialog dlg = new CreateValueSetDialog();
            dlg.SelectedValueSet = copy;
            dlg.ShowDialog();
        }