Beispiel #1
0
        void ImageStockPicker_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            UCStockSearch ucStockSearch = new UCStockSearch();

            ucStockSearch.SelectionMode = SelectionMode.Single;
            ucStockSearch.DialogHandle  = CurrentWindow.ShowDialog(ResStockPicker.Dialog_Title, ucStockSearch, OnDialogResult);
        }
Beispiel #2
0
        private void OnLoadStockByID(object sender, RestClientEventArgs <dynamic> args)
        {
            dynamic totalCount = args.Result.TotalCount;

            if (totalCount == 0)
            {
                //渠道库存ID不存在
                CurrentWindow.Alert(string.Format(ResStockPicker.Tip_StockIDNotExists, this.txtStockID.Text.Trim()), MessageType.Warning);
            }
            else if (totalCount > 1)
            {
                //同一渠道库存ID存在多个
                UCStockSearch ucStockSearch = new UCStockSearch();
                ucStockSearch.SelectionMode = SelectionMode.Single;
                ucStockSearch.BindDataGrid(totalCount, args.Result.Rows);
                ucStockSearch.DialogHandle = CurrentWindow.ShowDialog(ResStockPicker.Dialog_Title, ucStockSearch, OnDialogResult);
            }
            else
            {
                //渠道库存ID只存在一个
                StockVM selectedStock = DynamicConverter <StockVM> .ConvertToVM(args.Result.Rows[0]);

                this.StockSysNo = selectedStock.SysNo;
                OnStockSelected(selectedStock);
            }
        }