Пример #1
0
        private void btn_NotStarted_Click(object sender, RoutedEventArgs e)
        {
            SelectedStories.ElementType = GeneralVariable.ElementType.NotStarted.GetHashCode();
            foreach (var item in _StoriesService.GetAll().ToList())
            {
                if (SelectedStories.Value == item.Value)
                {
                    SelectedStories.Position = item.Position;
                }
            }
            _StoriesService.Update(SelectedStories);
            dynamic ff = Application.Current.MainWindow;

            ff.ChangeObject(this.Parent as WrapPanel, this as UCHistoryView);
        }
Пример #2
0
        public void FillAllTable()
        {
            List <Stories> tempList = _StoriesService.GetAll();

            if (tempList == null)
            {
            }
            else
            {
                foreach (Stories item in tempList)
                {
                    if (item.ElementType == GeneralVariable.ElementType.NewStory.GetHashCode())
                    {
                        Label tempLabel = new Label();
                        tempLabel.Content = item.Value;
                        tempLabel.HorizontalContentAlignment = HorizontalAlignment.Center;
                        if (item.Position == 1)
                        {
                            wrp_Stroies.Children.Add(tempLabel);
                        }
                        else if (item.Position == 2)
                        {
                            wrp_Stroies2.Children.Add(tempLabel);
                        }
                        else
                        {
                            wrp_Stroies3.Children.Add(tempLabel);
                        }
                    }
                    else if (item.ElementType == GeneralVariable.ElementType.InProgress.GetHashCode())
                    {
                        UCHistoryView tt = new UCHistoryView(item);
                        if (item.Position == 1)
                        {
                            wrp_InProgress.Children.Add(tt);
                        }
                        else if (item.Position == 2)
                        {
                            wrp_InProgress2.Children.Add(tt);
                        }
                        else
                        {
                            wrp_InProgress3.Children.Add(tt);
                        }
                    }
                    else if (item.ElementType == GeneralVariable.ElementType.NotStarted.GetHashCode())
                    {
                        UCHistoryView tt = new UCHistoryView(item);
                        if (item.Position == 1)
                        {
                            wrp_NotStarted.Children.Add(tt);
                        }
                        else if (item.Position == 2)
                        {
                            wrp_NotStarted2.Children.Add(tt);
                        }
                        else
                        {
                            wrp_NotStarted3.Children.Add(tt);
                        }
                    }
                    else if (item.ElementType == GeneralVariable.ElementType.Done.GetHashCode())
                    {
                        UCHistoryView tt = new UCHistoryView(item);
                        if (item.Position == 1)
                        {
                            wrp_Done.Children.Add(tt);
                        }
                        else if (item.Position == 2)
                        {
                            wrp_Done2.Children.Add(tt);
                        }
                        else
                        {
                            wrp_Done3.Children.Add(tt);
                        }
                    }
                }
            }
        }