Exemplo n.º 1
0
 public virtual void RemoveCustomerInfo(UserCustomerInfo customerInfo)
 {
     if (CustomerInfo.Contains <UserCustomerInfo>(customerInfo))
     {
         var foundInfo = CustomerInfo.Single(ci => ci == customerInfo);
         CustomerInfo.Remove(foundInfo);
     }
 }
Exemplo n.º 2
0
        public static UserCustomerInfo ToModelObject(this TrexSLService.UserCustomerInfo dtoUserCustomerInfo)
        {
            var userCustomerInfo = new UserCustomerInfo();

            userCustomerInfo.CustomerId  = dtoUserCustomerInfo.CustomerID;
            userCustomerInfo.UserId      = dtoUserCustomerInfo.UserID;
            userCustomerInfo.PricePrHour = dtoUserCustomerInfo.Price;

            return(userCustomerInfo);
        }
Exemplo n.º 3
0
 public virtual void AddCustomerInfo(UserCustomerInfo customerInfo)
 {
     //Update existing info item
     if (CustomerInfo.Contains <UserCustomerInfo>(customerInfo))
     {
         var foundInfo = CustomerInfo.Single(ci => ci.Equals(customerInfo));
         foundInfo.PricePrHour = customerInfo.PricePrHour;
     }
     else
     {
         CustomerInfo.Add(customerInfo);
     }
 }