using SSWMS.Common; using System; using System.Windows; namespace SSWMS.Client { public partial class WAREHOUSE_CELL_ENABLE : AvalonDock.DocumentContent { public WAREHOUSE_CELL_ENABLE() { InitializeComponent(); this.cbWarehouse.ItemsSource = SystemCodeData.DicDataView["WAREHOUSE_CODE"]; if (this.cbWarehouse.Items.Count > 0) { this.cbWarehouse.SelectedIndex = 0; } this.scCellStatus.U_CellClick += (wc) => { this.cbWarehouse.SelectedValue = wc.WAREHOUSE_CODE; this.tbStartX.Text = wc.CELL_X.ToString(); this.tbEndX.Text = wc.CELL_X.ToString(); this.tbStartY.Text = wc.CELL_Y.ToString(); this.tbEndY.Text = wc.CELL_Y.ToString(); this.tbStartZ.Text = wc.CELL_Z.ToString(); this.tbEndZ.Text = wc.CELL_Z.ToString(); this.tbRemark.Text = wc.CELL_REMARK; }; DocumentContent_Loaded(null, null); } private void DocumentContent_Loaded(object sender, RoutedEventArgs e) { this.scCellStatus.U_InitControl(); } private void bDisable_Click(object sender, RoutedEventArgs e) { try { string sResult = string.Empty; bool bResult = WCFChannel._I_CellService.UpdateCellFlag(this.cbWarehouse.SelectedValue.ToString(), SystemCode.FLAG.Disable, Convert.ToInt32(this.tbStartX.Text), Convert.ToInt32(this.tbEndX.Text), Convert.ToInt32(this.tbStartY.Text), Convert.ToInt32(this.tbEndY.Text), Convert.ToInt32(this.tbStartZ.Text), Convert.ToInt32(this.tbEndZ.Text), this.tbRemark.Text, out sResult); if (bResult) { this.scCellStatus.InitCell(); } MessageDialog.ShowResult(bResult, sResult); } catch (Exception ex) { MessageDialog.ShowException(ex); } } private void bEnable_Click(object sender, RoutedEventArgs e) { try { string sResult = string.Empty; this.tbRemark.Text = string.Empty; bool bResult = WCFChannel._I_CellService.UpdateCellFlag(this.cbWarehouse.SelectedValue.ToString(), SystemCode.FLAG.Enable, Convert.ToInt32(this.tbStartX.Text), Convert.ToInt32(this.tbEndX.Text), Convert.ToInt32(this.tbStartY.Text), Convert.ToInt32(this.tbEndY.Text), Convert.ToInt32(this.tbStartZ.Text), Convert.ToInt32(this.tbEndZ.Text), this.tbRemark.Text, out sResult); if (bResult) { this.scCellStatus.InitCell(); } MessageDialog.ShowResult(bResult, sResult); } catch (Exception ex) { MessageDialog.ShowException(ex); } } } }