public AdministratorBO(Keskus.DAL.Administrator admin) { this.AdminID = admin.AdminID; this.Name = admin.Name; this.ChangeAllowed = admin.CanChange; this.Password = admin.Password; this.UserName = admin.Username; }
public ContactBO(Keskus.DAL.Contact contact) { this._contactID = contact.ContactID; this._customerID = contact.CustomerID; this._contactTypeID = contact.ContactTypeID; this._value = contact.Value; this._created = contact.Created; }
public BookingBO(Keskus.DAL.Booking booking) { this.BookingID = booking.BookingID; this.Date = booking.Date; this.RoomID = booking.RoomID; this.CustomerID = booking.CustomerID; this.Participants = booking.Participants; this.Created = booking.Created; this.Confirmed = booking.Confirmed; this.AdditionalInfo = booking.AdditionalInfo; this.Archived = booking.Archived; using (var db = new Keskus_baasEntities()) { var getCustomer = db.Customers .Where(x => x.CustomertID == booking.CustomerID) .FirstOrDefault(); //getting klient PIC name from Klients database this.CustomerContactPerson = getCustomer.ContactPerson; //getting klient ORG name from Klients database this.CustomerCompany = getCustomer.CompanyName; var getRoom = db.Rooms .Where(x => x.RoomID == booking.RoomID) .FirstOrDefault(); //getting Room name from Ruums database this.Room = getRoom.Name; //getting Room status from Ruums database this.RoomActive = getRoom.Active; var getAdmin = db.Administrators .Where(x => x.AdminID == booking.AdminID) .FirstOrDefault(); //getting Admin name from Administraators database this.Admin = getAdmin.Name; } }
public ContactTypeBO(Keskus.DAL.ContactType contactType) { this._contactTypeID = contactType.ContactTypeID; this._name = contactType.Name; this._compulsory = contactType.Compulsory; }
public CustomerBO(Keskus.DAL.Customer customer) { this._customerID = customer.CustomertID; this._companyName = customer.CompanyName; this._contactPerson = customer.ContactPerson; }