Esempio n. 1
0
        private void M_addSupported_Click(object sender, RoutedEventArgs e)
        {
            if (CustomNumberingProvider != null)
            {
                ACW.NumSchmField[] Fields = new ACW.NumSchmField[]
                {
                    new ACW.AutogenField {
                        Name = "Autogenerated Field", Len = 4, From = 1, To = 1000, StepSize = 1, ZeroPadding = true
                    }
                };

                string Name = "Supported-" + Guid.NewGuid().ToString();

                ACW.NumSchm AddedScheme = NumService.AddNumberingScheme(EntityClassId, Name, CustomNumberingProvider.SysName, Fields, toUpperCase: false, reuseNumbers: false);
                NumService.EnableNumberingSchemes(new long[] { AddedScheme.SchmID }, true);

                DataGridSchemes.Add(new Scheme(AddedScheme));
                m_numberSchemesGrid.Items.Refresh();
            }
        }
Esempio n. 2
0
        private void M_addUnsupported_Click(object sender, RoutedEventArgs e)
        {
            if (CustomNumberingProvider != null)
            {
                ACW.NumSchmField[] Fields = new ACW.NumSchmField[]
                {
                    new ACW.PredefListField {
                        Name = "Predefined List", CodeArray = new ACW.CodeWord[] { new ACW.CodeWord {
                                                                                       Code = "a", Descr = ""
                                                                                   } }, DfltVal = "a", PredefListVal = "a"
                    }
                };

                string Name = "Unupported-" + Guid.NewGuid().ToString();

                ACW.NumSchm AddedScheme = NumService.AddNumberingScheme(EntityClassId, Name, CustomNumberingProvider.SysName, Fields, toUpperCase: false, reuseNumbers: false);
                NumService.EnableNumberingSchemes(new long[] { AddedScheme.SchmID }, true);

                DataGridSchemes.Add(new Scheme(AddedScheme));
                m_numberSchemesGrid.Items.Refresh();
            }
        }