当前位置: 首页>>代码示例>>C#>>正文


C# ICustomer类代码示例

本文整理汇总了C#中ICustomer的典型用法代码示例。如果您正苦于以下问题:C# ICustomer类的具体用法?C# ICustomer怎么用?C# ICustomer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ICustomer类属于命名空间,在下文中一共展示了ICustomer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ValidateCustomer

 public void ValidateCustomer(ICustomer customer, String message)
 {
     if (customer == null)
     {
         throw new ArgumentException(message);
     }
 }
开发者ID:mgulubov,项目名称:SoftUniCourse-OOP,代码行数:7,代码来源:Validation.cs

示例2: AddAppointmentDialog

 public AddAppointmentDialog(ICustomer icustomer, CreateCustomerDialog createCustomerDialog, List<IAppointment> appointments)
 {
     this.iCustomer = icustomer;
     this.ccd = createCustomerDialog;
     this.appointments = appointments;
     InitializeComponent();
 }
开发者ID:Klockz,项目名称:NBservicesprint4,代码行数:7,代码来源:AddAppointmentDialog.xaml.cs

示例3: Create

        /// <summary>
        /// Creates a Braintree <see cref="Customer"/> from a Merchello <see cref="ICustomer"/>
        /// </summary>
        /// <param name="customer">
        /// The customer.
        /// </param>
        /// <param name="paymentMethodNonce">
        /// The "nonce-from-the-client"
        /// </param>
        /// <param name="billingAddress">
        /// The billing address
        /// </param>
        /// <param name="shippingAddress">
        /// The shipping Address.
        /// </param>
        /// <returns>
        /// The <see cref="Attempt{Customer}"/>.
        /// </returns>
        public Attempt<Customer> Create(ICustomer customer, string paymentMethodNonce = "", IAddress billingAddress = null, IAddress shippingAddress = null)
        {
            if (Exists(customer)) return Attempt.Succeed(GetBraintreeCustomer(customer));

            var request = RequestFactory.CreateCustomerRequest(customer, paymentMethodNonce, billingAddress);

            Creating.RaiseEvent(new Core.Events.NewEventArgs<CustomerRequest>(request), this);

            // attempt the API call
            var attempt = TryGetApiResult(() => BraintreeGateway.Customer.Create(request));

            if (!attempt.Success) return Attempt<Customer>.Fail(attempt.Exception);

            var result = attempt.Result;

            if (result.IsSuccess())
            {
                Created.RaiseEvent(new Core.Events.NewEventArgs<Customer>(result.Target), this);

                return Attempt.Succeed((Customer)RuntimeCache.GetCacheItem(MakeCustomerCacheKey(customer), () => result.Target));
            }

            var error = new BraintreeApiException(result.Errors);
            LogHelper.Error<BraintreeCustomerApiService>("Braintree API Customer Create return a failure", error);

            return Attempt<Customer>.Fail(error);
        }
开发者ID:cmgrey83,项目名称:Merchello.Plugin.Payment.Braintree,代码行数:45,代码来源:BraintreeCustomerApiService.cs

示例4: Commerce

 public Commerce(IBillingProcessor billingProcessor, ICustomer customer, INotifier notifier, ILogger logger)
 {
     _BillingProcessor = billingProcessor;
     _Customer = customer;
     _Notifier = notifier;
     _Logger = logger;
 }
开发者ID:tleviathan,项目名称:DeepDiveIntoDI,代码行数:7,代码来源:Commerce.cs

示例5: Deposit

 public Deposit(ICustomer customer, float amount, DateTime endDate)
 {
     Amount = amount;
     EndDate = endDate;
     Customer = customer;
     History = new List<IOperationHistory>();
 }
开发者ID:Tolga,项目名称:Bank,代码行数:7,代码来源:Deposit.cs

示例6: FullyRegister

 private void FullyRegister(ISet behaviour, ICustomer customer)
 {
     Debug.WriteLine("Perform full customer registration");
     behaviour.Perform()
         .Given(customer.Register);
         //.And(customer...)
 }
开发者ID:valerysntx,项目名称:UBADDAS,代码行数:7,代码来源:UserAcceptanceTest.cs

示例7: CreateBooking

 public IBooking CreateBooking(ISupplier supplier, ICustomer customer, string sale, int bookingNumber,
     DateTime StartDate, DateTime EndDate)
 {
     //Calls Bookingcollection class for create
     return bookingCollection.Create((Supplier)supplier, (Customer)customer, sale, bookingNumber, StartDate,
         EndDate);
 }
开发者ID:Klockz,项目名称:LonelyTreeExam,代码行数:7,代码来源:BookingController.cs

示例8: Account

 public Account(int id, ICustomer customer, decimal balance, decimal interestRate, DateTime creatDate)
     : this(id, customer, creatDate)
 {
     this.Balance = balance;
     this.InterestRate = interestRate;
     this.CreatedOn = DateTime.Now;
 }
开发者ID:deyantodorov,项目名称:TelerikAcademy,代码行数:7,代码来源:Account.cs

示例9: BankAccount

       protected BankAccount(ICustomer customer,decimal balance,decimal monthlyInterestRate)
       {
           this.Customer = customer;
           this.Balance = balance;
           this.MonthlyInterestRate = monthlyInterestRate;

       }
开发者ID:asenAce,项目名称:Software_University_Bulgaria,代码行数:7,代码来源:BankAccount.cs

示例10: Update

 public static bool Update(ICustomer customer)
 {
     List<ICustomer> customers = LoadAllCustomers();
     ICustomer customerToBeUpdated = null;
     for (int i = 0; i < customers.Count; i++)
     {
         ICustomer customerLoaded = customers[i];
         if (customer.Id == customerLoaded.Id)
         {
             customerToBeUpdated = customerLoaded;
             break;
         }
     }
     if (customerToBeUpdated != null)
     {
         customers.Remove(customerToBeUpdated);
         customers.Add(customer);
         SaveAllCustomers(customers);
         return true;
     }
     else
     {
         return false;
     }
 }
开发者ID:Klockz,项目名称:NBservicesprint4,代码行数:25,代码来源:CustomerAccessFacade.cs

示例11: GetRules

		public IEnumerable<IFinancingEligibilityRule> GetRules(ICustomer customer)
		{
			yield return new IsOldEnoughRule(customer.Age);
			yield return new LivesInFinancingStateRule(customer.BillingStateAbbreviation);
			yield return new HasNoDelinquenciesOnFileRule(customerId: customer.CustomerId, financingRepository: _financingRepository);
			yield return new HasTopTierCreditScoreRule(ssn: customer.SSN, dateOfBirth: customer.DateOfBirth, financingRepository: _financingRepository);
		}
开发者ID:rickbatka,项目名称:SOLIDsample,代码行数:7,代码来源:FinancingRulesProvider.cs

示例12: Compare

        public int Compare(ICustomer x, ICustomer y)
        {
            if (x.ArrivalTime != y.ArrivalTime) return x.ArrivalTime.CompareTo(y.ArrivalTime);
            if (x.CartCount != y.CartCount) return x.CartCount.CompareTo(y.CartCount);

            return x.CustomerType.CompareTo(y.CustomerType);
        }
开发者ID:tanveeransari,项目名称:Dumbekv,代码行数:7,代码来源:Customer.cs

示例13: TradeAction

        protected TradeAction(ICustomer customer, ISeller seller)
        {
            ThrowNewArgumentNullException(customer, seller);

            _customer = customer;
            _seller = seller;
        }
开发者ID:shmeleva,项目名称:University-Projects,代码行数:7,代码来源:TradeAction.cs

示例14: Account

 public Account(ICustomer owner, decimal balance, decimal interestRate)
 {
     this.Owner = owner;
     this.Balance = balance;
     this.InterestRate = interestRate;
     this.openDate = DateTime.Now;
 }
开发者ID:tzigy,项目名称:TelerikAcademy,代码行数:7,代码来源:Account.cs

示例15: CustomerAddress

 ///TODO: We need to talk about the contstructor.  An empty address does not make a lot of sense.
 internal CustomerAddress(ICustomer customer, string label)
 {
     Mandate.ParameterNotNull(customer, "customer");
     Mandate.ParameterNotNull(label, "label");
     _customerKey = customer.Key;
     _label = label;
 }
开发者ID:BatJan,项目名称:Merchello,代码行数:8,代码来源:CustomerAddress.cs


注:本文中的ICustomer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。