예제 #1
0
        public static ComunityDTO ConvertComunityToDTO(Comunity com)
        {
            return(new ComunityDTO
            {
                ComunityCode = com.ComunityCode,
                ComunityName = com.ComunityName,
                CityCode = com.CityCode,

                SectorCode = com.SectorCode,
                CostoCode = com.CostoCode,
                anciano = com.anciano,
                About = com.About,
                RepresentanteCode = com.RepresentanteCode
            });
        }
예제 #2
0
 void comunityCards()
 {
     Comunity = new Comunity();
     Comunity.ChestCards();
 }
        private void TextBlock_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            FrameworkElement tb = sender as FrameworkElement;
            Comunity c = tb.Tag as Comunity;
            List<ItemRelationViewData> list = new List<ItemRelationViewData>();
            if (Mode != MouseMode.複数選択)
            {
                clusterTable.ViewRelation(c, (int)RelationCountSlider.Value, GetRelationIndexType(), out list);
            }
            else
            {
                c.ChangeSelect();
                clusterTable.ViewRelation((int)RelationCountSlider.Value, GetRelationIndexType(), out list);

            }

            if (Mode == MouseMode.削除)
            {
                c.ChangeDelete();
            }

            dragItem = c;
            itemDragging = true;
            mouseOverComunity = c;
            CreateUserAttributeData();
            RelationDataGrid.ItemsSource = list;
        }
 private void TextBlock_MouseEnter(object sender, MouseEventArgs e)
 {
     FrameworkElement tb = sender as FrameworkElement;
     Comunity c = tb.Tag as Comunity;
     mouseOverComunity = c;
     if(Mode == MouseMode.名寄せ)
     {
         var control = sender as Border;
         if (mouseOverComunity != dragItem)
         {
             control.Background = new SolidColorBrush(Colors.Cyan);
         }
     }
 }
        private void modeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (modeComboBox == null) return;
            if (((ComboBoxItem)modeComboBox.SelectedItem).Content.ToString() == "移動")
            {
                mouseMode = MouseMode.移動;
            }
            else if (((ComboBoxItem)modeComboBox.SelectedItem).Content.ToString() == "選択")
            {
                mouseMode = MouseMode.選択;
            }
            else if (((ComboBoxItem)modeComboBox.SelectedItem).Content.ToString() == "削除")
            {
                mouseMode = MouseMode.削除;
            }
            else if (((ComboBoxItem)modeComboBox.SelectedItem).Content.ToString() == "複数選択")
            {
                mouseMode = MouseMode.複数選択;
            }
            else if (((ComboBoxItem)modeComboBox.SelectedItem).Content.ToString() == "名寄せ")
            {
                mouseMode = MouseMode.名寄せ;
            }

            if (clusterTable != null)
            {
                clusterTable.AllUnSeleted();
                clusterTable.ChangeVisibility();
            }
            dragItem = null;
            itemDragging = false;
            mouseOverComunity = null;
        }
        private void ItemsControl_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (mouseMode == MouseMode.移動)
            {
                if (mouseOverComunity != dragItem)
                {
                    if (itemDragging)
                    {

                        var control = sender as Border;
                        control.BorderBrush = new SolidColorBrush(Colors.Black);
                        control.BorderThickness = new Thickness(1);
                        var layer = control.Tag as Layer;

                        clusterTable.MoveComunity(dragItem, mouseOverComunity, layer);
                        itemDragging = false;
                        dragItem = null;
                        clusterTable.SearchHub();
                    }
                }
            }
        }
 private void Border_MouseLeave(object sender, MouseEventArgs e)
 {
     mouseOverComunity = null;
     if (Mode == MouseMode.名寄せ)
     {
         var control = sender as Border;
         control.Background = new SolidColorBrush(Colors.White);
     }
 }