Beispiel #1
0
 private void ShowCurrentOrderInfo()
 {
     if (Model.CurrentOrderHeader != null)
     {
         using (var oc = Model.UnityContainer.Resolve <OrderDataContext>())
         {
             var data =
                 Utility.StringToDictObj(Model.ManagerType == OrderManagerType.OrderManager ? oc.DataBaseContext.GetOrderInfo(Model.CurrentOrderHeader.IdOrderHeader) : oc.DataBaseContext.GetPreOrderInfo(Model.CurrentOrderHeader.IdOrderHeader));
             using (var dw = new DataUiViewer(new UcOrderInfo(data)))
             {
                 dw.Text = @"Информация о заказе";
                 dw.ShowDialog();
             }
         }
     }
 }
Beispiel #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();
            }
        }
Beispiel #3
0
 private void ShowCurrentOrderInfo()
 {
     if (Model.CurrentOrderHeader != null)
     {
         using (var oc = Model.UnityContainer.Resolve<OrderDataContext>())
         {
             var data =
                 Utility.StringToDictObj(Model.ManagerType == OrderManagerType.OrderManager ? oc.DataBaseContext.GetOrderInfo(Model.CurrentOrderHeader.IdOrderHeader) : oc.DataBaseContext.GetPreOrderInfo(Model.CurrentOrderHeader.IdOrderHeader));
             using (var dw = new DataUiViewer(new UcOrderInfo(data)))
             {
                 dw.Text = @"Информация о заказе";
                 dw.ShowDialog();
             }
         }
     }
 }
Beispiel #4
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();

            }
        }