Ejemplo n.º 1
0
        public DiaryW(Diary diary)
        {
            this.Id = diary.Id;
            this.Number = diary.Number;
            this.LetterNumber = diary.LetterNumber;
            this.LetterDate = diary.LetterDate;
            this.AcceptanceDateAndTime = diary.AcceptanceDateAndTime;
            this.Contractor = diary.Contractor;
            this.ClientId = diary.ClientId;
            this.Comment = diary.Comment;

            this.Client = diary.Client;
            this.Request = diary.Requests.FirstOrDefault();
            this.Products = diary.Products;
        }
Ejemplo n.º 2
0
        public Diary ToBase()
        {
            Diary diary = new Diary();

            diary.Id = this.Id;
            diary.Number = this.Number;
            diary.LetterNumber = this.LetterNumber;
            diary.LetterDate = this.LetterDate;
            diary.AcceptanceDateAndTime = this.AcceptanceDateAndTime;
            diary.Contractor = this.Contractor;
            diary.ClientId = this.ClientId;
            diary.Comment = this.Comment;

            diary.Client = this.Client;
            diary.Requests.Add(this.Request);
            diary.Products = this.Products;

            return diary;
        }