using System; using System.Windows; using System.Data; using SSWMS.Common; namespace SSWMS.Client { public partial class WAREHOUSE_CELL_STATUS : AvalonDock.DocumentContent { public WAREHOUSE_CELL_STATUS() { InitializeComponent(); DocumentContent_Loaded(null, null); } private void DocumentContent_Loaded(object sender, RoutedEventArgs e) { this.ucCellQuery.U_CellClick += ucCellQuery_U_CellClick; this.ucCellQuery.U_InitControl(); this.ucGridStorage.U_WindowName = "COMMON"; this.ucGridStorage.U_XmlTableName = "V_STORAGE_LIST"; this.ucGridStorage.U_TableName = "V_STORAGE_LIST"; this.ucGridStorage.U_OrderField = "STORAGE_LIST_ID"; this.ucGridStorage.U_AllowOperatData = false; this.ucGridStorage.U_Where = "1<>1"; this.ucGridStorage.U_InitControl(); } private void ucCellQuery_U_CellClick(WH_CELL wc) { try { string strSQL = string.Format("select top 1 STORAGE_ID from STORAGE_MAIN where CELL_CODE='{0}'", wc.CELL_CODE); DataTable dt = WCFChannel._I_BaseService.GetDataTable(strSQL); if (dt.Rows.Count > 0) { this.ucGridStorage.U_Where = String.Format("STORAGE_ID={0}", Convert.ToInt32(dt.Rows[0]["STORAGE_ID"])); this.ucGridStorage.U_InitControl(); } else { this.ucGridStorage.U_Where = "1<>1"; this.ucGridStorage.U_InitControl(); } } catch (Exception ex) { MessageDialog.ShowException(ex); } } } }