Exemplo n.º 1
0
 public TodoItem(TodoItem item)
 {
     this.id          = item.id;
     this.picSize     = item.picSize;
     this.Title       = item.Title;
     this.Description = item.Description;
     this.ItemDate    = item.ItemDate;
     this.isChecked   = item.isChecked;
     this.imgName     = item.imgName;
     itemDateToString = ItemDate.ToString();
 }
Exemplo n.º 2
0
 public void UpdateItem(ImageSource image, double picSize, string imgName, string title, string description, DateTimeOffset date, bool?isChecked)
 {
     this.image       = (image == null ? new BitmapImage(new Uri("Assets/pic_5.jpg")) : image);
     this.Title       = title;
     this.Description = description;
     this.ItemDate    = date;
     this.picSize     = picSize;
     this.isChecked   = isChecked;
     this.imgName     = imgName;
     itemDateToString = ItemDate.ToString();
 }
Exemplo n.º 3
0
 public TodoItem(string id, ImageSource _image, double picSize, string imgName, string title, string description, DateTimeOffset itemDate, bool?isChecked = false)
 {
     this.id          = id;
     this.image       = ((_image == null) ? new BitmapImage(new Uri("ms-appx:///Assets/pic_6.jpg")) :_image);
     this.picSize     = picSize;
     this.Title       = title;
     this.Description = description;
     this.ItemDate    = itemDate;
     this.isChecked   = isChecked;
     this.imgName     = imgName;
     itemDateToString = ItemDate.ToString();
 }
        private void EditParent(DayWorship worship, DateTime?leapDate)
        {
            //MenologyDay
            ItemDate date = (leapDate != null)
                ? new ItemDate(leapDate.Value.Month, leapDate.Value.Day)
                : new ItemDate();

            var parent = worship.Parent as MenologyDay;

            if (parent.LeapDate.ToString() != date.ToString())
            {
                //значит ищем MenologyDay и задаем его как Parent для worship
                var newParent = DbContext.Set <MenologyDay>()
                                .FirstOrDefault(c => c.LeapDate.Day == date.Day && c.LeapDate.Month == date.Month);

                worship.Parent = newParent;
            }
        }