public static void CopyFromEntity(DriverOrderDetailsDto odt, Order order) { odt.order_id = order.OrdrID; odt.order_type = OrdersServices.OrderType.OrderApp.ToString(); //"normal"; odt.invoice_number = order.InvoiceNumber; odt.order_date = Common.ToDateFormat(order.OrderDate); odt.order_time = order.OrderTime.ToString(); odt.consumer_address = order.ConsumerAddress.Address; odt.consumer_mobile = order.Consumer.PhoneNumber; odt.consumer_name = order.Consumer.Name; odt.grand_total = order.GrandTotal; odt.delivery_timeslot_id = order.DeliverySlotID; }
public static void CopyFromEntity(DriverOrderDetailsDto odt, TeleOrder order) { odt.order_id = order.TeleOrdID; odt.order_type = OrdersServices.OrderType.OrderTelp.ToString(); odt.invoice_number = order.InvoiceNumber; odt.order_date = Common.ToDateFormat(order.OrderDate); odt.order_time = order.OrderTime.ToString(); if (order.TeleCustomers.Count > 0) { TeleCustomer cust = order.TeleCustomers.First(); odt.consumer_address = cust.Address; odt.consumer_mobile = cust.MobileNumber; odt.consumer_name = cust.CustomerName; } odt.grand_total = order.GrantTotal; odt.delivery_timeslot_id = order.DeliverySlotID ?? 0; }