Ejemplo n.º 1
0
    protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            object[] obj = (object[])e.Row.DataItem;

            ((Label)(e.Row.FindControl("lblSupplier"))).Text = ((Supplier)obj[0]).Code;
            ((Label)(e.Row.FindControl("lblItem"))).Text     = ((Item)obj[1]).Code;
            DetachedCriteria selectCriteria = DetachedCriteria.For(typeof(RollingForecast));
            selectCriteria.Add(Expression.Eq("Supplier.Code", ((Supplier)obj[0]).Code));
            selectCriteria.Add(Expression.Eq("Item.Code", ((Item)obj[1]).Code));
            selectCriteria.Add(Expression.Ge("Date", StartDate));
            selectCriteria.Add(Expression.Lt("Date", StartDate.AddDays(140)));

            IList <RollingForecast> rollingForecastList = TheCriteriaMgr.FindAll <RollingForecast>(selectCriteria);

            for (int i = 0; i < DateArr.Count(); i++)
            {
                var q = rollingForecastList.Where(f => f.Date.ToShortDateString() == DateArr[i].ToShortDateString()).OrderByDescending(p => p.CreateDate);
                if (q.Count() > 0)
                {
                    RollingForecast c = q.First();
                    ((Label)(e.Row.FindControl("lblQty" + i))).Text = c.Qty.ToString("0.########");
                }
            }
        }
    }
Ejemplo n.º 2
0
        private void SetUserMilestones(BreatheEasyEntities db)
        {
            if (this.UserMilestones == null)
            {
                UserMilestones = new List <UserMilestone>();
            }

            UserMilestones.Clear();
            if (Plan.Duration > 0)
            {
                for (int days = 0; days <= Plan.Duration; days++)
                {
                    var milestoneDate = StartDate.AddDays(days);
                    int target        = CigsPerDay * (Plan.Duration - days) / Plan.Duration;
                    var milestone     = new UserMilestone()
                    {
                        Date   = milestoneDate,
                        Target = target,
                    };

                    UserMilestones.Add(milestone);
                }
            }
            else
            {
                UserMilestones.Add(new UserMilestone {
                    Date = DateTime.Today, Target = 0
                });
            }
        }
Ejemplo n.º 3
0
        public async Task OnGetAsync(DateTime?dtStartDate /*, DateTime EndDate*/)
        {
            //Course = await _context.Course.ToListAsync();
            //一个时间区间的courses(周):如果dtStartDate空,这当前周
            //var courses = from c in db.Courses
            //              select c;



            if (!dtStartDate.HasValue) //null
            {
                StartDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
            }
            else
            {
                StartDate = new DateTime(dtStartDate.Value.Year, dtStartDate.Value.Month, dtStartDate.Value.Day);
            }

            EndDate = StartDate.AddDays(7).AddMilliseconds(-1);

            //Courses = Courses.Where(c => c.StartTime >= StartDate && c.StartTime < EndDate).OrderBy(c => c.StartTime);

            //public async Task<List<Course>> GetByDateAsync(DateTime StartDate)
            Course = await _CourseMgr.GetByDateAsync(StartDate);
        }
Ejemplo n.º 4
0
        private Border CreateContentBorder(int i, DayNight dayNight, Service service)
        {
            var border1 = new Border();

            border1.BorderBrush     = Brushes.Gray;
            border1.BorderThickness = new Thickness(0, 0.5, 1, 0.5);
            var planning = service.PlanningUnits?.FirstOrDefault(p => p.Date == StartDate.AddDays(i) && p.DayNight == dayNight);


            var listEditorControl = new ListEditorControl {
                ResourceItems = ResourceItems, DayNight = dayNight, Date = StartDate.AddDays(i), ObservableResources = planning?.Employees.Select(e => new Resource(e)).ToObservableCollection() ?? new ObservableCollection <Resource>()
            };


            Binding myBinding = new Binding();

            myBinding.Source = this;
            myBinding.Path   = new PropertyPath("IsEdited");
            myBinding.Mode   = BindingMode.TwoWay;
            myBinding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
            BindingOperations.SetBinding(listEditorControl, ListEditorControl.IsEditedProperty, myBinding);

            border1.Child = listEditorControl;
            Grid.SetColumn(border1, i);
            return(border1);
        }
Ejemplo n.º 5
0
        public HoursViewModel(bool forUser)
        {
            _allGID    = Guid.NewGuid();
            ShowFilter = true;
            Users      = new ObservableCollection <User>();
            ForUser    = forUser;
            StartDate  = DateTime.Now;
            EndDate    = DateTime.Now;
            var usr = LoginHelper.GetLoggedInUser();

            if (ForUser)
            {
                while ((int)StartDate.DayOfWeek > usr.User.Company.WeekStartValue)
                {
                    StartDate = StartDate.AddDays(-1);
                }
                EndDate = StartDate.AddDays(6);
            }
            DeleteCommand  = new Command(async(parameter) => await ExecuteDeleteCommand(parameter as DisplayItem));
            ApproveCommand = new Command(async(parameter) => await approveDenyHours(parameter as UserClock, true));
            DenyCommand    = new Command(async(parameter) => await approveDenyHours(parameter as UserClock, false));
            this.sortQueue.Add(new Tuple <string, bool>("clockInDate", true));
            this.sortFields.Add("Date", "clockInDate");
            if (!forUser)
            {
                this.sortFields.Add("Employee", "user");
            }
        }
        public void ShouldFailWhenFirstCareChargeStartLessThanPackageStartDate(ReclaimSubType subtype, int daysDelta)
        {
            var request = CreateUpsertRequest(
                (subtype, _coreCost.StartDate.AddDays(daysDelta), null));

            VerifyFailedRequest(request, "First care charge start date must be greater or equal to package start date");
        }
Ejemplo n.º 7
0
        internal Expression WasMemberAsOf()
        {
            var tf  = CodeIds == "1";
            var now = Util.Now;

            EndDate = EndDate?.AddDays(1) ?? StartDate?.AddDays(1);
            Expression <Func <Person, bool> > pred = p => (
                from et in p.EnrollmentTransactions
                where et.TransactionTypeId <= 3     // things that start a change
                where et.TransactionStatus == false
                where et.TransactionDate <= EndDate // transaction starts <= looked for end
                where et.MemberTypeId != MemberTypeCode.Prospect
                where (et.Pending ?? false) == false
                where (et.NextTranChangeDate ?? now) >= StartDate // transaction ends >= looked for start
                where (OrgTypeInt ?? 0) == 0 || et.Organization.OrganizationTypeId == OrgTypeInt
                where OrganizationInt == 0 || et.OrganizationId == OrganizationInt
                where DivisionInt == 0 || et.Organization.DivOrgs.Any(dg => dg.DivId == DivisionInt)
                where ProgramInt == 0 || et.Organization.DivOrgs.Any(dg => dg.Division.ProgDivs.Any(pg => pg.ProgId == ProgramInt))
                select et
                ).Any();
            Expression expr = Expression.Convert(Expression.Invoke(pred, parm), typeof(bool));

            if (!(op == CompareType.Equal && tf))
            {
                expr = Expression.Not(expr);
            }
            return(expr);
        }
Ejemplo n.º 8
0
 public void SetWeekDays()
 {
     StartDate = DateTime.Now.AddDays(-(((int)DateTime.Now.DayOfWeek)) - (int)DayOfWeek.Sunday).Date;
     StartDate = StartDate.Add(new TimeSpan(6, 0, 0));
     EndDate   = StartDate.AddDays(7).Date;
     EndDate   = EndDate.Add(new TimeSpan(5, 59, 59));
 }
        public TimeCardViewModel()
        {
            EmployeeList = RFRepo.GetEmployees();
            //JobsList = RFRepo.GetJobs();
            if (DateTime.Now.DayOfWeek == DayOfWeek.Monday)
            {
                StartDate = DateTime.Now;
            }
            else if (DateTime.Now.DayOfWeek == DayOfWeek.Tuesday)
            {
                StartDate = DateTime.Now.AddDays(-1);
            }
            else if (DateTime.Now.DayOfWeek == DayOfWeek.Wednesday)
            {
                StartDate = DateTime.Now.AddDays(-2);
            }
            else if (DateTime.Now.DayOfWeek == DayOfWeek.Thursday)
            {
                StartDate = DateTime.Now.AddDays(-3);
            }
            else if (DateTime.Now.DayOfWeek == DayOfWeek.Friday)
            {
                StartDate = DateTime.Now.AddDays(-4);
            }
            else if (DateTime.Now.DayOfWeek == DayOfWeek.Saturday)
            {
                StartDate = DateTime.Now.AddDays(-5);
            }
            else if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday)
            {
                StartDate = DateTime.Now.AddDays(-6);
            }

            EndDate = StartDate.AddDays(5);
        }
Ejemplo n.º 10
0
        public ACOHandler(SchedulingPeriod inputData)
        {
            InputData = inputData;
            StartDate = DateTime.Parse(InputData.StartDate);
            EndDate   = DateTime.Parse(InputData.EndDate);

            NurseNumber       = inputData.Employees.Employee.Count;
            GenerationManager = new GenerationManager(InputData);
            Evaluator         = new Evalutador(InputData);

            WParam = new double[inputData.Skills.Skill.Count];
            for (int i = 0; i < inputData.Skills.Skill.Count; i++)
            {
                GradeIndex.Add(inputData.Skills.Skill.ElementAt(i), i);
                WParam[i] = i + 1;
            }

            var orderedShifts = inputData.ShiftTypes.Shift.ToList();

            orderedShifts.ForEach(x => ShiftPatternIndex.Add(x.ID, orderedShifts.IndexOf(x)));

            for (int i = 0; i < EndDate.Subtract(StartDate).Days + 1; i++)
            {
                DayIndex[StartDate.AddDays(i).DayOfWeek.ToString()].Add(i);
            }

            InitiazeCoverRequirements();
        }
Ejemplo n.º 11
0
            protected override void OnCommand(CommandArgs e)
            {
                switch (e.Command)
                {
                case "navigate":
                    StartDate = (DateTime)e.Data["start"];
                    Update(CallBackUpdateType.Full);
                    break;

                case "refresh":
                    Update();
                    break;

                case "previous":
                    StartDate = StartDate.AddDays(-7);
                    Update(CallBackUpdateType.Full);
                    break;

                case "next":
                    StartDate = StartDate.AddDays(7);
                    Update(CallBackUpdateType.Full);
                    break;

                case "today":
                    StartDate = DateTime.Today;
                    Update(CallBackUpdateType.Full);
                    break;
                }
            }
Ejemplo n.º 12
0
        public void AddCalculatedQuotation()
        {
            StartDate = DateTime.Today;


            if (Quotaion.IsRush == false || Quotaion.IsRush == null)
            {
                NumberOfDays = (Quotaion.WordCount / Category.WorkRate);
                NumberOfDays = Math.Round(NumberOfDays, 0, MidpointRounding.AwayFromZero);
                //EndDate = StartDate.AddDays((double)NumberOfDays - 1);

                CalcPrice(Quotaion.WordCount, Quotaion.ToLangID);
            }
            else if (Quotaion.IsRush == true || Quotaion.RushDate != null)
            {
                NumberOfDays = Quotaion.WordCount / Category.WorkRate;
                EndDate      = StartDate.AddDays((double)NumberOfDays - 1);
                TimeSpan difference = EndDate.Subtract(Quotaion.RushDate);
                NumberOfRushDays = (decimal)difference.TotalDays;

//                NumberOfRushDays = EndDate.Day - Quotaion.RushDate.Day;

                NumberOfDays = NumberOfDays - NumberOfRushDays;
                NumberOfDays = Math.Round(NumberOfDays, 0, MidpointRounding.AwayFromZero);
                //EndDate = StartDate.AddDays((double)NumberOfDays - 1);

                CalcPriceRush(Quotaion.WordCount, Quotaion.ToLangID, NumberOfRushDays);
            }
        }
Ejemplo n.º 13
0
        internal Expression MemberTypeAsOf()
        {
            var end = EndDate?.AddDays(1) ?? StartDate?.AddDays(1);

            Expression <Func <Person, bool> > pred = p => (
                from et in p.EnrollmentTransactions
                where et.TransactionTypeId <= 3                        // things that start a change
                where et.TransactionStatus == false
                where StartDate <= (et.NextTranChangeDate ?? Util.Now) // where it ends
                where et.TransactionDate <= end                        // where it begins
                where (et.Pending ?? false) == false
                where CodeIntIds.Contains(et.MemberTypeId)             // what it's type was during that time
                where (OrgTypeInt ?? 0) == 0 || et.Organization.OrganizationTypeId == OrgTypeInt
                where OrganizationInt == 0 || et.OrganizationId == OrganizationInt
                where DivisionInt == 0 || et.Organization.DivOrgs.Any(dg => dg.DivId == DivisionInt)
                where ProgramInt == 0 || et.Organization.DivOrgs.Any(dg => dg.Division.ProgDivs.Any(pg => pg.ProgId == ProgramInt))
                select et
                ).Any();
            Expression expr = Expression.Invoke(pred, parm);

            if (op == CompareType.NotEqual || op == CompareType.NotOneOf)
            {
                expr = Expression.Not(expr);
            }
            return(expr);
        }
Ejemplo n.º 14
0
        public async Task FormDataToList()
        {
            DateTime dateForCycle = StartDate.AddDays(DaysInterval);

            while (dateForCycle <= EndDate)
            {
                FilterDate  filterDate        = new FilterDate(StartDate, dateForCycle);
                var         jsonStringCreator = new JsonStringCreator(filter: new FilterType(filterDate), dimension: new string[] { "date" }, metrics: TypeOfMetrics);
                string      output            = jsonStringCreator.CreateJsonString(jsonStringCreator);
                HttpContent contentPost       = new StringContent(output, Encoding.UTF8, "application/json");
                var         respons           = await Client.PostAsync("https://api.adform.com/v1/reportingstats/publisher/reportdata", contentPost);

                if (respons.ReasonPhrase != "OK")
                {
                    throw new HttpRequestException(message: "Issue with request HTTP cleint post. Reason: " + respons.ReasonPhrase);
                }
                var responseString = await respons.Content.ReadAsStringAsync();

                DataFromResponse dataFromResponse = JsonConvert.DeserializeObject <DataFromResponse>(responseString);
                Console.WriteLine("Deserializing JSON and parsing");
                foreach (var item in dataFromResponse.reportData.rows)
                {
                    DataSetFormat tempElement = new DataSetFormat();
                    tempElement.FormDataFromString(item);
                    DataSet.Add(tempElement);
                }
                dateForCycle = dateForCycle.AddDays(1);
                StartDate    = dateForCycle;
                dateForCycle = dateForCycle.AddDays(DaysInterval);
                Console.WriteLine("Data is being configured");
            }
        }
Ejemplo n.º 15
0
        protected override void Next()
        {
            if (!Check())
            {
                return;
            }


            OrderDto.FullCost    = GetCost(cost, costChild, Old, Child, DaysCount);
            OrderDto.PeopleCount = Child + Old;
            OrderDto.ChildCount  = Child;
            OrderDto.StartDate   = new DateTimeOffset(StartDate);
            OrderDto.EndDate     = new DateTimeOffset(StartDate.AddDays(DaysCount));
            orderService.SetupFilledOrder(OrderDto);

            if (userService.IsAutorized)
            {
                orderService.SetupClient(userService.CurrentUser.Id);
                pageservice.ChangePage <Pages.OrderResultPage>(PoolIndex, DisappearAnimation.Default);
            }
            else
            {
                pageservice.ChangePage <Pages.ClientRegisterPage>(PoolIndex, DisappearAnimation.Default);
            }
        }
Ejemplo n.º 16
0
        private void ShiftButton_Click(object sender, RoutedEventArgs e)
        {
            var tag = ((sender as Button)?.Tag ?? null)?.ToString()?.Trim();

            if (string.IsNullOrWhiteSpace(tag))
            {
                return;
            }
            if (!byte.TryParse(tag, out var value) || value < 0 || value > 1)
            {
                return;
            }
            if (value == 0)
            {
                if (Shift == 0)
                {
                    return;
                }
                --Shift;
            }
            else
            {
                if (Shift == ulong.MaxValue)
                {
                    return;
                }
                ++Shift;
            }
            _vm.Shift    = Shift;
            LastDate     = StartDate.AddDays(Shift);
            _vm.LastDate = LastDate.ToString(@"yyyy/MM/dd HH:mm:ss");
            SetDate(LastDate);
        }
Ejemplo n.º 17
0
 public GetTimeSheetRequest()
 {
     // TODO: [TESTS] (GetTimeSheetRequest.GetTimeSheetRequest) Add tests
     StartDate = DateTime.Now;
     EndDate   = StartDate.AddDays(7);
     ClientId  = 0;
 }
Ejemplo n.º 18
0
        private void randomDates(object sender, EventArgs e)
        {
            Random   rnd = new Random();
            DateTime StartDate, EndDate;
            double   days, months;
            double   pv   = 10000;
            double   intr = 0.12;
            double   InterestAmount;
            string   path = @"\\nas4\ark2\_ab HealthcareFinanceDirect\TValue\AmortizationSchedule\random.csv";
            string   ln;
            int      n = 100;

            if (Directory.Exists(Path.GetDirectoryName(path)))
            {
                using (System.IO.StreamWriter wr = new System.IO.StreamWriter(path))
                {
                    for (int i = 0; i < n; i++)
                    {
                        StartDate = DateTime.Now.Date.AddDays(rnd.Next(100));
                        EndDate   = StartDate.AddDays(rnd.Next(365 * 2));
                        Calculate(StartDate, EndDate, out days, out months);
                        InterestAmount = GetInterestAmount(intr, pv, months, days);

                        ln = string.Format("{0}, {1:M/d/yyyy}, {2:M/d/yyyy}, {3}, {4}, {5:0.00}, {6:0.00}, {7:0.00}", i + 1, StartDate, EndDate, (int)months, (int)days, pv, intr, InterestAmount);
                        wr.WriteLine(ln);
                    }
                }
                tResult.Text = string.Format("Completed {0} random dates to CSV text file.", n);
            }
            else
            {
                tResult.Text = "The NAS directory does not exist.";
            }
        }
Ejemplo n.º 19
0
 public DateTime this[int index]
 {
     get
     {
         return(StartDate.AddDays(IntervalTimeSpan.TotalDays * index));
     }
 }
Ejemplo n.º 20
0
        /// <summary>
        /// Gets the occurence of this entry for the given day.
        /// </summary>
        /// <param name="day"></param>
        /// <returns>The found occurence, or null when this entry does not occur on that day</returns>
        private ScheduleDateTimeRange GetRangeForDay(DateTime day)
        {
            switch (Frequency)
            {
            default:
                throw new NotImplementedException();

            case RecurringFrequency.Daily:
                break;

            case RecurringFrequency.Weekdays:
                if (day.DayOfWeek < DayOfWeek.Monday || day.DayOfWeek > DayOfWeek.Friday)
                {
                    return(null);
                }
                break;

            case RecurringFrequency.Weekends:
                if (day.DayOfWeek != DayOfWeek.Saturday && day.DayOfWeek != DayOfWeek.Sunday)
                {
                    return(null);
                }
                break;

            case RecurringFrequency.Weekly:
                DateTime firstInstance = StartDate.AddDays((DayOfWeek - StartDate.DayOfWeek + 7) % 7);
                if (day.DayOfWeek != DayOfWeek || day.Subtract(firstInstance).Days % (7 * WeeksPeriod) != 0)
                {
                    return(null);
                }
                break;

            case RecurringFrequency.Monthly:
                if (day.Day != DayOfMonth)
                {
                    if (day.Day <= 3 && DayOfMonth >= 29)
                    {
                        if (!IsOverflowDate(day))
                        {
                            return(null);
                        }
                    }
                    else if (day.Day >= 28 && DayOfMonth >= 29)
                    {
                        if (!IsOverflowDate(day))
                        {
                            return(null);
                        }
                    }
                    else
                    {
                        return(null);
                    }
                }
                break;
            }

            return(new ScheduleDateTimeRange(day.Add(TimeSpan.FromSeconds(StartTimeInSeconds)),
                                             day.Add(TimeSpan.FromSeconds(EndTimeInSeconds))));
        }
Ejemplo n.º 21
0
    public static DateTimeSpan CompareDates(DateTime StartDate, DateTime EndDate)
    {
        DateTimeSpan R = new DateTimeSpan();

        if (StartDate.Equals(EndDate))
        {
            return(new DateTimeSpan());
        }
        bool Later;

        if (Later = StartDate > EndDate)
        {
            DateTime D = StartDate;
            StartDate = EndDate;
            EndDate   = D;
        }

        // Calculate Date Stuff
        for (DateTime D = StartDate.AddYears(1); D < EndDate; D = D.AddYears(1), R.Years++)
        {
            ;
        }
        if (R.Years > 0)
        {
            StartDate = StartDate.AddYears(R.Years);
        }
        for (DateTime D = StartDate.AddMonths(1); D < EndDate; D = D.AddMonths(1), R.Months++)
        {
            ;
        }
        if (R.Months > 0)
        {
            StartDate = StartDate.AddMonths(R.Months);
        }
        for (DateTime D = StartDate.AddDays(1); D < EndDate; D = D.AddDays(1), R.Days++)
        {
            ;
        }
        if (R.Days > 0)
        {
            StartDate = StartDate.AddDays(R.Days);
        }

        // Calculate Time Stuff
        TimeSpan T1 = EndDate - StartDate;

        R.Hours        = T1.Hours;
        R.Minutes      = T1.Minutes;
        R.Seconds      = T1.Seconds;
        R.Milliseconds = T1.Milliseconds;

        // Return answer. Negate values if the Start Date was later than the End Date
        if (Later)
        {
            return(new DateTimeSpan(-R.Years, -R.Months, -R.Days, -R.Hours, -R.Minutes, -R.Seconds, -R.Milliseconds));
        }
        return(R);
    }
Ejemplo n.º 22
0
 private InvoiceDataVM()
 {
     EndDate   = DateTime.Today;
     StartDate = DateTime.Today;
     StartDate.AddDays(-7);
     GetInvoice();
     Refresh    = new OwnCommand(GetInvoice);
     NewInvoice = new OwnCommand(OpenWindowCreateNewInvoice);
 }
        private void setWeekStart()
        {
            var usr = LoginHelper.GetLoggedInUser().User;

            while (StartDate.DayOfWeek != (DayOfWeek)usr.Company.WeekStart.GetValueOrDefault())
            {
                StartDate = StartDate.AddDays(-1);
            }
        }
Ejemplo n.º 24
0
        public Course()
        {
            this.StartDate = DateTime.Now;
            this.EndDate   = StartDate.AddDays(60);

            this.Resources           = new List <Resource>();
            this.StudentsEnrolled    = new List <StudentCourse>();
            this.HomeworkSubmissions = new List <Homework>();
        }
Ejemplo n.º 25
0
            protected override void OnFinish()
            {
                Events = new EventManager().FilteredData(StartDate, StartDate.AddDays(31)).AsEnumerable();

                DataIdField         = "id";
                DataStartField      = "eventstart";
                DataEndField        = "eventend";
                DataRecurrenceField = "recurrence"; // Nie działa!
            }
Ejemplo n.º 26
0
            protected override void OnBeforeEventRecurrence(DayPilot.Web.Mvc.Events.Navigator.BeforeEventRecurrenceArgs e)
            {
                Events = new EventManager().FilteredData(StartDate, StartDate.AddDays(31)).AsEnumerable();

                DataIdField         = "id";
                DataStartField      = "eventstart";
                DataEndField        = "eventend";
                DataRecurrenceField = "recurrence"; // Nie działa!
            }
        public MarketingReport GenerateReport(int days = 90)
        {
            var totalMarketingDays = Enumerable.Range(0, days)
                                     .Select(x => StartDate.AddDays(x))
                                     .Select(day => new MarketingDay(day, Customers.Where(customer => customer.MarketingChoice.SendMarketing(day))))
                                     .ToList();

            return(new MarketingReport(totalMarketingDays));
        }
Ejemplo n.º 28
0
 private DocumentDataVM()
 {
     EndDate   = DateTime.Today;
     StartDate = DateTime.Today;
     StartDate = StartDate.AddDays(-7);
     GetDocuments();
     ShowButton = new OwnCommand(GetDocuments);
     CreateExpenseForNutrition = new OwnCommand(CreateExpenseForNutritionWindow);
 }
Ejemplo n.º 29
0
 public override void ViewWillAppear(bool animated)
 {
     base.ViewWillAppear(animated);
     StartDate    = DateTime.Now.Date;
     EndDate      = StartDate.AddDays(5);
     SelectedDay  = StartDate;
     DayText.Text = $"{SelectedDay: MMM dd}";
     StartLoad();
 }
Ejemplo n.º 30
0
 public static IEnumerable <Category> GetCategories()
 {
     return(Enumerable.Range(1, 5).Select(i => new Category
     {
         Name = $"Category {i}",
         CreatedDate = StartDate.AddDays(RandomGenerator.Next(DateRange)),
         UpdatedDate = StartDate.AddDays(RandomGenerator.Next(DateRange))
     }));
 }