예제 #1
0
        public override ComplexValue GetChildrenInContainerList(tpList resulttype, List <string> list_ids)
        {
            ComplexValue rval = new ComplexValue();

            rval.dtable = dbConnector.GetChildrenInContainerList(list_ids);
            if (resulttype == tpList.tblList)
            {
                for (int i = 0; i < rval.dtable.Rows.Count; i++)
                {
                    var ct_id      = rval.dtable.Rows[i].Field <long>("ct_id");
                    var parent_id  = rval.dtable.Rows[i].Field <long>("parent_id");
                    var name       = rval.dtable.Rows[i].Field <string>("name");
                    var created_at = rval.dtable.Rows[i].Field <DateTime?>("created_at");
                    if (created_at == null)
                    {
                        created_at = DateTime.Now;
                    }

                    long _order       = 0;
                    long _fh_id       = -1;
                    long _predecessor = -1;
                    long _successor   = -1;
                    var  cMap         = new ContainerMap(name, ct_id, null, parent_id, _order,
                                                         _fh_id, _predecessor, _successor, created_at);

                    rval.list.Add(new ContainerNode(cMap));
                }
            }
            return(rval);
        }
예제 #2
0
        public override ComplexValue GetChildrenInContainerList(tpList resulttype, List <string> list_ids)
        {
            long parentID = Convert.ToInt64(list_ids[0]);

            courier.servType = TMorph.Schema.ServType.svSUBD;
            courier.command  = TMorph.Schema.ComType.GetChildrenConts;
            courier.SendID(parentID);
            var contlist = courier.GetContainerMapsList();
            var resval   = new ComplexValue();

            resval.list.AddRange(contlist);
            return(resval);
        }
예제 #3
0
        public override ComplexValue ReadPhrasesInParagraphsList(tpList resulttype, List <string> list_ids = null)
        {
            ComplexValue rval = new ComplexValue();

            if (resulttype == tpList.tplDBtable)
            {
                rval.dtable = dbConnector.ReadPhrasesInParagraphs(list_ids);
            }
            else
            {
                rval.list.AddRange(dbConnector.ReadPhrasesInParagraphsList(list_ids));
            }
            return(rval);
        }
예제 #4
0
 /// <summary>
 /// Получение плоского списка предложений
 /// </summary>
 /// <param name="list_ids">список ID абзацев</param>
 /// <returns>ComplexValue</returns>
 public abstract ComplexValue ReadPhrasesInParagraphsList(tpList resulttype, List <string> list_ids = null);
예제 #5
0
 /// <summary>
 /// Чтения дочерних контейнеров множества родительских контейнеров.
 /// </summary>
 /// <param name="resulttype">тип возвращаемого результата</param>
 /// <param name="list_ids">список ID родительских контейнеров</param>
 /// <returns>ComplexValue</returns>
 public abstract ComplexValue GetChildrenInContainerList(tpList resulttype, List <string> list_ids);
예제 #6
0
 public override ComplexValue ReadPhrasesInParagraphsList(tpList resulttype, List <string> list_ids = null)
 {
     throw new NotImplementedException();
 }