PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/BoardingPassHelper/BoardingPassTable.cs

https://github.com/edelgiudice/iBoardingPass
C# | 59 lines | 47 code | 12 blank | 0 comment | 0 complexity | b25daf3cab40352a89547cc7a0ea6c51 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Text;
 5using System.Data.Linq.Mapping;
 6using System.Collections;
 7using System.Data.Linq;
 8using System.Data.Linq.Mapping;
 9using System.Collections;
10using System.Data.Linq;
11
12
13namespace iBoardingPass
14{
15    [Table(Name = "BoardingPass")]
16    public class BoardingPassTable
17    {
18
19        public BoardingPassTable()
20        {
21        }
22        public BoardingPassTable(BoardingPassData bpD)
23        {
24            NomePasseggero = bpD.PassengerName;
25            NumVolo = bpD.FlightNumber;
26            DataVolo = BPHelper.GetDateFromJulian(Convert.ToInt32(bpD.DateOfFlight)).ToString("yyyyMMdd");
27            CodiceCompagnia = bpD.OperatingCarrier;
28            PartenzaDa = bpD.FromCity;
29            ArrivoA = bpD.ToCity;
30            BPCompleteSTR = bpD.BPCompleteStr;
31            FastTrackFlag = Convert.ToInt16(bpD.FastTrackFlag);
32        }
33
34        [Column(IsPrimaryKey = true)]
35        public string NomePasseggero { get; set; }
36
37        [Column(IsPrimaryKey = true)]
38        public string NumVolo { get; set; }
39
40        [Column(IsPrimaryKey = true)]
41        public string DataVolo { get; set; }
42
43        [Column(IsPrimaryKey = true)]
44        public string CodiceCompagnia { get; set; }
45
46        [Column(CanBeNull = false)]
47        public string PartenzaDa { get; set; }
48
49        [Column(CanBeNull = false)]
50        public string ArrivoA { get; set; }
51
52        [Column(CanBeNull = false)]
53        public string BPCompleteSTR { get; set; }
54
55        [Column(CanBeNull = false)]
56        public Int16 FastTrackFlag { get; set; }
57
58    }
59}