public Category(Guid id, string name, string description = "", string picture = "") { TypeDataCheck.checkId(id); TypeDataCheck.IsNullOrEmpty(name); SetId(id); SetName(name); Description = description; Picture = picture; }
public Shipper(Guid id, string companyName, string phone) { TypeDataCheck.checkId(id); TypeDataCheck.IsNullOrEmpty(companyName); TypeDataCheck.IsNullOrEmpty(phone); SetId(id); CompanyName = companyName; Phone = phone; }
public Product(Guid Id, Category category, Supplier supplier, string productName, string quantityPerUnit, decimal unitPrice, double unitsInStock) { // Model Control TypeDataCheck.IsNull(category); TypeDataCheck.IsNull(supplier); TypeDataCheck.IsNullOrEmpty(productName); TypeDataCheck.IsNullOrEmpty(quantityPerUnit); SetId(Id); ProductName = productName; QuantityPerUnit = quantityPerUnit; SetCategoryId(category.Id); SetSupplierId(supplier.Id); SetUnitPrice(unitPrice); SetUnitsInStock(unitsInStock); }
public Supplier(Guid id, string companyName, string contactName, string contactTitle, string adress, string city, string country, string phone) { TypeDataCheck.IsNullOrEmpty(companyName); TypeDataCheck.IsNullOrEmpty(contactName); TypeDataCheck.IsNullOrEmpty(contactTitle); TypeDataCheck.IsNullOrEmpty(adress); TypeDataCheck.IsNullOrEmpty(city); TypeDataCheck.IsNullOrEmpty(country); TypeDataCheck.IsNullOrEmpty(phone); SetId(id); CompanyName = companyName; ContactName = contactName; ContactTitle = contactTitle; Adress = adress; City = city; Country = country; Phone = phone; }
public Employee(Guid id, string firstName, string lastName, string title, DateTime birthDate, DateTime hireDate, string address, string city, string postalCode, string country) { SetId(id); SetFirstName(firstName); SetLastName(lastName); SetTitle(title); SetBrithDate(birthDate); SetHireDate(hireDate); TypeDataCheck.IsNullOrEmpty(address); TypeDataCheck.IsNullOrEmpty(city); TypeDataCheck.IsNullOrEmpty(postalCode); TypeDataCheck.IsNullOrEmpty(country); Address = address; City = city; PostalCode = postalCode; Country = country; }
public void SetEmail(string email) { TypeDataCheck.IsNullOrEmpty(email); CustomerRuleCheck.CheckEmail(email); Email = email; }
public void SetSurname(string surname) { TypeDataCheck.IsNullOrEmpty(surname); Surname = surname; }
public void SetName(string name) { TypeDataCheck.IsNullOrEmpty(name); Name = name; }
public void SetTitle(string title) { TypeDataCheck.IsNullOrEmpty(title); EmployeeRuleCheck.CheckEmployeeTitle(title); Title = title; }
public void SetLastName(string lastName) { TypeDataCheck.IsNullOrEmpty(lastName); EmployeeRuleCheck.CheckEmployeeLastName(lastName); LastName = lastName; }
public void SetFirstName(string firstName) { TypeDataCheck.IsNullOrEmpty(firstName); EmployeeRuleCheck.CheckEmployeeFirstName(firstName); FirstName = firstName; }