Пример #1
0
 public static void IsPosibleDelete(long oid)
 {
     QueryConditions conditions = new QueryConditions
     {
         WorkReportCategory = WorkReportCategoryInfo.New(oid),
     };
 }
Пример #2
0
        protected void CopyValues(WorkReportCategoryInfo source)
        {
            if (source == null)
            {
                return;
            }

            _base.CopyValues(source);
        }
Пример #3
0
        public void CopyValues(WorkReportCategoryInfo source)
        {
            if (source == null)
            {
                return;
            }

            _record.CopyValues(source.Base.Record);
        }
Пример #4
0
        protected virtual void CopyFrom(WorkReportCategoryInfo source)
        {
            if (source == null)
            {
                return;
            }

            Oid      = source.Oid;
            Name     = source.Name;
            Comments = source.Comments;
        }
Пример #5
0
        public static WorkReportCategory CloneAsNew(WorkReportCategoryInfo source)
        {
            WorkReportCategory clon = WorkReportCategory.New();;

            clon.Base.CopyValues(source);

            clon.Oid = (new Random()).Next();


            clon.MarkNew();


            return(clon);
        }
        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));
        }
Пример #8
0
 internal static string SELECT(long oid, bool lockTable)
 {
     return(SELECT(new QueryConditions {
         WorkReportCategory = WorkReportCategoryInfo.New(oid)
     }, lockTable));
 }