コード例 #1
0
        internal tAdresy CreateAddress(ITravelAgencyService service)
        {
            var country = service.GetCounty(Country.Text);

            if (country == null)
            {
                throw new ArgumentException("Country name is invalid.");
            }
            var a = new tAdresy()
            {
                Adres   = Address.Text,
                Panstwo = country.IDPanstwa,
                Miasto  = City.Text,
                Region  = Region.Text,
                Kod     = ZipCode.Text,
                Faks    = Fax.Text,
                Telefon = Phone.Text
            };

            if (!String.IsNullOrWhiteSpace(AddressId.Value))
            {
                a.IDAdresu = int.Parse(AddressId.Value);
            }
            return(a);
        }
コード例 #2
0
 public ClientData(int clientId, String role, string display, tAdresy tAdresy, String password)
 {
     this.ClientId    = clientId;
     this.DisplayName = display;
     this.Address     = tAdresy;
     this.Role        = role;
     this.UserName    = role;
     this.Password    = password;
 }
コード例 #3
0
ファイル: UnitOfWork.cs プロジェクト: jns300/TravelAgency.NET
        public void CreateFirm(tFirmy firm, tAdresy address, string email)
        {
            var client = GetNonNullClientId(email);

            firm.IDKlienta = client.IDKlienta;
            firm.tKlient   = client;
            firm.tAdresy   = address;
            context.tFirmy.Add(firm);
        }
コード例 #4
0
ファイル: UnitOfWork.cs プロジェクト: jns300/TravelAgency.NET
        public void CreatePerson(tOsoby person, tAdresy address, string email)
        {
            var client = GetNonNullClientId(email);

            person.IDKlienta = client.IDKlienta;
            person.tKlient   = client;
            person.tAdresy   = address;
            context.tOsoby.Add(person);
        }
コード例 #5
0
 internal void AssignData(tAdresy obj)
 {
     AddressId.Value = obj.IDAdresu.ToString();
     Address.Text    = obj.Adres;
     Country.Text    = obj.tPanstwa.NazwaPanstwa;
     City.Text       = obj.Miasto;
     Region.Text     = obj.Region;
     ZipCode.Text    = obj.Kod;
     Fax.Text        = obj.Faks;
     Phone.Text      = obj.Telefon;
 }
コード例 #6
0
        public void UpdateAddress(tAdresy obj, ITravelAgencyService service)
        {
            var country = service.GetCounty(Country.Text);

            if (country == null)
            {
                throw new ArgumentException("Country name is invalid.");
            }
            obj.Adres    = Address.Text;
            obj.tPanstwa = country;
            obj.Miasto   = City.Text;
            obj.Region   = Region.Text;
            obj.Kod      = ZipCode.Text;
            obj.Faks     = Fax.Text;
            obj.Telefon  = Phone.Text;
        }
コード例 #7
0
 public void CreateFirm(tFirmy firm, tAdresy address, string email)
 {
     unitOfWork.CreateFirm(firm, address, email);
 }
コード例 #8
0
 public void CreatePerson(tOsoby person, tAdresy address, string email)
 {
     unitOfWork.CreatePerson(person, address, email);
 }