PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/Sviluppo/iBoardingPass/BoardingPassHelper/BoardingPassTable.cs

https://github.com/edelgiudice/iBoardingPass
C# | 55 lines | 44 code | 11 blank | 0 comment | 0 complexity | 32ce177ff7cc0f772fc3e14802922f0d 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            FastTrackFlag = Convert.ToInt16(bpD.FastTrackFlag);
31        }
32
33        [Column(IsPrimaryKey = true)]
34        public string NomePasseggero { get; set; }
35
36        [Column(IsPrimaryKey = true)]
37        public string NumVolo { get; set; }
38
39        [Column(IsPrimaryKey = true)]
40        public string DataVolo { get; set; }
41
42        [Column(IsPrimaryKey = true)]
43        public string CodiceCompagnia { get; set; }
44
45        [Column(CanBeNull = false)]
46        public string PartenzaDa { get; set; }
47
48        [Column(CanBeNull = false)]
49        public string ArrivoA { get; set; }
50
51        [Column(CanBeNull = false)]
52        public Int16 FastTrackFlag { get; set; }
53
54    }
55}