Ejemplo n.º 1
0
        public Order SearchEditOrder(string whrSQLquery)
        {
            var _context = new DeluxeOrderManagementEntities();
            var order    = _context.usp_Get_Orders(whrSQLquery, string.Empty).Select(x =>
                                                                                     new Order
            {
                AnnouncemntId = x.AnnouncementId,
                OrderId       = x.OrderID,
                //VId = x.VId,
                Title                 = x.Title,
                OrderStatus           = x.OrderStatus,
                OrderCategory         = x.Category,
                Region                = x.Region,
                Territory             = x.Territory,
                Language              = x.Language,
                RequestNumber         = x.RequestNumber,
                MPO                   = x.MPO,
                HALID                 = x.HALID,
                VendorId              = x.VendorId,
                FirstAnnouncementDate = x.FirstAnnouncedDate != null ? x.FirstAnnouncedDate.Value.ToString("MM/dd/yyyy") : null,
                DueDate               = x.DeliveryDueDate != null ? x.DeliveryDueDate.Value.ToString("MM/dd/yyyy") : null,
                GreenlightSent        = x.GreenlightSenttoPackaging != null ? x.GreenlightSenttoPackaging.Value.ToString("MM/dd/yyyy") : null,
                GreenlightReceived    = x.GreenlightValidatedbyDMDM != null ? x.GreenlightValidatedbyDMDM.Value.ToString("MM/dd/yyyy") : null,
                DeliveryDate          = x.ActualDeliveryDate != null ? x.ActualDeliveryDate.Value.ToString("MM/dd/yyyy") : null,
                AssetRequired         = x.LanguageType,
                ESTUPC                = x.ESTUPC,
                VODUPC                = x.IVODUPC,
                LockedBy              = x.LockedBy,
                LockedOn              = x.LockedOn,
                IsLocked              = x.IsLocked
                                        //OrderType=x.OrderType
            }).FirstOrDefault();

            return(order);
        }