Ejemplo n.º 1
0
        public override object GetValue(БромКлиент client = null)
        {
            switch (this.Value)
            {
            case "Write":
                return(ежимЗаписиДокумента.Запись);

            case "UndoPosting":
                return(ежимЗаписиДокумента.ОтменаПроведения);

            case "Posting":
                return(ежимЗаписиДокумента.Проведение);

            case "Запись":
                return(ежимЗаписиДокумента.Запись);

            case "ОтменаПроведения":
                return(ежимЗаписиДокумента.ОтменаПроведения);

            case "Проведение":
                return(ежимЗаписиДокумента.Проведение);
            }

            throw new Exception("Недопустимое значение поля \"Value\".");
        }
Ejemplo n.º 2
0
        public override object GetValue(БромКлиент client = null)
        {
            ТаблицаЗначений result = new ТаблицаЗначений();

            if (this.Column != null)
            {
                foreach (var column in this.Column)
                {
                    result.Колонки.Добавить(column.Name);
                }
            }
            if (this.Row != null)
            {
                foreach (var row in this.Row)
                {
                    dynamic temRow = result.Добавить();
                    if (row.Property != null)
                    {
                        foreach (var property in row.Property)
                        {
                            temRow[property.Name] = property.GetValue(client);
                        }
                    }
                }
            }

            return(result);
        }
Ejemplo n.º 3
0
        public override object GetValue(БромКлиент client = null)
        {
            switch (this.Value)
            {
            case "ActivePassive":
                return(ВидСчета.АктивноПассивный);

            case "Active":
                return(ВидСчета.Активный);

            case "Passive":
                return(ВидСчета.Пассивный);

            case "АктивноПассивный":
                return(ВидСчета.АктивноПассивный);

            case "Активный":
                return(ВидСчета.Активный);

            case "Пассивный":
                return(ВидСчета.Пассивный);
            }

            throw new Exception("Недопустимое значение поля \"Value\".");
        }
        internal МетаданныеКонфигурация(БромКлиент клиент) : base("", "", "")
        {
            this.bromClient = клиент;

            this.metadataMap = new Dictionary <string, УзелМетаданных>(StringComparer.OrdinalIgnoreCase);

            this.Init();
        }
Ejemplo n.º 5
0
 public override object GetValue(БромКлиент client = null)
 {
     return(new ОписаниеТипов(
                Array.ConvertAll(this.Item, new Converter <ValueType, Тип>(val => (Тип)val.GetValue(client))),
                this.NumberQualifiers != null ? this.NumberQualifiers.GetValue() : null,
                this.StringQualifiers != null ? this.StringQualifiers.GetValue() : null,
                this.DateQualifiers != null ? this.DateQualifiers.GetValue() : null,
                this.BinaryDataQualifiers != null ? this.BinaryDataQualifiers.GetValue() : null
                ));
 }
Ejemplo n.º 6
0
 public static Ссылка СоздатьСсылку(БромКлиент клиент, ТипКоллекции типКоллекции, string имяКоллекци, string указатель)
 {
     if (типКоллекции == Types.ТипКоллекции.Перечисление)
     {
         return(клиент.Контекст().ПолучитьПеречислениеСсылку(String.Format("{0}.{1}", типКоллекции, имяКоллекци), указатель));
     }
     else
     {
         return(клиент.Контекст().ПолучитьОбъектСсылку(String.Format("{0}.{1}", типКоллекции, имяКоллекци), new Guid(указатель)));
     }
 }
Ejemplo n.º 7
0
        public ДеревоЗначений ToTree(БромКлиент client = null)
        {
            ДеревоЗначений дерево = new ДеревоЗначений();

            дерево.Колонки.Добавить("Ключ");
            дерево.Колонки.Добавить("Значение");

            this.PropertyToTreeRow(this.Property, дерево.Строки(), client);

            return(дерево);
        }
Ejemplo n.º 8
0
        public static Ссылка СоздатьСсылку(БромКлиент клиент, string полноеИмяТипа)
        {
            string[] фрагментыИмени = полноеИмяТипа.Trim().Split('.');
            if (фрагментыИмени.Length != 2)
            {
                throw new ArgumentException("Переданный параметр \"полноеИмяТип\" не соответствует шаблону {ТипКоллекции.ИмяКоллекции}", "полноеИмяТипа");
            }

            ТипКоллекции типКоллекции = (ТипКоллекции)Enum.Parse(typeof(ТипКоллекции), фрагментыИмени[0], true);
            string       имяКоллекции = фрагментыИмени[1];

            return(СоздатьСсылку(клиент, типКоллекции, имяКоллекции));
        }
Ejemplo n.º 9
0
        public Ссылка(БромКлиент клиент, string полноеИмяТипа)
        {
            this.bromClient = клиент;

            string[] фрагментыИмени = полноеИмяТипа.Trim().Split('.');
            if (фрагментыИмени.Length != 2)
            {
                throw new ArgumentException("Переданный параметр \"полноеИмяТип\" не соответствует шаблону {ТипКоллекции.ИмяКоллекции}", "полноеИмяТипа");
            }

            this.collectionType = (ТипКоллекции)Enum.Parse(typeof(ТипКоллекции), фрагментыИмени[0], true);
            this.collectionName = фрагментыИмени[1];
        }
Ejemplo n.º 10
0
        public override object GetValue(БромКлиент client = null)
        {
            ОбъектСсылка reference = client != null?client.Контекст().ПолучитьОбъектСсылку(this.Type, new Guid(this.Value)) : throw new System.ArgumentNullException("client");

            if (this.Presentation != null)
            {
                client.Контекст().УстановитьПредставлениеОбъекта(reference, this.Presentation);
            }
            if (this.Property != null)
            {
                client.Контекст().УстановитьЗначенияИзСвойствSOAP(reference, this.Property);
            }
            return(reference);
        }
Ejemplo n.º 11
0
        public override object GetValue(БромКлиент client = null)
        {
            Соответствие result = new Соответствие(this.KeyValue != null ? this.KeyValue.Length : 0);

            if (this.KeyValue != null)
            {
                foreach (var keyValueSoap in this.KeyValue)
                {
                    result.Add(keyValueSoap.Key.GetValue(client), keyValueSoap.Value.GetValue(client));
                }
            }

            return(result);
        }
Ejemplo n.º 12
0
        public override object GetValue(БромКлиент client = null)
        {
            string ns = this.Namespace;

            if (ns.Equals(Тип.XMLПространствоИменXmlSchema, StringComparison.OrdinalIgnoreCase))
            {
                ns = "http://www.w3.org/2001/XMLSchema";
            }
            else if (ns.Equals(Тип.XMLПространствоИмен1C, StringComparison.OrdinalIgnoreCase))
            {
                ns = "http://v8.1c.ru/data";
            }
            return(new Тип(this.Value, ns));
        }
Ejemplo n.º 13
0
        public override object GetValue(БромКлиент client = null)
        {
            Структура result = new Структура();

            if (this.Property != null)
            {
                foreach (var property in this.Property)
                {
                    result.Add(property.Name, property.GetValue(client));
                }
            }

            return(result);
        }
        public override object GetValue(БромКлиент client = null)
        {
            switch (this.Value)
            {
            case "Receipt": return(ВидДвиженияНакопления.Приход);

            case "Expense": return(ВидДвиженияНакопления.асход);

            case "Приход":  return(ВидДвиженияНакопления.Приход);

            case "Расход":  return(ВидДвиженияНакопления.асход);
            }

            throw new Exception("Недопустимое значение поля \"Value\".");
        }
Ejemplo n.º 15
0
        public override object GetValue(БромКлиент client = null)
        {
            ДеревоЗначений result = new ДеревоЗначений();

            if (this.Column != null)
            {
                foreach (var column in this.Column)
                {
                    result.Колонки.Добавить(column.Name);
                }
            }
            this.AddRows(result.Строки(), this.Row, client);

            return(result);
        }
Ejemplo n.º 16
0
        public override object GetValue(БромКлиент client = null)
        {
            switch (this.Value)
            {
            case "Debit":   return(ВидДвиженияБухгалтерии.Дебет);

            case "Credit":  return(ВидДвиженияБухгалтерии.Кредит);

            case "Дебет":   return(ВидДвиженияБухгалтерии.Дебет);

            case "Кредит":  return(ВидДвиженияБухгалтерии.Кредит);
            }

            throw new Exception("Недопустимое значение поля \"Value\".");
        }
Ejemplo n.º 17
0
        public override object GetValue(БромКлиент client = null)
        {
            object     curValue     = this.Value.GetValue(client);
            ВидГраницы boundaryType = (ВидГраницы)Enum.Parse(typeof(ВидГраницы), this.Type);

            if (curValue.GetType() == typeof(МоментВремени))
            {
                return(new Граница((МоментВремени)curValue, boundaryType));
            }
            else if (curValue.GetType() == typeof(DateTime))
            {
                return(new Граница((DateTime)curValue, boundaryType));
            }

            throw new Exception("Wrong data type for \"Value\" field. Current type is: " + curValue.GetType().ToString() + ".");
        }
Ejemplo n.º 18
0
        public override object GetValue(БромКлиент client = null)
        {
            if (this.Item == null)
            {
                return(new object[0]);
            }

            Массив values = new Массив(this.Item.Length);

            for (int i = 0; i < this.Item.Length; i++)
            {
                values.Add(this.Item[i].GetValue(client));
            }

            return(values);
        }
        public override object GetValue(БромКлиент client = null)
        {
            switch (this.Value)
            {
            case "Regular":
                return(ежимПроведенияДокумента.Неоперативный);

            case "RealTime":
                return(ежимПроведенияДокумента.Оперативный);

            case "Неоперативный":
                return(ежимПроведенияДокумента.Неоперативный);

            case "Оперативный":
                return(ежимПроведенияДокумента.Оперативный);
            }

            throw new Exception("Недопустимое значение поля \"Value\".");
        }
Ejemplo n.º 20
0
        public static Ссылка СоздатьСсылку(БромКлиент клиент, string полноеИмяТипа, string указатель)
        {
            string[] фрагментыИмени = полноеИмяТипа.Trim().Split('.');
            if (фрагментыИмени.Length != 2)
            {
                throw new ArgumentException("Переданный параметр \"полноеИмяТип\" не соответствует шаблону {ТипКоллекции.ИмяКоллекции}", "полноеИмяТипа");
            }

            ТипКоллекции типКоллекции = (ТипКоллекции)Enum.Parse(typeof(ТипКоллекции), фрагментыИмени[0], true);
            string       имяКоллекции = фрагментыИмени[1];

            if (типКоллекции == Types.ТипКоллекции.Перечисление)
            {
                return(клиент.Контекст().ПолучитьПеречислениеСсылку(полноеИмяТипа, указатель));
            }
            else
            {
                return(клиент.Контекст().ПолучитьОбъектСсылку(полноеИмяТипа, new Guid(указатель)));
            }
        }
Ejemplo n.º 21
0
 public override object GetValue(БромКлиент client = null)
 {
     return(new МоментВремени(this.Date, this.Ref.GetValue(client) as ОбъектСсылка));
 }
Ejemplo n.º 22
0
 public override object GetValue(БромКлиент client = null)
 {
     return(this.Value);
 }
 internal СправочникСсылка(БромКлиент клиент, string имяКоллекци, Guid guid) : base(клиент, ITworks.Brom.Types.ТипКоллекции.Справочник, имяКоллекци, guid)
 {
 }
Ejemplo n.º 24
0
 public override object GetValue(БромКлиент client = null)
 {
     return(new ДвоичныеДанные(this.Value ?? new byte[0]));
 }
Ejemplo n.º 25
0
        private void AddRows(КоллекцияСтрокДереваЗначений rows, DataTableRow[] rowsSOAP, БромКлиент client)
        {
            if (rowsSOAP == null)
            {
                return;
            }

            foreach (var rowSOAP in rowsSOAP)
            {
                dynamic currentRow = rows.Добавить();
                if (rowSOAP.Property != null)
                {
                    foreach (ValueBase property in rowSOAP.Property)
                    {
                        currentRow[property.Name] = property.GetValue(client);
                    }
                }

                this.AddRows(currentRow.Строки(), rowSOAP.Row, client);
            }
        }
Ejemplo n.º 26
0
 public static Ссылка СоздатьСсылку(БромКлиент клиент, string полноеИмяТипа, Guid указатель)
 {
     return(клиент.Контекст().ПолучитьОбъектСсылку(полноеИмяТипа, указатель));
 }
Ejemplo n.º 27
0
 public static Ссылка СоздатьСсылку(БромКлиент клиент, ТипКоллекции типКоллекции, string имяКоллекци, Guid указатель)
 {
     return(клиент.Контекст().ПолучитьОбъектСсылку(String.Format("{0}.{1}", типКоллекции, имяКоллекци), указатель));
 }
Ejemplo n.º 28
0
 public override object GetValue(БромКлиент client = null)
 {
     return(new KeyValuePair <object, object>(this.Key.GetValue(client), this.Value.GetValue(client)));
 }
 internal ДокументСсылка(БромКлиент клиент, string имяКоллекци, Guid guid) : base(клиент, ITworks.Brom.Types.ТипКоллекции.Документ, имяКоллекци, guid)
 {
 }
Ejemplo n.º 30
0
 public Ссылка(БромКлиент клиент, ТипКоллекции типКоллекции, string имяКоллекции)
 {
     this.bromClient     = клиент;
     this.collectionType = типКоллекции;
     this.collectionName = имяКоллекции;
 }