Пример #1
0
 public static void IsPosibleDelete(long oid)
 {
     QueryConditions conditions = new QueryConditions
     {
         WorkReportCategory = WorkReportCategoryInfo.New(oid),
     };
 }
        public static WorkReportResourceList GetByCategoryList(long oidCategory, List <long> oidExpedients, bool clustered, bool childs = true)
        {
            QueryConditions conditions = new QueryConditions
            {
                OidList            = oidExpedients,
                WorkReportCategory = (oidCategory != 0) ? WorkReportCategoryInfo.New(oidCategory) : null,
                Orders             = new OrderList()
            };

            conditions.Orders.NewOrder("CategoryMax", ListSortDirection.Ascending, typeof(WorkReportCategory));

            if (clustered)
            {
                conditions.Groups = new GroupList();
                conditions.Groups.NewGroup("OidCategory", typeof(WorkReportResource));
            }

            return(GetList(WorkReportResource.SELECT_BY_EXPEDIENTS(conditions, false), childs));
        }
        public static WorkReportResourceList GetByCategoryList(long oidCategory, long oidExpedient, bool clustered, bool childs = true)
        {
            QueryConditions conditions = new QueryConditions
            {
                Expedient          = (oidExpedient != 0) ? ExpedientInfo.New(oidExpedient) : null,
                WorkReportCategory = (oidCategory != 0) ? WorkReportCategoryInfo.New(oidCategory) : null,
                Orders             = new OrderList()
            };

            conditions.Orders.NewOrder("CategoryMax", ListSortDirection.Ascending, typeof(WorkReportCategory));

            if (clustered)
            {
                conditions.Groups = new GroupList();
                conditions.Groups.NewGroup("OidCategory", typeof(WorkReportResource));
            }

            return(GetList(SELECT(conditions), childs));
        }
Пример #4
0
 internal static string SELECT(long oid, bool lockTable)
 {
     return(SELECT(new QueryConditions {
         WorkReportCategory = WorkReportCategoryInfo.New(oid)
     }, lockTable));
 }