本文整理汇总了C#中CustomerType类的典型用法代码示例。如果您正苦于以下问题:C# CustomerType类的具体用法?C# CustomerType怎么用?C# CustomerType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CustomerType类属于命名空间,在下文中一共展示了CustomerType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Account
//Constructors
public Account(CustomerType type, decimal balance, decimal interestRate)
{
this.Type = type;
this.Balance = balance;
this.InterestRate = interestRate;
this.existance = 0;
}
示例2: Account
public Account(string customer, CustomerType customerType, decimal balance, decimal interestRate)
{
this.Customer = customer;
this.CustomerType = customerType;
this.Balance = balance;
this.InterestRate = interestRate;
}
示例3: SetValidData
public void SetValidData()
{
dataAccessFacadeStub = new DataAccessFacadeStub();
validName = "VF Jan";
validNote = "8 Persons";
validType = CustomerType.Bureau;
}
示例4: Customer
public Customer(string companyName,string userName /*,string password */)
{
this.companyName = companyName;
this.username = userName;
//this.password = password;
this.customerType = CustomerType.Company;
}
示例5: Types
// Methods
public static List<CustomerType> Types()
{
List<CustomerType> list = new List<CustomerType>();
string str = "SELECT CustomerType, ShortDescription FROM CodeCustomerType order by ShortDescription ";
SqlConnection connection = new SqlConnection();
SqlCommand command = new SqlCommand();
connection.ConnectionString = ConfigurationManager.ConnectionStrings["ChargeProgramConnectionString"].ConnectionString;
command.CommandText = str;
command.Connection = connection;
connection.Open();
SqlDataReader reader = command.ExecuteReader(CommandBehavior.SingleResult);
CustomerType item = new CustomerType();
item.description = "ALL";
item.type = "ALL";
list.Add(item);
while (reader.Read())
{
CustomerType type2 = new CustomerType();
type2.Type = reader["CustomerType"].ToString();
type2.Description = reader["ShortDescription"].ToString();
list.Add(type2);
}
reader.Close();
connection.Close();
return list;
}
示例6: Customer
internal Customer(CustomerType type, string note, string name, IDataAccessFacade dataAccessFacade)
{
validateName(name);
this.dataAccessFacade = dataAccessFacade;
_customerEntity = dataAccessFacade.CreateCustomer(type, note, name);
initializeParty(_customerEntity);
}
示例7: Account
public Account(string customerName, CustomerType type, decimal interest, decimal amount)
{
this.Customer = customerName;
this.Type = type;
this.Interest = interest;
this.Balance = amount;
}
示例8: Customer
public Customer(CustomerType customerType,string customerName)
{
this.CustomerType = customerType;
this.CustomerName = customerName;
customerIndexator++;
}
示例9: GetAllProductFor
public IList<Product> GetAllProductFor(CustomerType customerType)
{
IDiscountStrategy discountStrategy = DiscountFactory.GetDiscountStrtegyFor(customerType);
IList<Product> products = _productRepository.Findall();
products.Apply(discountStrategy);
return products;
}
示例10: RegisterCustomer
public void RegisterCustomer(string name, CustomerType customerType)
{
try
{
using (var transaction = new TransactionScope())
{
Customer customer = new Customer();
customer.Name = name;
customer.Type = customerType;
customer.Agreements.Add(
new Agreement
{
Number = agreementManagementService.GenerateAgreementNumber(),
CreatedOn = DateTime.Now,
Customer = customer
});
repository.Save(customer);
repository.Commit();
transaction.Complete();
}
}
catch (Exception ex)
{
throw new RegistrationException(string.Format("Failed to register customer with name '{0}' and type {1}.", name, customerType), ex);
}
}
示例11: Customer
public Customer(string name,CustomerType customerType)
{
this.CustomerType = customerType;
this.Name = name;
}
示例12: Create
internal Customer Create(CustomerType type, string note, string name)
{
//Adds a new customer object and adds it to the list.
Customer customer = new Customer(type, note, name, dataAccessFacade);
customers.Add(customer);
return customer;
}
示例13: AbstractCustomer
public AbstractCustomer(CustomerType customerType)
{
this._accountList = new List<IAccount>();
this._customerType = customerType;
this._validator = Validation.VALIDATOR;
this._accountFactory = AccountFactory.ACCOUNT_FACTORY;
}
示例14: Account
public Account(DateTime date, CustomerType customer, decimal balance)
{
this.CreatedOn = date;
this.Customer = customer;
this.Balance = balance;
this.InterestRate = this.CalculateInterestRate();
this.NumberOfMonths = this.CalcMonths();
}
示例15: Deposit
public Deposit(CustomerType customer, decimal balance, decimal interestRate)
: base(customer, balance, interestRate)
{
if (this.InterestRate <= 0 || this.Balance <= 0)
{
throw new ArgumentException("Balance and interest rate must be greater than zero.");
}
}