프로젝트

일반

사용자정보

개정판 df2e7646

IDdf2e76460b12fa312af9331496ad5e54d7452128
상위 3d918d31
하위 a70b7d46

김태성이(가) 5년 이상 전에 추가함

DataNavigation 추가
PEMSS 기능 완료

Change-Id: I88374faf732cb66b4f9be60fbd457e2e7259bfb2

차이점 보기:

KCOM/Connected Services/PemssService/PemssService.xsd
69 69
      <xs:element minOccurs="0" name="attachmentType" nillable="true" type="xs:string" />
70 70
      <xs:element minOccurs="0" name="bdId" nillable="true" type="xs:string" />
71 71
      <xs:element minOccurs="0" name="dId" nillable="true" type="xs:string" />
72
      <xs:element minOccurs="0" name="data" nillable="true" type="xs:string" />
72 73
      <xs:element minOccurs="0" name="description1" nillable="true" type="xs:string" />
74
      <xs:element minOccurs="0" name="description2" nillable="true" type="xs:string" />
75
      <xs:element minOccurs="0" name="description3" nillable="true" type="xs:string" />
73 76
      <xs:element minOccurs="0" name="docName" nillable="true" type="xs:string" />
74 77
      <xs:element minOccurs="0" name="equipmentName" nillable="true" type="xs:string" />
75 78
      <xs:element minOccurs="0" name="name" nillable="true" type="xs:string" />
KCOM/Connected Services/PemssService/Reference.cs
467 467
        private string dIdField;
468 468
        
469 469
        [System.Runtime.Serialization.OptionalFieldAttribute()]
470
        private string dataField;
471
        
472
        [System.Runtime.Serialization.OptionalFieldAttribute()]
470 473
        private string description1Field;
471 474
        
472 475
        [System.Runtime.Serialization.OptionalFieldAttribute()]
476
        private string description2Field;
477
        
478
        [System.Runtime.Serialization.OptionalFieldAttribute()]
479
        private string description3Field;
480
        
481
        [System.Runtime.Serialization.OptionalFieldAttribute()]
473 482
        private string docNameField;
474 483
        
475 484
        [System.Runtime.Serialization.OptionalFieldAttribute()]
......
592 601
        }
593 602
        
594 603
        [System.Runtime.Serialization.DataMemberAttribute()]
604
        public string data {
605
            get {
606
                return this.dataField;
607
            }
608
            set {
609
                if ((object.ReferenceEquals(this.dataField, value) != true)) {
610
                    this.dataField = value;
611
                    this.RaisePropertyChanged("data");
612
                }
613
            }
614
        }
615
        
616
        [System.Runtime.Serialization.DataMemberAttribute()]
595 617
        public string description1 {
596 618
            get {
597 619
                return this.description1Field;
......
605 627
        }
606 628
        
607 629
        [System.Runtime.Serialization.DataMemberAttribute()]
630
        public string description2 {
631
            get {
632
                return this.description2Field;
633
            }
634
            set {
635
                if ((object.ReferenceEquals(this.description2Field, value) != true)) {
636
                    this.description2Field = value;
637
                    this.RaisePropertyChanged("description2");
638
                }
639
            }
640
        }
641
        
642
        [System.Runtime.Serialization.DataMemberAttribute()]
643
        public string description3 {
644
            get {
645
                return this.description3Field;
646
            }
647
            set {
648
                if ((object.ReferenceEquals(this.description3Field, value) != true)) {
649
                    this.description3Field = value;
650
                    this.RaisePropertyChanged("description3");
651
                }
652
            }
653
        }
654
        
655
        [System.Runtime.Serialization.DataMemberAttribute()]
608 656
        public string docName {
609 657
            get {
610 658
                return this.docNameField;
KCOM/Controls/DataNavigation.xaml
1
<UserControl x:Name="userControl" x:Class="KCOM.Controls.DataNavigation"
2
              xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
3
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
6
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
7
             xmlns:local="clr-namespace:KCOM.Controls"
8
             mc:Ignorable="d">
9
    <UserControl.Resources>
10
        <Style TargetType="Path" x:Key="PathStyle">
11
            <Setter Property="Width" Value="12"/>
12
            <Setter Property="Height" Value="12"/>
13
            <Setter Property="Fill" Value="#FF0A93E2" />
14
            <Setter Property="Stretch" Value="Fill" />
15
            <Setter Property="HorizontalAlignment" Value="Center" />
16
            <Setter Property="VerticalAlignment" Value="Center" />
17
        </Style>
18
        <Style TargetType="telerik:RadPathButton" x:Key="RadPathButtonStyle">
19
            <Setter Property="Margin" Value="2"/>
20
            <Setter Property="CornerRadius" Value="2"/>
21
            <Setter Property="BorderBrush" Value="#FFD4CFCF"/>
22
            <Setter Property="Width" Value="30"/>
23
            <Setter Property="PathStyle" Value="{StaticResource PathStyle}"/>
24
            <Setter Property="telerik:StyleManager.Theme" Value="Office2016"/>
25
        </Style>
26
    </UserControl.Resources>
27
    <Grid>
28
        <StackPanel Orientation="Horizontal">
29
            <telerik:RadPathButton Style="{StaticResource RadPathButtonStyle}" x:Name="btFirst" PathGeometry="M12,0 L12,12 3.5,6 z M0,0 L2,0 2,12 0,12 z"/>
30
            <telerik:RadPathButton Style="{StaticResource RadPathButtonStyle}" x:Name="btPrevious" PathGeometry="M3.5,6 L12,12 L12,0 L3.5,6 Z"/>
31
            <Grid>
32
                <Grid.ColumnDefinitions>
33
                    <ColumnDefinition/>
34
                    <ColumnDefinition Width="Auto"/>
35
                    <ColumnDefinition/>
36
                </Grid.ColumnDefinitions>
37
                <TextBox Text="{Binding DisplayCurrentIndex, ElementName=userControl,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="60" TextAlignment="Right"  FontWeight="Bold" FontSize="18" VerticalAlignment="Center"/>
38
                <TextBlock Text=" / " Grid.Column="1" TextAlignment="Center" FontWeight="Bold" FontSize="18" VerticalAlignment="Center"/>
39
                <TextBlock Text="{Binding TotalCount, ElementName=userControl}" Width="60" Grid.Column="2" TextAlignment="Left" FontWeight="Bold" FontSize="18" VerticalAlignment="Center"/>
40
            </Grid>
41
            <telerik:RadPathButton Style="{StaticResource RadPathButtonStyle}" x:Name="btNext"  PathGeometry="M0,0 L0,14 L11,7 L0,0 Z" />
42
            <telerik:RadPathButton Style="{StaticResource RadPathButtonStyle}" x:Name="btLast" PathGeometry="M10,0 L12,0 12,12 10,12 z M0,0 L9.4285717,6 0,12 z"/>
43
        </StackPanel>
44
    </Grid>
45
</UserControl>
KCOM/Controls/DataNavigation.xaml.cs
1
using System;
2
using System.Collections;
3
using System.Collections.Generic;
4
using System.Collections.Specialized;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8
using System.Windows;
9
using System.Windows.Controls;
10
using System.Windows.Data;
11
using System.Windows.Documents;
12
using System.Windows.Input;
13
using System.Windows.Media;
14
using System.Windows.Media.Imaging;
15
using System.Windows.Navigation;
16
using System.Windows.Shapes;
17

  
18
namespace KCOM.Controls
19
{
20
    /// <summary>
21
    /// DataNavigation.xaml에 대한 상호 작용 논리
22
    /// </summary>
23
    public partial class DataNavigation : UserControl
24
    {
25
        private INotifyCollectionChanged ItemsNotifyCollection;
26

  
27
        public DataNavigation()
28
        {
29
            InitializeComponent();
30
            btFirst.Click += BtFirst_Click;
31
            btNext.Click += BtNext_Click;
32
            btPrevious.Click += BtPrevious_Click;
33
            btLast.Click += BtLast_Click;
34
        }
35

  
36
        private void BtFirst_Click(object sender, RoutedEventArgs e)
37
        {
38
            CurrentItem = ItemSource.Cast<object>().First();
39
        }
40

  
41
        private void BtLast_Click(object sender, RoutedEventArgs e)
42
        {
43
            CurrentItem = ItemSource.Cast<object>().Last();
44
        }
45

  
46
        private void BtPrevious_Click(object sender, RoutedEventArgs e)
47
        {
48
            if (CurrentIndex > 0)
49
            {
50
                CurrentItem = ItemSource[CurrentIndex - 1];
51
            }
52
        }
53

  
54
        private void BtNext_Click(object sender, RoutedEventArgs e)
55
        {
56
            if (CurrentIndex < TotalCount - 1)
57
            {
58
                CurrentItem = ItemSource.Cast<object>().ToList()[CurrentIndex + 1];
59
            }
60
        }
61

  
62
        public IList ItemSource
63
        {
64
            get { return (IList)GetValue(ItemSourceProperty); }
65
            set { SetValue(ItemSourceProperty, value); }
66
        }
67

  
68
        public static readonly DependencyProperty ItemSourceProperty =
69
               DependencyProperty.RegisterAttached("ItemSource", typeof(IList), typeof(DataNavigation), new PropertyMetadata(new List<object>(), ItemSourcePropertyChanged));
70

  
71
        private static void ItemSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
72
        {
73
            var owner = d as DataNavigation;
74

  
75
            owner.ItemsNotifyCollection = e.NewValue as INotifyCollectionChanged;
76
            
77
            if(owner.ItemsNotifyCollection != null)
78
            {
79
                owner.ItemsNotifyCollection.CollectionChanged += owner.NotifyCollection_CollectionChanged;
80
            }
81

  
82
        }
83

  
84
        private void NotifyCollection_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
85
        {
86
            TotalCount = ItemSource.Cast<object>().Count();
87

  
88
            if (TotalCount > 0)
89
            {
90
                CurrentItem = ItemSource[0];
91
                DisplayCurrentIndex = 1;
92
            }
93
        }
94

  
95
        public int TotalCount
96
        {
97
            get { return (int)GetValue(TotalCountProperty); }
98
            set { SetValue(TotalCountProperty, value); }
99
        }
100

  
101
        public static readonly DependencyProperty TotalCountProperty =
102
               DependencyProperty.RegisterAttached("TotalCount", typeof(int), typeof(DataNavigation));
103

  
104
        public int CurrentIndex
105
        {
106
            get { return (int)GetValue(CurrentIndexProperty); }
107
            set { SetValue(CurrentIndexProperty, value); }
108
        }
109
        
110
        public static readonly DependencyProperty CurrentIndexProperty =
111
               DependencyProperty.RegisterAttached("CurrentIndex", typeof(int), typeof(DataNavigation),new PropertyMetadata(0, CurrentIndexPropertyChanged));
112

  
113
        private static void CurrentIndexPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
114
        {
115
            var owner = d as DataNavigation;
116
            owner.CurrentItem = owner.ItemSource[(int)e.NewValue];
117
            owner.DisplayCurrentIndex = (int)e.NewValue + 1;
118
        }
119

  
120
        /// <summary>
121
        ///Index 입력 테스트박스와 연동
122
        /// </summary>
123
        public int DisplayCurrentIndex
124
        {
125
            get { return (int)GetValue(DisplayCurrentIndexProperty); }
126
            set { SetValue(DisplayCurrentIndexProperty, value); }
127
        }
128

  
129
        public static readonly DependencyProperty DisplayCurrentIndexProperty =
130
               DependencyProperty.RegisterAttached("DisplayCurrentIndex", typeof(int), typeof(DataNavigation), new PropertyMetadata(0, DisplayCurrentIndexPropertyChanged));
131

  
132
        private static void DisplayCurrentIndexPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
133
        {
134
            var owner = d as DataNavigation;
135

  
136
            var newValue = (int)e.NewValue;
137

  
138
            if (newValue > 0 || newValue < owner.TotalCount)
139
            {
140
                owner.CurrentIndex = (int)e.NewValue - 1;
141
            }
142
        }
143

  
144
        public object CurrentItem
145
        {
146
            get { return (object)GetValue(CurrentItemProperty); }
147
            set { SetValue(CurrentItemProperty, value); }
148
        }
149

  
150
        public static readonly DependencyProperty CurrentItemProperty =
151
               DependencyProperty.RegisterAttached("CurrentItem", typeof(object), typeof(DataNavigation),new PropertyMetadata(null, CurrentItemPropertyChanged));
152

  
153
        private static void CurrentItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
154
        {
155
            var owner = d as DataNavigation;
156
            owner.CurrentIndex = owner.ItemSource.IndexOf(e.NewValue);
157
        }
158
    }
159
}
KCOM/Converters/BiddersToKeyAndValueConvert.cs
1
using Markus.Mvvm.ToolKit;
2
using System;
3
using System.Collections.Generic;
4
using System.Globalization;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8
using System.Windows.Data;
9

  
10
namespace KCOM.Converters
11
{
12
    public  class BiddersToKeyAndValueConvert : IValueConverter
13
    {
14
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
15
        {
16
            List<BiddersKeyAndValue> result = null;
17

  
18
            if(value is PemssService.Bidders)
19
            {
20
                var bidders = value as PemssService.Bidders;
21

  
22
                result = new List<BiddersKeyAndValue>
23
                {
24
                    new BiddersKeyAndValue(0,"Equipment Name",bidders.equipmentName),
25
                    new BiddersKeyAndValue(1,"No",bidders.no),
26
                    new BiddersKeyAndValue(2,"Description 1",bidders.description1),
27
                    new BiddersKeyAndValue(3,"Description 2",bidders.description2),
28
                    new BiddersKeyAndValue(4,"Description 3",bidders.description3),
29
                    new BiddersKeyAndValue(4,"Unit",bidders.unit),
30
                    new BiddersKeyAndValue(4,"Data",bidders.data)
31
                };
32
            }
33

  
34
            return result;
35
        }
36

  
37
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
38
        {
39
            throw new NotImplementedException();
40
        }
41
    }
42

  
43
    public class BiddersKeyAndValue : NotifyExpectation
44
    {
45
        public BiddersKeyAndValue(int index,string key,string value)
46
        {
47
            Index = index;
48
            Key = key;
49
            Value = value;
50
        }
51

  
52
        private int _index;
53

  
54
        public int Index
55
        {
56
            get { return _index; }
57
            set
58
            {
59
                if (_index != value)
60
                {
61
                    _index = value;
62
                    OnPropertyChanged(() => Index);
63
                }
64
            }
65
        }
66

  
67
        private string _key;
68

  
69
        public string Key
70
        {
71
            get { return _key; }
72
            set
73
            {
74
                if (_key != value)
75
                {
76
                    _key = value;
77
                    OnPropertyChanged(() => Key);
78
                }
79
            }
80
        }
81

  
82
        private string _value;
83

  
84
        public string Value
85
        {
86
            get { return _value; }
87
            set
88
            {
89
                if (_value != value)
90
                {
91
                    _value = value;
92
                    OnPropertyChanged(() => Value);
93
                }
94
            }
95
        }
96
    }
97
}
KCOM/Converters/GridSelectMultiValueConverter.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Globalization;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7
using System.Windows.Data;
8

  
9
namespace KCOM.Converters
10
{
11
   public  class GridSelectMultiValueConverter : IMultiValueConverter
12
    {
13

  
14
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
15
        {
16
            GridSelectMultiValues result = null;
17

  
18
            if (values.Count() == 2)
19
            {
20
                if (values[0] is Telerik.Windows.Controls.RadWindow && values[1] != null)
21
                {
22
                    result = new GridSelectMultiValues
23
                    {
24
                        RadWindow = values[0] as Telerik.Windows.Controls.RadWindow,
25
                        SelectItem = values[1]
26
                    };
27
                }
28
            }
29

  
30
            return result;
31
        }
32

  
33

  
34
        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
35
        {
36
            throw new NotImplementedException();
37
        }
38
    }
39

  
40
    public class GridSelectMultiValues
41
    {
42
        public Telerik.Windows.Controls.RadWindow RadWindow { get; set; }
43
        public object SelectItem { get; set; }
44
    }
45
}
KCOM/Converters/IListToIListCountConverter.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Globalization;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7
using System.Windows.Data;
8

  
9
namespace KCOM.Converters
10
{
11
   public  class IListToIListCountConverter : IValueConverter
12
    {
13
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14
        {
15
            var list = value as IEnumerable<object>;
16

  
17
            if (list != null)
18
            {
19
                return list.Count();
20
            }
21
            else
22
            {
23
                return 0;
24
                //throw new Exception("IListToIListCountConverter Error. Value is Not IList Type.");
25
            }
26
        }
27

  
28
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
29
        {
30
            throw new NotImplementedException();
31
        }
32
    }
33
}
KCOM/KCOM.csproj
242 242
      <HintPath>..\lib\RCWPF\2019.3.917.45\Telerik.Windows.Data.dll</HintPath>
243 243
      <Private>True</Private>
244 244
    </Reference>
245
    <Reference Include="Telerik.Windows.Themes.Fluent">
246
      <HintPath>..\lib\RCWPF\2019.3.917.45\Telerik.Windows.Themes.Fluent.dll</HintPath>
247
    </Reference>
245 248
    <Reference Include="ToggleSwitch, Version=1.1.2.0, Culture=neutral, PublicKeyToken=8637099990568f75, processorArchitecture=MSIL">
246 249
      <HintPath>..\packages\ToggleSwitch.1.1.2\lib\net40-client\ToggleSwitch.dll</HintPath>
247 250
    </Reference>
......
297 300
    <Compile Include="Controls\ExtendTextBox.xaml.cs">
298 301
      <DependentUpon>ExtendTextBox.xaml</DependentUpon>
299 302
    </Compile>
303
    <Compile Include="Converters\GridSelectMultiValueConverter.cs" />
304
    <Compile Include="Converters\BiddersToKeyAndValueConvert.cs" />
300 305
    <Compile Include="Converters\IListToIListCountConverter.cs" />
301 306
    <Compile Include="Converters\StringMultiLineConvert.cs" />
302 307
    <Compile Include="Extensions\CollectionExtenstions.cs" />
303 308
    <Compile Include="Extensions\MatrixHelper.cs" />
304 309
    <Compile Include="Extensions\VectorExtentions.cs" />
305 310
    <Compile Include="Assets\HeaderTemplateSelector.cs" />
311
    <Compile Include="ViewModel\BiddersSearchViewModel.cs" />
306 312
    <Compile Include="ViewModel\BiddersViewModel.cs" />
313
    <Compile Include="ViewModel\RequirementSearchViewModel.cs" />
307 314
    <Compile Include="Views\AddRequirement.xaml.cs">
308 315
      <DependentUpon>AddRequirement.xaml</DependentUpon>
309 316
    </Compile>
310 317
    <Compile Include="Views\BiddersView.xaml.cs">
311 318
      <DependentUpon>BiddersView.xaml</DependentUpon>
312 319
    </Compile>
320
    <Compile Include="Views\BiddersSearchView.xaml.cs">
321
      <DependentUpon>BiddersSearchView.xaml</DependentUpon>
322
    </Compile>
323
    <Compile Include="Views\RequirementSearchView.xaml.cs">
324
      <DependentUpon>RequirementSearchView.xaml</DependentUpon>
325
    </Compile>
313 326
    <Compile Include="Views\RequirementView.xaml.cs">
314 327
      <DependentUpon>RequirementView.xaml</DependentUpon>
315 328
    </Compile>
......
415 428
      <Generator>MSBuild:Compile</Generator>
416 429
      <SubType>Designer</SubType>
417 430
    </Page>
431
    <Page Include="Views\BiddersSearchView.xaml">
432
      <Generator>MSBuild:Compile</Generator>
433
      <SubType>Designer</SubType>
434
    </Page>
435
    <Page Include="Views\RequirementSearchView.xaml">
436
      <Generator>MSBuild:Compile</Generator>
437
      <SubType>Designer</SubType>
438
    </Page>
418 439
    <Page Include="Views\RequirementView.xaml">
419 440
      <SubType>Designer</SubType>
420 441
      <Generator>MSBuild:Compile</Generator>
KCOM/ViewModel/BiddersSearchViewModel.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Collections.ObjectModel;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7
using System.Windows;
8
using KCOM.Common;
9
using KCOM.Converters;
10
using KCOM.PemssService;
11
using Markus.Mvvm.ToolKit;
12
using Telerik.Windows.Controls;
13

  
14
namespace KCOM.ViewModel
15
{
16
    public class BiddersSearchViewModel : Markus.Mvvm.ToolKit.ViewModelBase
17
    {
18
        PemssService.PemssServiceClient pemssServiceClient;
19

  
20
        private System.Collections.ObjectModel.ObservableCollection<Bidders> biddersList;
21

  
22
        public ObservableCollection<Bidders> BiddersList
23
        {
24
            get
25
            {
26
                if (biddersList == null)
27
                {
28
                    biddersList = new ObservableCollection<Bidders>();
29
                }
30

  
31
                return biddersList;
32
            }
33
            set
34
            {
35
                if (biddersList != value)
36
                {
37
                    biddersList = value;
38
                    OnPropertyChanged(() => BiddersList);
39
                }
40
            }
41
        }
42

  
43
        private Bidders selectBidders;
44

  
45
        public Bidders SelectBidders
46
        {
47
            get
48
            {
49
                return selectBidders;
50
            }
51
            set
52
            {
53
                if (selectBidders != value)
54
                {
55
                    selectBidders = value;
56
                    OnPropertyChanged(() => SelectBidders);
57
                }
58
            }
59
        }
60

  
61
        private VpCommant selectVPComment;
62

  
63
        public VpCommant SelectVPComment
64
        {
65
            get
66
            {
67
                return selectVPComment;
68
            }
69
            set
70
            {
71
                if (selectVPComment != value)
72
                {
73
                    selectVPComment = value;
74
                    OnPropertyChanged(() => SelectVPComment);
75
                }
76
            }
77
        }
78

  
79
        #region UI에 대한 이벤트
80

  
81
        public RelayCommand<GridSelectMultiValues> SelectedBiddersCommand
82
                    => new RelayCommand<GridSelectMultiValues>(x => OnSelectedBiddersCommand(x));
83

  
84
        #endregion
85

  
86
        #region 초기화 및 종료 이벤트
87

  
88
        public BiddersSearchViewModel()
89
        {
90
            if (App.IsDesignMode)
91
                return;
92

  
93
            try
94
            {
95
                if (pemssServiceClient == null)
96
                {
97
                    pemssServiceClient = new PemssServiceClient(App._binding, App._PemssEndPoint);
98
                }
99

  
100
                OnGetBiddersDataAsync().ConfigureAwait(false);
101
            }
102
            catch (Exception ex)
103
            {
104
                System.Diagnostics.Debug.WriteLine(ex);
105
            }
106
        }
107

  
108
        public override void Loaded()
109
        {
110
            base.Loaded();
111
        }
112

  
113
        public override void Closed()
114
        {
115
            base.Closed();
116
        }
117

  
118
        #endregion
119

  
120
        #region Command
121
        private async Task OnGetBiddersDataAsync()
122
        {
123
            var result = await pemssServiceClient.GetBidderstListAsync(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID);
124

  
125
            BiddersList.Clear();
126

  
127
            result.ForEach(newItem =>
128
            {
129
                newItem.IsExpanded = true;
130
                newItem.IsExpandable = true;
131

  
132
                BiddersList.Add(newItem);
133
            });
134
        }
135

  
136
        private void OnSelectedBiddersCommand(GridSelectMultiValues values)
137
        {
138
            var bidders = values.SelectItem as Bidders;
139
            values.RadWindow.PromptResult = bidders.bdId;
140
            values.RadWindow.DialogResult = true;
141
            values.RadWindow.Close();
142
        }
143

  
144

  
145
        #endregion Command
146

  
147
    }
148
}
KCOM/ViewModel/BiddersViewModel.cs
85 85

  
86 86
        public RelayCommand SelectedVPCommentCommand => new RelayCommand(x => OnSelectedVPCommentCommand(x));
87 87

  
88
        public RelayCommand BiddersSearchCommand => new RelayCommand(x => OnBiddersSearchCommand(x));
89

  
90

  
88 91
        #endregion
89 92

  
90 93
        #region 초기화 및 종료 이벤트
......
179 182
            if (SelectBidders != null && SelectionSet.Instance.SelectedItems?.Count() > 0)
180 183
            {
181 184
                Views.AddRequirement addRequirement = new Views.AddRequirement();
182
                addRequirement.Header = "정합성 코멘트 연결 추가";
185
                addRequirement.Header = "Bidders 코멘트 연결 추가";
183 186
                addRequirement.Width = 600;
184 187
                addRequirement.Header = 150;
185 188

  
......
262 265
                //}
263 266
            }
264 267
        }
268
        private void OnBiddersSearchCommand(object obj)
269
        {
270
            var searchView = new Views.BiddersSearchView();
271
            RadWindow window = new RadWindow();
272
            window.Header = "Bidders 목록";
273
            window.Content = searchView;
274
            window.Width = 1268;
275
            window.Height = 700;
276

  
277
            window.Closed += (snd, evt) =>
278
            {
279
                if (evt.DialogResult == true)
280
                {
281
                    if (!string.IsNullOrEmpty(evt.PromptResult))
282
                    {
283
                        SelectBidders = BiddersList.Where(x => x.bdId == evt.PromptResult).First();
284
                    }
285
                }
286
            };
287

  
288
            window.ShowDialogCenter();
289
        }
265 290

  
266 291
        private void GotoMarkup(IEnumerable<string> CommentIdList)
267 292
        {
KCOM/ViewModel/RequirementSearchViewModel.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Collections.ObjectModel;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7
using System.Windows;
8
using KCOM.Common;
9
using KCOM.Converters;
10
using KCOM.PemssService;
11
using Markus.Mvvm.ToolKit;
12
using Telerik.Windows.Controls;
13

  
14
namespace KCOM.ViewModel
15
{
16
    public class RequirementSearchViewModel : Markus.Mvvm.ToolKit.ViewModelBase
17
    {
18
        PemssService.PemssServiceClient pemssServiceClient;
19

  
20
        private System.Collections.ObjectModel.ObservableCollection<Requirement> requirementList;
21

  
22
        public ObservableCollection<Requirement> RequirementList
23
        {
24
            get
25
            {
26
                if (requirementList == null)
27
                {
28
                    requirementList = new ObservableCollection<Requirement>();
29
                }
30

  
31
                return requirementList;
32
            }
33
            set
34
            {
35
                if (requirementList != value)
36
                {
37
                    requirementList = value;
38
                    OnPropertyChanged(() => RequirementList);
39
                }
40
            }
41
        }
42

  
43
        #region UI에 대한 이벤트
44

  
45
        public RelayCommand<GridSelectMultiValues> SelectedRequirmentCommand
46
                    => new RelayCommand<GridSelectMultiValues>(x => OnSelectedRequirmentCommand(x));
47

  
48
        #endregion
49

  
50
        #region 초기화 및 종료 이벤트
51

  
52
        public RequirementSearchViewModel()
53
        {
54
            if (App.IsDesignMode)
55
                return;
56

  
57
            try
58
            {
59
                if (pemssServiceClient == null)
60
                {
61
                    pemssServiceClient = new PemssServiceClient(App._binding, App._PemssEndPoint);
62
                }
63

  
64
                OnGetRequirementDataAsync().ConfigureAwait(false);
65
            }
66
            catch (Exception ex)
67
            {
68

  
69
                System.Diagnostics.Debug.WriteLine(ex);
70
            }
71
        }
72

  
73
        public override void Loaded()
74
        {
75
            base.Loaded();
76
        }
77

  
78
        public override void Closed()
79
        {
80
            base.Closed();
81
        }
82

  
83
        #endregion
84

  
85
        #region Command
86
        private async Task OnGetRequirementDataAsync(bool IsInit = true)
87
        {
88
            var result = await pemssServiceClient.GetrequirementListAsync(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID);
89
            requirementList.Clear();
90

  
91
            result.ForEach(newItem =>
92
            {
93
                newItem.IsExpanded = true;
94
                newItem.IsExpandable = true;
95

  
96
                if (IsInit)
97
                {
98
                    RequirementList.Add(newItem);
99
                }
100
                else
101
                {
102
                    RequirementList.UpdateWhere(changeitem => CollectionExtensions.ChangeValues(changeitem, newItem), x => x.mdId == newItem.mdId);
103
                }
104
            });
105
        }
106

  
107
        private void OnSelectedRequirmentCommand(GridSelectMultiValues values)
108
        {
109
            var selectRequirement = values.SelectItem as Requirement;
110
            values.RadWindow.PromptResult = selectRequirement.mdId;
111
            values.RadWindow.DialogResult = true;
112
            values.RadWindow.Close();
113
        }
114

  
115
        #endregion Command
116

  
117
    }
118
}
KCOM/ViewModel/RequirementViewModel.cs
85 85

  
86 86
        public RelayCommand SelectedVPCommentCommand => new RelayCommand(x => OnSelectedVPCommentCommand(x));
87 87

  
88
        public RelayCommand RequirementSearchCommand => new RelayCommand(x => OnRequirementSearchCommand(x));
89

  
90
       
91

  
88 92
        #endregion
89 93

  
90 94
        #region 초기화 및 종료 이벤트
......
264 268
            }
265 269
        }
266 270

  
271
        private void OnRequirementSearchCommand(object obj)
272
        {
273
            var searchView =  new Views.RequirementSearchView();
274
            RadWindow window = new RadWindow();
275
            window.Header = "정합성 목록";
276
            window.Content = searchView;
277
            window.Width = 1268;
278
            window.Height = 700;
279

  
280
            window.Closed += (snd, evt) =>
281
            {
282
                if(evt.DialogResult == true)
283
                {
284
                    if(!string.IsNullOrEmpty( evt.PromptResult))
285
                    {
286
                        SelectRequirement = RequirementList.Where(x => x.mdId == evt.PromptResult).First();
287
                    }
288
                }
289
            };
290

  
291
            window.ShowDialogCenter();
292

  
293
        }
294

  
267 295
        private void GotoMarkup(IEnumerable<string> CommentIdList)
268 296
        {
269 297
             var selectComments = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(x=> CommentIdList.Count(y=> y == x.CommentID) > 0).ToList();
KCOM/Views/BiddersSearchView.xaml
1
<UserControl x:Name="userControl" x:Class="KCOM.Views.BiddersSearchView"
2
          xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
3
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7
        xmlns:local="clr-namespace:KCOM.Controls" FontSize="12"
8
        xmlns:behavior="clr-namespace:KCOM.Behaviors"
9
        xmlns:viewmodel="clr-namespace:KCOM.ViewModel"
10
        xmlns:controls ="clr-namespace:KCOM.Controls"
11
        xmlns:convert="clr-namespace:KCOM.Converters"
12
        xmlns:Behaviors="clr-namespace:KCOM.Behaviors"
13
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
14
        mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="1000" DataContext="{DynamicResource ViewModel}">
15
    <UserControl.Resources>
16
        <convert:GridSelectMultiValueConverter x:Key="GridSelectMultiValueConvert"/>
17
        <convert:IListToIListCountConverter x:Key="IListToIListCountConverter"/>
18
        <viewmodel:BiddersSearchViewModel x:Key="ViewModel"/>
19
        <convert:StringMultiLineConvert x:Key="StringMultiLineConvert"/>
20
    </UserControl.Resources>
21
    <i:Interaction.Triggers>
22
        <i:EventTrigger  EventName="Loaded">
23
            <i:InvokeCommandAction Command="{Binding LoadedCommand}"/>
24
        </i:EventTrigger>
25
        <i:EventTrigger  EventName="Unloaded">
26
            <i:InvokeCommandAction Command="{Binding ClosingCommand}"/>
27
        </i:EventTrigger>
28
    </i:Interaction.Triggers>
29
    <Grid Background="White">
30
            <Grid.RowDefinitions>
31
                <RowDefinition Height="Auto"/>
32
        </Grid.RowDefinitions>
33
        <Grid.Resources>
34
            <Style TargetType="telerik:GridViewCell" x:Key="CellTopStretchStyle">
35
                <Setter Property="VerticalContentAlignment" Value="Top"/>
36
                <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
37
                <Setter Property="Margin" Value="0"/>
38
                <Setter Property="Padding" Value="0"/>
39
            </Style>
40
            <Style TargetType="telerik:GridViewCell" x:Key="CellCenterStyle">
41
                <Setter Property="VerticalContentAlignment" Value="Center"/>
42
                <Setter Property="HorizontalContentAlignment" Value="Center"/>
43
                <Setter Property="Margin" Value="0"/>
44
                <Setter Property="Padding" Value="0"/>
45
            </Style>
46
        </Grid.Resources>
47
        <telerik:RadGridView
48
                             AutoGenerateColumns="False"  telerik:StyleManager.Theme="Office2016"
49
                             ItemsSource="{Binding BiddersList}"
50
                             ShowGroupPanel="False" 
51
                             GroupRenderMode="Flat" CanUserFreezeColumns="False" ShowColumnFooters="False"
52
                             CanUserReorderColumns="False"
53
                             CanUserSelect="False" Height="{Binding ActualHeight, ElementName=userControl, Mode=OneWay}"
54
                             x:Name="Gridview" SelectionMode="Single" SelectionUnit="Cell" VerticalAlignment="Top"
55
                            RowIndicatorVisibility="Collapsed" ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
56
                ScrollViewer.VerticalScrollBarVisibility="Visible"
57
                            GridLinesVisibility="Both" HorizontalGridLinesBrush="Orange">
58
            <i:Interaction.Behaviors>
59
                <Behaviors:ColumnFilterBehavior DefaultOperator="Contains"/>
60
            </i:Interaction.Behaviors>
61
            <telerik:RadGridView.Columns>
62
                <telerik:GridViewColumn  IsReadOnly="True" IsFilterable="True" Header="선택" Width="42" HeaderTextAlignment="Center">
63
                    <telerik:GridViewColumn.CellTemplate>
64
                        <DataTemplate>
65
                            <telerik:RadToggleButton Content="선택" 
66
                                                     Command="{Binding SelectedBiddersCommand, Source={StaticResource ViewModel}}">
67
                                <telerik:RadToggleButton.CommandParameter>
68
                                    <MultiBinding Converter="{StaticResource GridSelectMultiValueConvert}">
69
                                        <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=telerik:RadWindow}"/>
70
                                        <Binding/> <!--Row 전체가 바인딩됨-->
71
                                    </MultiBinding>
72
                                </telerik:RadToggleButton.CommandParameter>
73
                            </telerik:RadToggleButton>
74
                        </DataTemplate>
75
                    </telerik:GridViewColumn.CellTemplate>
76
                </telerik:GridViewColumn>
77
                <telerik:GridViewDataColumn Header="Equipment Name" Width="*" IsReadOnly="True" IsFilterable="True"
78
                                        TextAlignment="Left"  HeaderTextAlignment="Center"
79
                                        DataMemberBinding="{Binding equipmentName}"/>
80
                <telerik:GridViewDataColumn Header="No" Width="Auto" IsReadOnly="True" IsFilterable="True"
81
                                        TextAlignment="Left" HeaderTextAlignment="Center"
82
                                        DataMemberBinding="{Binding no}"/>
83
                <telerik:GridViewDataColumn Header="Description 1" Width="Auto" IsReadOnly="True" IsFilterable="True"
84
                                        TextAlignment="Left" HeaderTextAlignment="Center"
85
                                        DataMemberBinding="{Binding description1}"/>
86
                <telerik:GridViewDataColumn Header="Description 2" Width="Auto" IsReadOnly="True" IsFilterable="True"
87
                                        TextAlignment="Left"  HeaderTextAlignment="Center"
88
                                        DataMemberBinding="{Binding description2}"/>
89
                <telerik:GridViewDataColumn Header="Description 3" Width="Auto" IsReadOnly="True" IsFilterable="True"
90
                                        TextAlignment="Left" HeaderTextAlignment="Center"
91
                                        DataMemberBinding="{Binding description3}"/>
92
                <telerik:GridViewDataColumn Header="Unit" Width="Auto" IsReadOnly="True" IsFilterable="True"
93
                                        TextAlignment="Left" HeaderTextAlignment="Center"
94
                                        DataMemberBinding="{Binding unit}"/>
95
                <telerik:GridViewDataColumn Header="Data" Width="Auto" IsReadOnly="True" IsFilterable="True"
96
                                        TextAlignment="Left" HeaderTextAlignment="Center"
97
                                        DataMemberBinding="{Binding data}"/>
98
                <telerik:GridViewDataColumn  HeaderTextAlignment="Center" CellStyle="{DynamicResource CellTopStretchStyle}"
99
                                             Header="VP Comment" Width="562" DataMemberBinding="{Binding VpComments}" IsReadOnly="True">
100
                    <telerik:GridViewDataColumn.CellTemplate>
101
                        <DataTemplate>
102
                            <Grid>
103
                                <Grid.RowDefinitions>
104
                                    <RowDefinition Height="Auto"/>
105
                                    <RowDefinition/>
106
                                </Grid.RowDefinitions>
107
                                <telerik:RadGridView
108
                             AutoGenerateColumns="False"  telerik:StyleManager.Theme="Fluent"
109
                             ItemsSource="{Binding VpComments}"
110
                             ShowGroupPanel="False" GridLinesVisibility="Vertical"
111
                             GroupRenderMode="Flat" CanUserFreezeColumns="False"
112
                             CanUserReorderColumns="False" VerticalAlignment="Top" HorizontalAlignment="Left"
113
                             CanUserSelect="False" SelectionMode="Single" SelectionUnit="Cell"
114
                            RowIndicatorVisibility="Collapsed" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
115
                            HorizontalGridLinesBrush="Orange">
116
                                <telerik:RadGridView.Columns>
117
                                        <telerik:GridViewDataColumn IsFilterable="False" DataMemberBinding="{Binding createdByName}" HeaderTextAlignment="Center"  Width="120" IsReadOnly="True"
118
													Header="Create User" />
119
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding comment}" HeaderTextAlignment="Center" Width="*" TextAlignment="Left" IsReadOnly="True" TextTrimming="CharacterEllipsis" IsFilterable="False" 
120
													Header="Comment" />
121
                                        <telerik:GridViewDataColumn IsFilterable="False" TextAlignment="Center" DataMemberBinding="{Binding condition,Mode=TwoWay}" HeaderTextAlignment="Center" Header="Condition" Width="90"  IsReadOnly="True">
122
                                            <telerik:GridViewDataColumn.CellStyle>
123
                                                <Style TargetType="telerik:GridViewCell">
124
                                                    <Setter Property="VerticalContentAlignment" Value="Center"/>
125
                                                    <Setter Property="HorizontalContentAlignment" Value="Center"/>
126
                                                    <Setter Property="Margin" Value="0"/>
127
                                                    <Setter Property="Padding" Value="0"/>
128
                                                </Style>
129
                                            </telerik:GridViewDataColumn.CellStyle>
130
                                        </telerik:GridViewDataColumn>
131
                                </telerik:RadGridView.Columns>
132
                            </telerik:RadGridView>
133
                                <Border Grid.Row="1" Background="Gray"/>
134
                            </Grid>
135
                        </DataTemplate>
136
                    </telerik:GridViewDataColumn.CellTemplate>
137
                </telerik:GridViewDataColumn>
138
            </telerik:RadGridView.Columns>
139
        </telerik:RadGridView>
140
    </Grid>
141
</UserControl>
KCOM/Views/BiddersSearchView.xaml.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
using System.Windows;
7
using System.Windows.Controls;
8
using System.Windows.Data;
9
using System.Windows.Documents;
10
using System.Windows.Input;
11
using System.Windows.Media;
12
using System.Windows.Media.Imaging;
13
using System.Windows.Shapes;
14

  
15
namespace KCOM.Views
16
{
17
    /// <summary>
18
    /// AdjustList.xaml에 대한 상호 작용 논리
19
    /// </summary>
20
    public partial class BiddersSearchView : UserControl
21
    {
22
        public BiddersSearchView()
23
        {
24
            InitializeComponent();
25
        }
26
    }
27
}
KCOM/Views/BiddersView.xaml
12 12
        xmlns:Behaviors="clr-namespace:KCOM.Behaviors"
13 13
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
14 14
             xmlns:controls1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Data"
15
             mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="350" DataContext="{DynamicResource ViewModel}">
15
             mc:Ignorable="d" d:DesignHeight="250"  DataContext="{DynamicResource ViewModel}">
16 16
    <UserControl.Resources>
17
        <convert:BiddersToKeyAndValueConvert x:Key="BiddersToKeyAndValueConvert"/>
17 18
        <viewmodel:BiddersViewModel x:Key="ViewModel"/>
18 19
        <convert:StringMultiLineConvert x:Key="StringMultiLineConvert"/>
19 20
    </UserControl.Resources>
......
25 26
            <i:InvokeCommandAction Command="{Binding ClosingCommand}"/>
26 27
        </i:EventTrigger>
27 28
    </i:Interaction.Triggers>
28
        <Grid x:Name="grid" Margin="2">
29
    <Grid>
29 30
        <Grid.ColumnDefinitions>
30
            <ColumnDefinition Width="*"/>
31
            <ColumnDefinition Width="5.7*"/>
32
            <ColumnDefinition Width="Auto"/>
33
            <ColumnDefinition Width="Auto"/>
31 34
        </Grid.ColumnDefinitions>
32
        <Grid.RowDefinitions>
33
            <RowDefinition Height="Auto"/>
34
            <RowDefinition Height="Auto"/>
35
            <RowDefinition/>
36
        </Grid.RowDefinitions>
37
        <Grid HorizontalAlignment="Right" Visibility="Collapsed">
35
        <Grid Background="White">
36
            <Grid.RowDefinitions>
37
                <RowDefinition Height="Auto"/>
38
                <RowDefinition/>
39
            </Grid.RowDefinitions>
40
            <!--<telerik:RadGridView telerik:StyleManager.Theme="Office2016" AutoGenerateColumns="False" ItemsSource="{Binding RequirementList}" ShowGroupPanel="False"
41
                              CanUserFreezeColumns="False" x:Name="Gridview" SelectedItem="{Binding SelectRequirement}"
42
                              RowIndicatorVisibility="Collapsed" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
43
                              IsExpandedBinding="{Binding IsExpanded,Mode=TwoWay}" IsExpandableBinding="{Binding IsExpandable, Mode=TwoWay}"
44
                             GridLinesVisibility="Horizontal" HorizontalGridLinesBrush="Orange">
45
                    <i:Interaction.Behaviors>
46
                        <Behaviors:ColumnFilterBehavior DefaultOperator="Contains"/>
47
                    </i:Interaction.Behaviors>
48
                    <telerik:RadGridView.Columns>
49
                        <telerik:GridViewDataColumn Header="Commant" IsReadOnly="True" IsFilterable="True"
50
                                            TextAlignment="Left" TextWrapping="WrapWithOverflow"
51
                                            DataMemberBinding="{Binding mdText,Converter={StaticResource StringMultiLineConvert}}">
52
                        </telerik:GridViewDataColumn>
53
                    </telerik:RadGridView.Columns>
54
                </telerik:RadGridView>-->
55
            <Grid>
56
                <Grid.ColumnDefinitions>
57
                    <ColumnDefinition Width="2*"/>
58
                    <ColumnDefinition Width="10"/>
59
                    <ColumnDefinition Width="6*"/>
60
                    <ColumnDefinition Width="10"/>
61
                    <ColumnDefinition Width="2*"/>
62
                </Grid.ColumnDefinitions>
63
                <Grid.RowDefinitions>
64
                    <RowDefinition Height="Auto"/>
65
                    <RowDefinition Height="Auto"/>
66
                </Grid.RowDefinitions>
67
                <controls:DataNavigation HorizontalAlignment="Center" Grid.Column="2"
68
                                         ItemSource="{Binding BiddersList,Mode=TwoWay}"
69
                                         CurrentItem="{Binding SelectBidders,Mode=TwoWay}"/>
70
                <telerik:RadToggleButton Content="전체 보기" Width="60" Grid.Column="4" Margin="5"
71
                                         Command="{Binding BiddersSearchCommand, Source={StaticResource ViewModel}}"/>
72
                <Line Grid.Row="1" Grid.ColumnSpan="5" Fill="#FFB9B9B9" Margin="5,0" X1="0" X2="1" Y1="1" Stretch="Fill"  Y2="1" Stroke="#FFB0B0B0"/>
73
            </Grid>
74
            <telerik:RadGridView Margin="3,3,3,3" AutoGenerateColumns="False"  telerik:StyleManager.Theme="Fluent"
75
                             GridLinesVisibility="Both"  ShowColumnHeaders="False"
76
                             GroupRenderMode="Flat" CanUserFreezeColumns="False"
77
                             CanUserReorderColumns="False" VerticalAlignment="Top" HorizontalAlignment="Left"
78
                             CanUserSelect="False" SelectionMode="Single" SelectionUnit="Cell"
79
                            RowIndicatorVisibility="Collapsed" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
80
                            ItemsSource="{Binding SelectBidders, Converter={StaticResource BiddersToKeyAndValueConvert}}"
81
                            ShowGroupPanel="False" Grid.Row="1">
82
                <telerik:RadGridView.Columns>
83
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Key}" Background="#FFF1F1F1" HeaderTextAlignment="Center"  Width="Auto" IsFilterable="False" IsReadOnly="True"
84
													Header="Key" >
85
                        <telerik:GridViewDataColumn.CellStyle>
86
                            <Style TargetType="telerik:GridViewCell">
87
                                <Setter Property="Padding" Value="30,0"/>
88
                            </Style>
89
                        </telerik:GridViewDataColumn.CellStyle>
90
                    </telerik:GridViewDataColumn>
91
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Value}" HeaderTextAlignment="Center"  Width="*" IsFilterable="False" IsReadOnly="True"
92
													Header="Value" >
93
                        <telerik:GridViewDataColumn.CellStyle>
94
                            <Style TargetType="telerik:GridViewCell">
95
                                <Setter Property="Padding" Value="5,0"/>
96
                            </Style>
97
                        </telerik:GridViewDataColumn.CellStyle>
98
                    </telerik:GridViewDataColumn>
99
                </telerik:RadGridView.Columns>
100

  
101
            </telerik:RadGridView>
102
        </Grid>
103
        <Grid Grid.Column="1">
104
            <Grid.RowDefinitions>
105
                <RowDefinition Height="Auto"/>
106
                <RowDefinition  Height="*"/>
107
            </Grid.RowDefinitions>
38 108
            <Grid.ColumnDefinitions>
39
                <ColumnDefinition/>
40
                <ColumnDefinition Width="4"/>
41
                <ColumnDefinition/>
42
                <ColumnDefinition Width="4"/>
109
                <ColumnDefinition Width="Auto"/>
43 110
                <ColumnDefinition/>
44 111
            </Grid.ColumnDefinitions>
45
            <WrapPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal">
46
                <telerik:RadButton Content="추가" Background="#3d3d3d" Foreground="White" Margin="5,0" MinWidth="60" Command="{Binding AddVPCommentCommand}"/>
47
                <telerik:RadToggleButton Width="20" Height="20" Command="{Binding RefreshCommand}" Margin="3">
48
                    <Image Stretch="Fill" Source="/KCOM;component/Resources/Images/MenuImage/Refresh.png"/>
49
                </telerik:RadToggleButton>
50
                
51
        <telerik:RadToggleButton Width="15" Height="15"  Command="{Binding RefreshCommand}">
52
                <Image Stretch="Fill" Source="/KCOM;component/Resources/Images/MenuImage/Refresh.png"/>
53
            </telerik:RadToggleButton>
54
                <telerik:RadGridView>
55
                    
56
                </telerik:RadGridView>
57
            </WrapPanel>
112
            <Line HorizontalAlignment="Center"  Grid.RowSpan="4" Fill="#FFB9B9B9" Margin="2,5" X1="1" X2="1" Y1="0"  Y2="1"  Stretch="Fill" Stroke="#FFB0B0B0"/>
113
            <StackPanel Grid.Column="1">
114
                <telerik:RadPathButton Width="100" HorizontalAlignment="Left" Content="연결 추가" FontSize="12" Grid.ColumnSpan="2" Margin="15,2,2,2"
115
                                                Command="{Binding AddVPCommentCommand, Source={StaticResource ViewModel}}"
116
                                                ContentPlacement="Left" telerik:StyleManager.Theme="Office2016"
117
                                                CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=telerik:GridViewRow}}"
118
                                                PathGeometry="m4,7l0,2l3,0l0,3l2,0l0,-3l3,0l0,-2l-3,0l0,-3l-2,0l0,3l-3,0zm4,9c-4.41828,0 -8,-3.58172 -8,-8c0,-4.41828 3.58172,-8 8,-8c4.41828,0 8,3.58172 8,8c0,4.41828 -3.58172,8 -8,8zm0,0" >
119
                    <telerik:RadPathButton.PathStyle>
120
                        <Style TargetType="Path">
121
                            <Setter Property="Width" Value="18"/>
122
                            <Setter Property="Height" Value="18"/>
123
                            <Setter Property="Fill" Value="#FF0A93E2" />
124
                            <Setter Property="Stretch" Value="Fill" />
125
                            <Setter Property="HorizontalAlignment" Value="Right" />
126
                            <Setter Property="VerticalAlignment" Value="Center" />
127
                        </Style>
128

  
129
                    </telerik:RadPathButton.PathStyle>
130
                </telerik:RadPathButton>
131
            </StackPanel>
132
            <telerik:RadGridView x:Name="DetailGridView" GroupRenderMode="Flat" Grid.Row="1"
133
										BorderThickness="1" Grid.Column="1" telerik:StyleManager.Theme="Office2016"
134
										GridLinesVisibility="Both" RowIndicatorVisibility="Collapsed" Margin="2,0"
135
                                        ScrollViewer.VerticalScrollBarVisibility="Auto" Width="562"
136
                                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"  ColumnWidth="Auto"
137
										CanUserFreezeColumns="False" HorizontalGridLinesBrush="#FFB0AFAF"
138
										AutoGenerateColumns="False" behavior:GridViewAutoWidthBehavior.IsEnabled="True"
139
										ItemsSource="{Binding SelectBidders.VpComments}"
140
                                        HorizontalAlignment="Left" Height="Auto"
141
										ShowGroupPanel="False" SelectedItem="{Binding SelectVPComment, Source={StaticResource ViewModel}}"
142
										IsReadOnly="True" VerticalAlignment="Top">
143
                <i:Interaction.Triggers>
144
                    <i:EventTrigger  EventName="SelectionChanged">
145
                        <i:InvokeCommandAction Command="{Binding SelectedVPCommentCommand, Source={StaticResource ViewModel}}"/>
146
                    </i:EventTrigger>
147
                </i:Interaction.Triggers>
148
                <telerik:RadGridView.Columns>
149
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding createdByName}" HeaderTextAlignment="Center"  Width="120" IsFilterable="False" IsReadOnly="True"
150
													Header="Create User" />
151
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding comment}" HeaderTextAlignment="Center" Width="*" TextAlignment="Left" IsReadOnly="True" TextTrimming="CharacterEllipsis" IsFilterable="False" 
152
													Header="Comment" />
153
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding condition,Mode=TwoWay}" HeaderTextAlignment="Center" Header="Condition" Width="90"  IsReadOnly="True">
154
                        <telerik:GridViewDataColumn.CellStyle>
155
                            <Style TargetType="telerik:GridViewCell">
156
                                <Setter Property="VerticalContentAlignment" Value="Center"/>
157
                                <Setter Property="HorizontalContentAlignment" Value="Center"/>
158
                                <Setter Property="Margin" Value="0"/>
159
                                <Setter Property="Padding" Value="0"/>
160
                            </Style>
161
                        </telerik:GridViewDataColumn.CellStyle>
162
                    </telerik:GridViewDataColumn>
163
                    <telerik:GridViewDataColumn Width="64" Header="연결 제거" IsFilterable="False" IsReadOnly="True">
164
                        <telerik:GridViewDataColumn.CellTemplate>
165
                            <DataTemplate>
166
                                <telerik:RadPathButton ToolTip="Delete Comment" Height="22" Width="22"
167
                                                Command="{Binding DelVPCommentCommand, Source={StaticResource ViewModel}}"
168
                                                CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=telerik:GridViewRow}}" Background="{x:Null}" BorderBrush="{x:Null}"
169
                                                PathGeometry="M108.319,108.319c-2.106,2.107-5.523,2.106-7.632-0.001l-0.003-0.003L70.159,77.79L39.63,108.318   c-2.106,2.108-5.523,2.107-7.634,0c-2.104-2.106-2.105-5.523,0-7.633l30.528-30.528l-30.54-30.541   c-2.106-2.104-2.106-5.521,0-7.631c2.105-2.107,5.522-2.107,7.633-0.001l30.541,30.541l30.528-30.527   c2.105-2.105,5.523-2.105,7.633,0c2.109,2.106,2.107,5.524,0,7.633L77.791,70.157l30.527,30.528   C110.427,102.794,110.427,106.212,108.319,108.319 M119.767,119.767c27.396-27.397,27.396-71.818,0-99.217   C92.37-6.849,47.947-6.85,20.547,20.548c-27.397,27.398-27.396,71.819,0.001,99.22C47.947,147.166,92.368,147.165,119.767,119.767">
170
                                </telerik:RadPathButton>
171
                            </DataTemplate>
172
                        </telerik:GridViewDataColumn.CellTemplate>
173
                    </telerik:GridViewDataColumn>
174
                </telerik:RadGridView.Columns>
175
            </telerik:RadGridView>
58 176
        </Grid>
59
        
60 177
    </Grid>
61 178
</UserControl>
KCOM/Views/MainMenu.xaml
7 7
             xmlns:controls="clr-namespace:KCOM.Controls"  xmlns:ZoomAndPan="clr-namespace:ZoomAndPan;assembly=ZoomAndPan"
8 8
             xmlns:view="clr-namespace:KCOM.Views"
9 9
             mc:Ignorable="d" 
10
             d:DesignHeight="1080"
10 11
             d:DesignWidth="1080" IsTabStop="True" xmlns:messanger="clr-namespace:KCOM.Messenger"
11 12
             xmlns:Angle="clr-namespace:MarkupToPDF.Controls.Angle;assembly=MarkupToPDF" LayoutUpdated="UserControl_LayoutUpdated">
12 13
    <UserControl.Resources>
......
540 541

  
541 542
            <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedRight">
542 543
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Office2016">
543
                    <telerik:RadPane Header="PEMSS" Visibility="Visible" CanFloat="False"  CanUserClose="False"  ContextMenuTemplate="{x:Null}" IsPinned="True" telerik:StyleManager.Theme="Office2016" x:Name="pemssPanel">
544
                       
545
                    </telerik:RadPane>
546
                </telerik:RadPaneGroup>
547
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Office2016">
548 544
                    <telerik:RadPane Header="SEARCH" Visibility="Visible" CanFloat="False" CanUserClose="False"  ContextMenuTemplate="{x:Null}" IsPinned="False" telerik:StyleManager.Theme="Office2016" x:Name="searchPane">
549 545
                        <controls:SearchPanel x:Name="searchPanel_Instance"/>
550 546
                    </telerik:RadPane>
......
567 563
                    </telerik:RadPane>
568 564
                </telerik:RadPaneGroup>
569 565
            </telerik:RadSplitContainer>
570
            <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">
566
            <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom" Height="250">
571 567
                <telerik:RadPaneGroup telerik:StyleManager.Theme="Office2016" telerik:ProportionalStackPanel.RelativeSize="140, 100">
572
                    <telerik:RadPane Header="Document Information"  CloseButtonVisibility="Collapsed">
573
                        <telerik:RadLayoutControl ScrollViewer.HorizontalScrollBarVisibility="Disabled"   ScrollViewer.VerticalScrollBarVisibility="Disabled" SelectedItem="{x:Null}">
568
                    <telerik:RadPane Header="Document Information" CloseButtonVisibility="Collapsed" CanFloat="False">
569
                        <telerik:RadLayoutControl ScrollViewer.HorizontalScrollBarVisibility="Disabled"  ScrollViewer.VerticalScrollBarVisibility="Disabled" SelectedItem="{x:Null}">
574 570
                            <telerik:LayoutControlExpanderGroup ScrollViewer.HorizontalScrollBarVisibility="Disabled"   ScrollViewer.VerticalScrollBarVisibility="Disabled"  IsExpandable="False" x:Name="infoListPane"  Header="User information List" telerik:StyleManager.Theme="Office2016">
575 571
                            <telerik:RadGridView telerik:StyleManager.Theme="Office2013" ShowGroupPanel="True" ShowGroupFooters="False" AutoExpandGroups="True"  x:Name="gridViewMarkup"
576 572
                                             AutoGenerateColumns="False" HorizontalContentAlignment="Center" SelectionChanged="gridViewMarkup_SelectionChanged" SelectionMode="Multiple"
......
805 801
                        </telerik:LayoutControlExpanderGroup>
806 802
                    </telerik:RadLayoutControl>
807 803
                    </telerik:RadPane>
808
                    <telerik:RadPane Header="PEMSS(Requirement and Bidders)" CloseButtonVisibility="Collapsed">
804
                    <telerik:RadPane Header="PEMSS(Requirement and Bidders)" CloseButtonVisibility="Collapsed" CanFloat="False">
809 805
                        <telerik:RadTabControl>
810 806
                            <telerik:RadTabControl.Items>
811
                                <telerik:RadTabItem Header="PEMSS">
807
                                <telerik:RadTabItem Header="Requirement">
812 808
                                    <view:RequirementView/>
813 809
                                </telerik:RadTabItem>
814 810
                                <telerik:RadTabItem Header="Bidders">
KCOM/Views/RequirementSearchView.xaml
1
<UserControl x:Name="userControl" x:Class="KCOM.Views.RequirementSearchView"
2
          xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
3
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7
        xmlns:local="clr-namespace:KCOM.Controls" FontSize="12"
8
        xmlns:behavior="clr-namespace:KCOM.Behaviors"
9
        xmlns:viewmodel="clr-namespace:KCOM.ViewModel"
10
        xmlns:controls ="clr-namespace:KCOM.Controls"
11
        xmlns:convert="clr-namespace:KCOM.Converters"
12
        xmlns:Behaviors="clr-namespace:KCOM.Behaviors"
13
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
14
        mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="1000" DataContext="{DynamicResource ViewModel}">
15
    <UserControl.Resources>
16
        <convert:GridSelectMultiValueConverter x:Key="GridSelectMultiValueConvert"/>
17
        <convert:IListToIListCountConverter x:Key="IListToIListCountConverter"/>
18
        <viewmodel:RequirementSearchViewModel x:Key="ViewModel"/>
19
        <convert:StringMultiLineConvert x:Key="StringMultiLineConvert"/>
20
    </UserControl.Resources>
21
    <i:Interaction.Triggers>
22
        <i:EventTrigger  EventName="Loaded">
23
            <i:InvokeCommandAction Command="{Binding LoadedCommand}"/>
24
        </i:EventTrigger>
25
        <i:EventTrigger  EventName="Unloaded">
26
            <i:InvokeCommandAction Command="{Binding ClosingCommand}"/>
27
        </i:EventTrigger>
28
    </i:Interaction.Triggers>
29
    <Grid Background="White">
30
            <Grid.RowDefinitions>
31
                <RowDefinition Height="Auto"/>
32
        </Grid.RowDefinitions>
33
        <Grid.Resources>
34
            <Style TargetType="telerik:GridViewCell" x:Key="CellTopStretchStyle">
35
                <Setter Property="VerticalContentAlignment" Value="Top"/>
36
                <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
37
                <Setter Property="Margin" Value="0"/>
38
                <Setter Property="Padding" Value="0"/>
39
            </Style>
40
            <Style TargetType="telerik:GridViewCell" x:Key="CellCenterStyle">
41
                <Setter Property="VerticalContentAlignment" Value="Center"/>
42
                <Setter Property="HorizontalContentAlignment" Value="Center"/>
43
                <Setter Property="Margin" Value="0"/>
44
                <Setter Property="Padding" Value="0"/>
45
            </Style>
46
        </Grid.Resources>
47
        <telerik:RadGridView
48
                             AutoGenerateColumns="False"  telerik:StyleManager.Theme="Office2016"
49
                             ItemsSource="{Binding RequirementList}"
50
                             ShowGroupPanel="False" 
51
                             GroupRenderMode="Flat" CanUserFreezeColumns="False" ShowColumnFooters="False"
52
                             CanUserReorderColumns="False"
53
                             CanUserSelect="False" Height="{Binding ActualHeight, ElementName=userControl, Mode=OneWay}"
54
                             x:Name="Gridview" SelectionMode="Single" SelectionUnit="Cell" VerticalAlignment="Top"
55
                            RowIndicatorVisibility="Collapsed" ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
56
                ScrollViewer.VerticalScrollBarVisibility="Visible"
57
                            GridLinesVisibility="Both" HorizontalGridLinesBrush="Orange">
58
            <i:Interaction.Behaviors>
59
                <Behaviors:ColumnFilterBehavior DefaultOperator="Contains"/>
60
            </i:Interaction.Behaviors>
61
            <telerik:RadGridView.Columns>
62
                <telerik:GridViewColumn  IsReadOnly="True" IsFilterable="True" Header="선택" Width="42" HeaderTextAlignment="Center">
63
                    <telerik:GridViewColumn.CellTemplate>
64
                        <DataTemplate>
65
                            <telerik:RadToggleButton Content="선택" 
66
                                                     Command="{Binding SelectedRequirmentCommand, Source={StaticResource ViewModel}}">
67
                                <telerik:RadToggleButton.CommandParameter>
68
                                    <MultiBinding Converter="{StaticResource GridSelectMultiValueConvert}">
69
                                        <Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=telerik:RadWindow}"/>
70
                                        <Binding/> <!--Row 전체가 바인딩됨-->
71
                                    </MultiBinding>
72
                                </telerik:RadToggleButton.CommandParameter>
73
                            </telerik:RadToggleButton>
74
                        </DataTemplate>
75
                    </telerik:GridViewColumn.CellTemplate>
76
                </telerik:GridViewColumn>
77
                <telerik:GridViewDataColumn Header="MR 내용" Width="*" IsReadOnly="True" IsFilterable="True"
78
                                        TextAlignment="Left"  TextWrapping="WrapWithOverflow" HeaderTextAlignment="Center"
79
                                        DataMemberBinding="{Binding mdText,Converter={StaticResource StringMultiLineConvert}}">
80
                </telerik:GridViewDataColumn>
81
                <telerik:GridViewDataColumn  HeaderTextAlignment="Center" CellStyle="{DynamicResource CellTopStretchStyle}"
82
                                             Header="VP Comment" Width="562" DataMemberBinding="{Binding VpComments}" IsReadOnly="True">
83
                    <telerik:GridViewDataColumn.CellTemplate>
84
                        <DataTemplate>
85
                            <Grid>
86
                                <Grid.RowDefinitions>
87
                                    <RowDefinition Height="Auto"/>
88
                                    <RowDefinition/>
89
                                </Grid.RowDefinitions>
90
                                <telerik:RadGridView
91
                             AutoGenerateColumns="False"  telerik:StyleManager.Theme="Fluent"
92
                             ItemsSource="{Binding VpComments}"
93
                             ShowGroupPanel="False" GridLinesVisibility="Vertical"
94
                             GroupRenderMode="Flat" CanUserFreezeColumns="False"
95
                             CanUserReorderColumns="False" VerticalAlignment="Top" HorizontalAlignment="Left"
96
                             CanUserSelect="False" SelectionMode="Single" SelectionUnit="Cell"
97
                            RowIndicatorVisibility="Collapsed" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
98
                            HorizontalGridLinesBrush="Orange">
99
                                <telerik:RadGridView.Columns>
100
                                        <telerik:GridViewDataColumn IsFilterable="False" DataMemberBinding="{Binding createdByName}" HeaderTextAlignment="Center"  Width="120" IsReadOnly="True"
101
													Header="Create User" />
102
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding comment}" HeaderTextAlignment="Center" Width="*" TextAlignment="Left" IsReadOnly="True" TextTrimming="CharacterEllipsis" IsFilterable="False" 
103
													Header="Comment" />
104
                                        <telerik:GridViewDataColumn IsFilterable="False" TextAlignment="Center" DataMemberBinding="{Binding condition,Mode=TwoWay}" HeaderTextAlignment="Center" Header="Condition" Width="90"  IsReadOnly="True">
105
                                            <telerik:GridViewDataColumn.CellStyle>
106
                                                <Style TargetType="telerik:GridViewCell">
107
                                                    <Setter Property="VerticalContentAlignment" Value="Center"/>
108
                                                    <Setter Property="HorizontalContentAlignment" Value="Center"/>
109
                                                    <Setter Property="Margin" Value="0"/>
110
                                                    <Setter Property="Padding" Value="0"/>
111
                                                </Style>
112
                                            </telerik:GridViewDataColumn.CellStyle>
113
                                        </telerik:GridViewDataColumn>
114
                                </telerik:RadGridView.Columns>
115
                            </telerik:RadGridView>
116
                                <Border Grid.Row="1" Background="Gray"/>
117
                            </Grid>
118
                        </DataTemplate>
119
                    </telerik:GridViewDataColumn.CellTemplate>
120
                </telerik:GridViewDataColumn>
121
            </telerik:RadGridView.Columns>
122
        </telerik:RadGridView>
123
    </Grid>
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)