Exemplo n.º 1
0
        public static TRegularOrder ConvertToTRegularOrder(RegularOrder order, bool isDeleted)
        {
            TRegularOrder regular = ConvertToTRegularOrder(order);

            regular.IsDeleted = isDeleted;
            return(regular);
        }
Exemplo n.º 2
0
        public static TRegularOrder ConvertToTRegularOrder(RegularOrder order)
        {
            TRegularOrder torder = new TRegularOrder();

            torder.OrderId       = order.id;
            torder.CloseDate     = order.closed_date.ToString();
            torder.CreateBy      = order.created_by;
            torder.CreateDate    = order.created_date.ToString();
            torder.OrderStaus    = order.order_status;
            torder.PaymentStatus = order.payment_status;
            torder.RecipientId   = order.recipient_id;
            torder.SenderId      = order.sender_id;
            torder.TotalCost     = double.Parse(order.total_cost.ToString());
            torder.TotalQuantity = order.total_quantity;
            torder.TotalValue    = double.Parse(order.total_value.ToString());
            torder.Destination   = order.tour_id;

            return(torder);
        }
Exemplo n.º 3
0
        public static RegularOrder ConvertToRegualrOrder(TRegularOrder order)
        {
            RegularOrder regularOrder = new RegularOrder();

            DateTime tempDate;

            regularOrder.id             = order.OrderId;
            regularOrder.created_by     = order.CreateBy;
            regularOrder.closed_date    = DateTime.TryParse(order.CloseDate, out tempDate) ? tempDate : (DateTime?)null;
            regularOrder.created_date   = DateTime.Parse(order.CreateDate);
            regularOrder.order_status   = order.OrderStaus;
            regularOrder.payment_status = order.PaymentStatus;
            regularOrder.recipient_id   = order.RecipientId;
            regularOrder.sender_id      = order.SenderId;
            regularOrder.total_cost     = decimal.Parse(order.TotalCost.ToString());
            regularOrder.total_quantity = order.TotalQuantity;
            regularOrder.total_value    = decimal.Parse(order.TotalValue.ToString());
            regularOrder.tour_id        = order.Destination;

            return(regularOrder);
        }