/// <summary> /// Validate Account Detail Line Item /// </summary> /// <param name="account"></param> /// <param name="dataService"></param> public void ValidateAccountDetailLineItem(taccount account, IAccountsDataService dataService) { accountsDataService = dataService; InitializeValidationRules(account); //ValidateGreaterThanZero("Quantity", "Order Quantity"); }
public AccountsApiController() { if (DateTime.Now.Year / 2 == 0) { accountsDataService = new AccountsDataService(); } else { accountsDataService = new AccountsDataServiceII(); } }
/// <summary> /// Validate Account /// </summary> /// <param name="account"></param> /// <param name="dataService"></param> public void ValidateAccount(taccount account, IAccountsDataService dataService) { accountsDataService = dataService; InitializeValidationRules(account); ValidateEmailAddress("EMAILADDRESS", "Email Address"); //ValidateRequired("ShipName", "Ship To Name"); //ValidateRequired("ShipCity", "Ship To City"); //ValidateRequired("ShipRegion", "Ship To Region"); //ValidateRequired("ShipPostalCode", "Ship To Postal Code"); //ValidateRequired("ShipCountry", "Ship To Country"); //ValidateRequired("ShipAddress", "Ship To Address"); //ValidateRequiredDate("RequiredDate", "Required Ship Date"); //ValidateSelectedValue("ShipVia", "Ship Via"); }
public void ValidateExistingUser(User user, IAccountsDataService dataService) { accountsDataService = dataService; InitializeValidationRules(user); ValidateRequired("FirstName", "First Name"); ValidateRequired("LastName", "Last Name"); ValidateRequired("UserName", "User Name"); ValidateRequired("Password", "Password"); ValidateRequired("EmailAddress", "Email Address"); ValidateEmailAddress("EmailAddress", "Email Address"); ValidateUniqueUserNameForExistingUser(user.UserId, user.UserName); }
/// <summary> /// Constructor with Dependency Injection using Ninject /// </summary> /// <param name="dataService"></param> public AccountsApiController() { accountsDataService = new AccountsDataService(); applicationDataService = new ApplicationDataService(); }
/// <summary> /// Constructor /// </summary> public AccountsBusinessService(IAccountsDataService dataService) { _accountsDataService = dataService; }
/// <summary> /// Initialize user Business Rules /// </summary> /// <param name="user"></param> /// <param name="dataService"></param> public void InitializeAccountsBusinessRules(User user, IAccountsDataService dataService) { accountsDataService = dataService; InitializeValidationRules(user); }
/// <summary> /// Initialize Account Business Rules /// </summary> /// <param name="account"></param> /// <param name="dataService"></param> public void InitializeAccountsBusinessRules(taccount account, IAccountsDataService dataService) { accountsDataService = dataService; InitializeValidationRules(account); }
/// <summary> /// Constructor with Dependency Injection using Ninject /// </summary> /// <param name="dataService"></param> public AccountsApiController() { accountsDataService = new AccountsDataService(); }