Exemple #1
0
        public void QueryByStockShippingeInvoic(Vendor_ExVM vm, EventHandler <RestClientEventArgs <List <Vendor_ExInfo> > > callback)
        {
            var    data        = vm.ConvertVM <Vendor_ExVM, Vendor_ExInfo>();
            string relativeUrl = "/ExternalSYSService/ExternalSYS/QueryByStockShippingeInvoice";

            restClient.Query <List <Vendor_ExInfo> >(relativeUrl, data, callback);
        }
        private void hlbtnProductListEdit_Click(object sender, RoutedEventArgs e)
        {
            VendorAgentInfoVM        agentView = this.dataGrid.SelectedItem as VendorAgentInfoVM;
            VendorProductQueryFilter filter    = new VendorProductQueryFilter()
            {
                VendorManufacturerSysNo = agentView.ManufacturerInfo.SysNo,
                UserSysNo         = m_sysNo,
                C2SysNo           = int.Parse(agentView.C2SysNo),
                C3SysNo           = agentView.C3SysNo,
                VendorSysNo       = m_vm.VendorSysNo,
                ManufacturerSysNo = agentView.AgentSysNo,
            };
            Vendor_ExVM vm = new Vendor_ExVM()
            {
                VendorSysNo  = filter.VendorSysNo.Value,
                InvoiceType  = VendorInvoiceType.NEG,
                ShippingType = VendorShippingType.MET,//ShippingType = VendorShippingType.NEG,
                StockType    = VendorStockType.NEG
            };

            if (filter.VendorSysNo != null)
            {
                m_facade.QueryByStockShippingeInvoic(vm, (m, n) =>
                {
                    if (n.FaultsHandle())
                    {
                        return;
                    }
                    if (n.Result.Count > 0)
                    {
                        filter.VendorSysNo = 1;
                    }
                    m_facade.GetIsAuto(filter, (o, s) =>
                    {
                        if (s.FaultsHandle())
                        {
                            return;
                        }
                        filter.IsAuto           = (s.Result == 1) ? true : false;
                        UCProductCheck proCheck = new UCProductCheck(filter);
                        proCheck.Dialog         = CPApplication.Current.CurrentPage.Context.Window.ShowDialog(ResVendorInfo.Info_ProductListEdit, proCheck, (obj, args) =>
                        {
                            if (args.DialogResult == DialogResultType.OK)
                            {
                                dataGrid.Bind();
                            }
                        }, new Size(800, 700));
                    });
                });
            }
        }