using SSWMS.Common; using System; using System.Windows; using System.Windows.Input; using System.Data; using System.Collections.Generic; namespace SSWMS.Client { public partial class MANAGE_OUT_CELL_STOCK : AvalonDock.DocumentContent { public MANAGE_OUT_CELL_STOCK() { InitializeComponent(); this.cbEndDevice.ItemsSource = SystemCodeData.DicDataView["CELL_CODE_OUT_STOCK"]; //if (this.cbEndDevice.Items.Count > 0) //{ // this.cbEndDevice.SelectedIndex = 0; //} this.cbStockType.ItemsSource = SystemCodeData.DicDataView["GOODS_ID_STOCK"]; if (this.cbStockType.Items.Count > 0) { this.cbStockType.SelectedIndex = 0; } this.cbStockType.IsEnabled = false; } private void bOutCellStock_Click(object sender, RoutedEventArgs e) { try { if (this.cbEndDevice.SelectedIndex == -1) { MessageDialog.ShowException("请选择目标位置"); return; } if (this.cbStockType.SelectedIndex == -1) { MessageDialog.ShowException("请选择托盘类型"); return; } if (MessageDialog.ShowDialog("确认执行托盘出库")) { string sResult = string.Empty; bool bResult = WCFChannel._I_ManageService.ManageOutCell(string.Empty, this.cbEndDevice.SelectedValue as string, Convert.ToInt32(this.cbStockType.SelectedValue), 0, 0, SystemCode.MANAGE_TYPE.OutCell, MainApp._USER.USER_NAME, out sResult); MessageDialog.ShowResult(bResult, sResult); } } catch (Exception ex) { MessageDialog.ShowException(ex); } } private void bRefresh_Click(object sender, RoutedEventArgs e) { this.cbEndDevice.SelectedIndex = -1; this.cbStockType.SelectedIndex = -1; } } }