Esempio n. 1
0
        public bool SaveDetails(CustomerDetailsDto newDetails)
        {
            this.customer = newDetails.DtoToEntity();

            if (this._customer.Insert(this.customer).IsNull())
            {
                return(false);
            }

            return(true);
        }
        public static ChainSawEntity.Customer DtoToEntity(this CustomerDetailsDto dto)
        {
            ChainSawEntity.Customer entity = null;

            if (!dto.IsNull())
            {
                entity = new ChainSawEntity.Customer
                {
                    CustomerID      = dto.CustomerId,
                    CustomerCode    = dto.CustomerCode,
                    CustomerAddress = dto.CustomerAddress,
                    CustomerName    = dto.CustomerName,
                    CreatedBy       = dto.CreatedBy,
                    DateCreated     = dto.DateCreated,
                    DateUpdated     = dto.DateUpdated,
                    UpdatedBy       = dto.UpdatedBy
                };
            }

            return(entity);
        }
Esempio n. 3
0
 public CustomerService(IIOBalanceRepository <Customer> customer)
 {
     this._customer = customer;
     this.customer  = new ChainSawDBEntity.Customer();
 }