コード例 #1
0
ファイル: DateHelper.cs プロジェクト: revenix/Claro
        public static bool CheckHolidays(DateTime date, UstServiceContext svcContext)
        {
            //Business Closure Calendar
            CMV_ITC_DATA.Calendar calendars = svcContext.CalendarSet.FirstOrDefault(c => c.Name == "Holiday Schedule-Cartera");

            return(calendars.CalendarRules.Any(e => e.StartTime.Value.Equals(date.Date)));
        }
コード例 #2
0
        protected void InitializeServices(IServiceProvider serviceProvider)
        {
            context   = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
            factory   = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
            iServices = factory.CreateOrganizationService(context.UserId);

            svcContext = new UstServiceContext(iServices);
        }