프로젝트

일반

사용자정보

개정판 1bd7e3a0

ID1bd7e3a0dd2a189fa289901f5e365e0d7cb4eb69
상위 f3699f72
하위 2b0af253

유성호이(가) 약 2년 전에 추가함

issue #0000
작업자 필드 추가
ID2 Connection 클릭 팝업 시 최초 : ID2 StartDate 입력, 팝업시마다 : 현재 작업자(Worker) 업데이트
Grid 바로 반영을 위해 BindingList로 수정

Change-Id: I97a3dd06dd932b101f9874a3acd2a1ab73d0d3fa

차이점 보기:

ID2.Manager/ID2.Manager.Data/Models/Documents.cs
4 4
using System.Text;
5 5
using System.Threading.Tasks;
6 6

  
7
using System.ComponentModel;
7 8
using System.Runtime.Serialization;
8 9

  
9 10
namespace ID2.Manager.Data.Models
10 11
{
11 12
    [DataContract]
12
    public class Documents : IEquatable<Documents>
13
    public class Documents : IEquatable<Documents>, INotifyPropertyChanged
13 14
    {
15
        public event PropertyChangedEventHandler PropertyChanged;
16
        protected void OnPropertyChanged(string propName)
17
        {
18
            if (PropertyChanged != null)
19
            {
20
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
21
            }
22
        }
23

  
14 24
        [DataMember]
15 25
        public int Seq { get; set; }
16 26
        [DataMember]
......
41 51
        public string IsTypical { get; set; }
42 52
        [DataMember]
43 53
        public string PersonInCharge { get; set; }
54
        private string _Worker = string.Empty;
44 55
        [DataMember]
45
        public string Worker { get; set; }
56
        public string Worker
57
        {
58
            get
59
            {
60
                return _Worker;
61
            }
62
            set
63
            {
64
                if (this._Worker != value)
65
                {
66
                    this._Worker = value;
67
                    OnPropertyChanged("Worker");
68
                }
69
            }
70
        }
46 71
        [DataMember]
47 72
        public bool IsDeleted { get; set; }
48 73
        [DataMember]
ID2.Manager/ID2.Manager/Main.cs
269 269
            InitializeSearch();
270 270
            InitializeGridViewDetail();
271 271

  
272
            this.radGridViewDocuments.DataSource = this.documents;
272
            this.radGridViewDocuments.DataSource = new BindingList<Documents>(this.documents);
273 273

  
274 274
        }
275 275

  
......
653 653
                       };
654 654
            */
655 655

  
656
            this.radGridViewDocuments.DataSource = this.documents;
656
            this.radGridViewDocuments.DataSource = new BindingList<Documents>(this.documents);
657 657

  
658 658
            if (this.radGridViewDocuments.SummaryRowsBottom != null)
659 659
                this.radGridViewDocuments.SummaryRowsBottom.Clear();
......
788 788
                                        doc.ID2StartDate = returnDoc.ID2StartDate;
789 789
                                        doc.Worker = returnDoc.Worker;
790 790
                                    }
791

  
792

  
793
                                    //if (doc.ID2StartDate == null)
794
                                    //{
795
                                    //    var returnDoc = new DocumentController().SetDocumentDataField(new Documents()
796
                                    //    {
797
                                    //        DocID = doc.DocID,
798
                                    //        ID2StartDate = DateTime.Now
799
                                    //    }, informations.ActiveUser.ID);
800

  
801
                                    //    if (returnDoc != null)
802
                                    //    {
803
                                    //        doc.ID2StartDate = returnDoc.ID2StartDate;
804
                                    //    }
805
                                    //}
806 791
                                }
807 792
                                catch { }
808 793
                            }
......
810 795
                        catch (Exception ex)
811 796
                        {
812 797
                            RadMessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, RadMessageIcon.Error);
813

  
814
                            if (e.Row.DataBoundItem is Documents doc)
815
                            {
816
                                var returnDoc = new DocumentController().SetID2Worker(new Documents()
817
                                {
818
                                    DocID = doc.DocID,
819
                                    ID2StartDate = DateTime.Now,
820
                                    Worker = informations.ActiveUser.ID
821
                                }, informations.ActiveUser.ID);
822

  
823
                                if (returnDoc != null)
824
                                {
825
                                    doc.ID2StartDate = returnDoc.ID2StartDate;
826
                                    doc.Worker = returnDoc.Worker;
827
                                }
828
                            }
829 798
                        }
830 799
                        break;
831 800
                }

내보내기 Unified diff

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