Exemple #1
0
 public static NumSchm GetNumScheme(VDF.Vault.Currency.Connections.Connection connection, string NumSchemeName)
 {
     try
     {
         foreach (var ns in connection.WebServiceManager.ItemService.GetNumberingSchemesByType(NumSchmType.Activated))
         {
             if (ns.Name.Equals(NumSchemeName))
             {
                 NS = ns;
                 //MessageBox.Show(ns.Name + " | " + ns.SchmID);
                 return(NS);
             }
             else
             {
                 NS = null;
                 //MessageBox.Show(ns.Name + " | " + ns.SchmID);
             }
         }
     }
     catch (System.Exception ex)
     {
         //MessageBox.Show(ex.ToString());
     }
     return(NS);
 }
Exemple #2
0
        public static StringArray[] getItemNumArray(NumSchm NumScheme)
        {
            try
            {
                #region Get Array Size
                //cannot use this since we cannot have any items for items other than autogen type.
                //ItemNSFieldInputs = new StringArray[NumScheme.FieldArray.ToList().Count];
                int index = 0;
                foreach (var NsField in NumScheme.FieldArray)
                {
                    switch (NsField.FieldTyp.ToString())
                    {
                    case "PredefinedList":
                    {
                        break;
                    }

                    case "FreeText":
                    {
                        break;
                    }

                    case "Delimiter":
                    {
                        break;
                    }

                    case "FixedText":
                    {
                        break;
                    }

                    case "WorkgroupLabel":
                    {
                        break;
                    }

                    case "Autogenerated":
                    {
                        index++;
                        break;
                    }
                    }
                    /* */
                }
                ItemNSFieldInputs = new StringArray[index];
                index             = 0;
                #endregion

                #region GetNSARRAY
                StringArray tempArr;
                foreach (var NsField in NumScheme.FieldArray)
                {
                    tempArr = null;
                    string[] newItemNum;
                    switch (NsField.FieldTyp.ToString())
                    {
                    case "PredefinedList":
                    {
                        break;
                    }

                    case "FreeText":
                    {
                        break;
                    }

                    case "Delimiter":
                    {
                        break;
                    }

                    case "FixedText":
                    {
                        break;
                    }

                    case "WorkgroupLabel":
                    {
                        break;
                    }

                    case "Autogenerated":
                    {
                        newItemNum               = new string[] { "" };
                        tempArr                  = new StringArray();
                        tempArr.Items            = newItemNum;
                        ItemNSFieldInputs[index] = tempArr;
                        index++;
                        break;
                    }
                    }
                    /* */
                }
                #endregion
            }
            catch (System.Exception ex)
            {
            }
            return(ItemNSFieldInputs);
        }