Exemple #1
0
        public static IrregularOrder ConvertToIrregularOrder(TIrregularOrder order)
        {
            IrregularOrder irregularOrder = new IrregularOrder();

            DateTime tempDate;

            irregularOrder.id                   = order.OrderId;
            irregularOrder.created_by           = order.CreateBy;
            irregularOrder.closed_date          = DateTime.TryParse(order.CloseDate, out tempDate) ? tempDate : (DateTime?)null;
            irregularOrder.created_date         = DateTime.Parse(order.CreateDate);
            irregularOrder.order_status         = order.OrderStaus;
            irregularOrder.payment_status       = order.PaymentStatus;
            irregularOrder.recipient_id_card_no = order.RecipientIdNo;
            irregularOrder.recipient_name       = order.RecipientName;
            irregularOrder.recipient_phone      = order.RecipientPhone;
            irregularOrder.recipient_address    = string.Empty;
            irregularOrder.sender_id_card_no    = order.SenderIdNo;
            irregularOrder.sender_name          = order.SenderName;
            irregularOrder.sender_phone         = order.SenderPhone;
            irregularOrder.sender_address       = string.Empty;
            irregularOrder.total_cost           = decimal.Parse(order.TotalCost.ToString());;
            irregularOrder.total_quantity       = order.TotalQuantity;
            irregularOrder.total_value          = decimal.Parse(order.TotalValue.ToString());
            irregularOrder.tour_id              = order.Destination;
            irregularOrder.confirmation_user_id = string.Empty;

            return(irregularOrder);
        }
Exemple #2
0
        public static TIrregularOrder ConvertToTIrregularOrder(IrregularOrder order, bool isDeleted)
        {
            TIrregularOrder tirregular = ConvertToTIrregularOrder(order);

            tirregular.IsDeleted = isDeleted;
            return(tirregular);
        }
Exemple #3
0
        public static TIrregularOrder ConvertToTIrregularOrder(IrregularOrder order)
        {
            TIrregularOrder torder = new TIrregularOrder();

            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.RecipientIdNo  = order.recipient_id_card_no;
            torder.RecipientName  = order.recipient_name;
            torder.RecipientPhone = order.recipient_phone;
            torder.SenderIdNo     = order.sender_id_card_no;
            torder.SenderName     = order.sender_name;
            torder.SenderPhone    = order.sender_phone;
            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);
        }