• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ICustomer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Commerce2

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


示例17: Account

        protected Account(double interestRate, decimal balance, ICustomer customer, DateTime dateCreated)
        {
            this.InterestRate = interestRate;
            this.Balance = balance;
            this.CreatonDate = dateCreated;

            this.customer = customer;
        }
开发者ID:nadiahristova,项目名称:OOP,代码行数:8,代码来源:Account.cs


示例18: GetOrder

 IOrder GetOrder(Random rand, ICustomer customer, int counter, ITypeInfo ordersTypeInfo) {
     var order = (IOrder)ReflectionHelper.CreateObject(ordersTypeInfo.Type, new object[] { _objectSpace.Session });
     order.Customer = customer;
     order.OrderDate = DateTime.Now.AddDays((-rand.Next(365 * 3)));
     order.Reference = String.Format("ORD{0}", counter + 1000);
     order.Total = 0F;
     return order;
 }
开发者ID:aries544,项目名称:eXpand,代码行数:8,代码来源:DummyDataBuilder.cs


示例19: AddAllCustomerAppointmentsToList

 public List<IAppointment> AddAllCustomerAppointmentsToList(ICustomer icustomer, List<IAppointment> iappointmentsList)
 {
     for (int i = 0; i < icustomer.Appointments.Count; i++)
     {
         iappointmentsList.Add(icustomer.Appointments[i]);
     }
     return iappointmentsList;
 }
开发者ID:Klockz,项目名称:NBservicesprint4,代码行数:8,代码来源:CustomerFacade.cs


示例20: CreateBooking

        public IBooking CreateBooking(ISupplier supplier, ICustomer customer, string sale, int bookingNumber, 
            DateTime startDate, DateTime endDate)
        {
            BookingEntity booking = new BookingEntity(supplier, customer, sale, bookingNumber, startDate, endDate);
            bookings.Add(booking);

            return booking;
        }
开发者ID:Klockz,项目名称:LonelyTreeExam,代码行数:8,代码来源:DataAccessFacadeStub.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ICustomerActivityService类代码示例发布时间:2022-05-24
下一篇:
C# ICustomTypeDescriptor类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap