Esempio n. 1
0
        private void GetBrand(int?brandSysNo, string brandName)
        {
            BrandQueryFacade serviceFacade = new BrandQueryFacade(CurrentPage);
            BrandQueryFilter queryFilter   = new BrandQueryFilter();

            if (!string.IsNullOrEmpty(brandName))
            {
                queryFilter.BrandNameLocal = brandName;
            }
            if (brandSysNo.HasValue)
            {
                queryFilter.BrandSysNo = brandSysNo;
            }

            queryFilter.PagingInfo = new ECCentral.QueryFilter.Common.PagingInfo()
            {
                PageSize  = 10,
                PageIndex = 0
            };

            serviceFacade.QueryBrands(queryFilter, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                var vendorList = args.Result.Rows;
                if (vendorList != null)
                {
                    List <dynamic> rows = vendorList.ToList();
                    if (rows.Count > 0)
                    {
                        var row = rows[0];
                        this.SelectedBrandSysNo = row.SysNo.ToString();
                        this.SelectedBrandName  = row.BrandName_Ch;
                        ManufacturerSysNo       = row.ManufacturerSysNo;
                        ManufacturerName        = row.ManufacturerName;
                        if (selectedBrandCompletedHandler != null)
                        {
                            EventArgs argse = new EventArgs();
                            selectedBrandCompletedHandler(obj, args);
                        }
                    }
                    else
                    {
                        txtBrandNameLocal.Text  = "";
                        txtBrandSysNo.Text      = "";
                        this.SelectedBrandSysNo = "";
                        this.SelectedBrandName  = "";
                    }
                }
                else
                {
                    txtBrandNameLocal.Text  = "";
                    txtBrandSysNo.Text      = "";
                    this.SelectedBrandSysNo = "";
                    this.SelectedBrandName  = "";
                }
            });
        }
Esempio n. 2
0
        public UCBrandQuery()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(UCBrandQuery_Loaded);

            serviceFacade = new BrandQueryFacade(CurrentPage);
            queryFilter   = new BrandQueryFilter();
        }
Esempio n. 3
0
 void UCBrandPicker_Loaded(object sender, RoutedEventArgs e)
 {
     serviceFacade = new BrandQueryFacade(CurrentPage);
     queryFilter   = new BrandQueryFilter();
     this.Loaded  -= UCBrandPicker_Loaded;
 }