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); }
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; }
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); }
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); }
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; }
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; }
public void CreateFirm(tFirmy firm, tAdresy address, string email) { unitOfWork.CreateFirm(firm, address, email); }
public void CreatePerson(tOsoby person, tAdresy address, string email) { unitOfWork.CreatePerson(person, address, email); }