예제 #1
0
        /// <summary>
        /// get all the Supported Categories of consumable Type
        /// </summary>
        /// <param name="consumableType">consumable Type</param>
        /// <returns>Supported Categories</returns>
        public static IEnumerable <ConsumableCategory> GetSupportedCategories(ConsumableType consumableType, int color = 0)
        {
            var categories = new List <ConsumableCategory>();

            if (color == 0 || color == 1)
            {
                AddConsumableCategory(categories, consumableType.PabdCatheter, ConsumableCategory.PabdCatheter);
            }
            if (color == 0 || color == 2)
            {
                AddConsumableCategory(categories, consumableType.PuraCatheter, ConsumableCategory.PuraCatheter);
            }
            if (color == 0 || color == 3)
            {
                AddConsumableCategory(categories, consumableType.PvesCatheter, ConsumableCategory.PvesCatheter);
            }

            AddConsumableCategory(categories, consumableType.VinfCatheter, ConsumableCategory.VinfCatheter);
            AddConsumableCategory(categories, consumableType.VinfTubing, ConsumableCategory.VinfTubing);
            AddConsumableCategory(categories, consumableType.EmgProbe, ConsumableCategory.EmgProbe);
            AddConsumableCategory(categories, consumableType.Patches, ConsumableCategory.PatchElectrodes);
            AddConsumableCategory(categories, consumableType.ManometryProbe, ConsumableCategory.ManometryProbe);
            AddConsumableCategory(categories, consumableType.ManometryTubing, ConsumableCategory.ManometryTubing);
            AddConsumableCategory(categories, consumableType.StimProbe, ConsumableCategory.StimProbe);
            return(categories);
        }
예제 #2
0
        public static string GetSupportedCategoryNames(ConsumableType consumableType, int color)
        {
            IEnumerable <ConsumableCategory> categories = GetSupportedCategories(consumableType, color);

            StringBuilder sb = new StringBuilder();

            foreach (var category in categories)
            {
                if (sb.Length > 0)
                {
                    sb.Append(", ");
                }

                sb.Append(GetCategoryName(category));
            }

            return(sb.ToString());
        }