Exemplo n.º 1
0
        private void ShowCompareViewer()
        {
            var ucCompare = new UcOrderCompare();
            BindingList <OrderTransferCompare> blc;

            using (var dw = new DataUiViewer(ucCompare))
            {
                using (var oc = Model.UnityContainer.Resolve <OrderDataContext>())
                {
                    var sl =
                        from s in
                        oc.DataBaseContext.sp_sel_OrderTransferCompare(Model.CurrentOrderHeader.IdOrderHeader)
                        //Guid.Parse("C1FB0325-6C2A-4C33-9F9D-03A8A4884E5D"))
                        select new OrderTransferCompare()
                    {
                        Active         = true,
                        Barcode        = s.Barcode,
                        Code           = s.Code,
                        DateDest       = s.DateDest,
                        DateSrc        = s.DateSrc,
                        Measure        = s.Measure,
                        Supplier       = s.Supplier,
                        QuantitySrc    = s.QuantitySrc,
                        QuantityInPack = s.QuantityInPack.GetValueOrDefault(0),
                        QuantityDest   = s.QuantityDest,
                        Price          = s.Price.GetValueOrDefault(0),
                        Name           = s.Name,
                        Group          = s.Group,
                        IsEqual        = s.QuantitySrc == s.QuantityDest
                    };

                    blc = new BindingList <OrderTransferCompare>(sl.ToList());
                }
                ucCompare.DataSource = blc;
                dw.ShowDialog();
            }
        }
Exemplo n.º 2
0
        private void ShowCompareViewer()
        {
            var ucCompare = new UcOrderCompare();
            BindingList<OrderTransferCompare> blc;

            using (var dw = new DataUiViewer(ucCompare))
            {
                using (var oc = Model.UnityContainer.Resolve<OrderDataContext>())
                {
                    var sl =
                        from s in
                            oc.DataBaseContext.sp_sel_OrderTransferCompare(Model.CurrentOrderHeader.IdOrderHeader)
                                //Guid.Parse("C1FB0325-6C2A-4C33-9F9D-03A8A4884E5D"))
                        select new OrderTransferCompare()
                                   {
                                       Active = true,
                                       Barcode = s.Barcode,
                                       Code = s.Code,
                                       DateDest = s.DateDest,
                                       DateSrc = s.DateSrc,
                                       Measure = s.Measure,
                                       Supplier = s.Supplier,
                                       QuantitySrc = s.QuantitySrc,
                                       QuantityInPack = s.QuantityInPack.GetValueOrDefault(0),
                                       QuantityDest = s.QuantityDest,
                                       Price = s.Price.GetValueOrDefault(0),
                                       Name = s.Name,
                                       Group = s.Group,
                                       IsEqual = s.QuantitySrc == s.QuantityDest
                                   };

                    blc = new BindingList<OrderTransferCompare>(sl.ToList());
                }
                ucCompare.DataSource = blc;
                dw.ShowDialog();

            }
        }