public static Customer ConvertToCustomer(TCustomer tcustomer) { Customer customer = new Customer(); customer.id = tcustomer.CustomerId; customer.address1 = tcustomer.Address1; customer.address2 = tcustomer.Address2; customer.company = tcustomer.CompanyName; customer.created_by = tcustomer.CreatedBy; customer.created_date = DateTime.Parse(tcustomer.CreatedDate.ToString()); customer.id_card_number = tcustomer.IdCardNumber; customer.mobile = tcustomer.Mobile; customer.name = tcustomer.Name; customer.phone = tcustomer.Phone; return(customer); }
public static TCustomer ConvertToTCustomer(Customer customer) { TCustomer tcustomer = new TCustomer(); tcustomer.CustomerId = customer.id; tcustomer.Address1 = customer.address1; tcustomer.Address2 = customer.address2; tcustomer.CompanyName = customer.company; tcustomer.CreatedBy = customer.created_by; tcustomer.CreatedDate = customer.created_date.ToString(); tcustomer.IdCardNumber = customer.id_card_number; tcustomer.Mobile = customer.mobile; tcustomer.Name = customer.name; tcustomer.Phone = customer.phone; return(tcustomer); }