private void Window_Loaded(object sender, RoutedEventArgs e) { if (objSlotDba == null) { objSlotDba = new SlotDba(); } objSlotData = objSlotDba.GetSlotDetails(objSlotData.SlotFloor, objSlotData.SlotAisle, objSlotData.SlotRow); this.slot_floor_text.Text = objSlotData.SlotFloor.ToString(); this.slot_aisle_text.Text = objSlotData.SlotAisle.ToString(); this.slot_row_text.Text = objSlotData.SlotRow.ToString(); if (objSlotData.SlotStatus == 0) { normalRadio.IsChecked = true; } else if (objSlotData.SlotStatus == 1) { } else if (objSlotData.SlotStatus == 2) { objSlotData.ObjCarData = objSlotDba.GetSlotCarDetails(objSlotData.slotValue); // this.ucCarData.SetCarData(objSlotData.ObjCarData); carRadio.IsChecked = true; } else if (objSlotData.SlotStatus == 3) { palletRadio.IsChecked = true; } disableCheck.IsChecked = objSlotData.Disable; rehandleCheck.IsChecked = objSlotData.Rehandle; this.ucCarData.retrieveEventHandler += ucCarData_retrieveEventHandler; }
public void DoTransferCar(int fromFloor, int fromAisle, int fromRow, int toFloor, int toAisle, int toRow) { if (objSlotDba == null) { objSlotDba = new SlotDba(); } if (toAisle > 0 && toRow > 0 && fromAisle > 0 && fromRow > 0) { if (!(toAisle == fromAisle && toRow == fromRow && fromFloor == toFloor)) { if (MessageBox.Show("Transfer from " + fromFloor + "/" + fromAisle + "/" + fromRow + " to " + toFloor + "/" + toAisle + "/" + toRow + "?", "Information", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) { int clickTransferQueueId = 0; clickTransferQueueId = objSlotDba.GetInsertQueueClickTransferId(fromFloor, fromAisle, fromRow, toFloor, toAisle, toRow); if (clickTransferQueueId > 0) { MessageBox.Show("TransferId =" + clickTransferQueueId, "Information", MessageBoxButton.OK); } else { MessageBox.Show("Not valid slot.", "Information", MessageBoxButton.OK); } } } } else { MessageBox.Show("Not valid data", "Information", MessageBoxButton.OK); } }
private void expandZoneCheck_Checked(object sender, RoutedEventArgs e) { if ((bool)customizeRadio.IsChecked) { if (objSlotDba == null) { objSlotDba = new SlotDba(); } objSlotDba.SetZoneExpandStatus(true); expandZoneCheck.IsChecked = objSlotDba.GetZoneExpandStatus(); } }
public void InitialUpdateAllSlots() { if (objSlotDba == null) { objSlotDba = new SlotDba(); } List <SlotData> slotDataList = objSlotDba.GetSlotDetailsWrtFloor(Floor); foreach (SlotData objSlotData in slotDataList) { UpdateSlotInScreen(objSlotData); } }
private void expandZoneCheck_Unchecked(object sender, RoutedEventArgs e) { if ((bool)customizeRadio.IsChecked) { if (objSlotDba == null) { objSlotDba = new SlotDba(); } CheckBox expandCheck = (CheckBox)sender; objSlotDba.SetZoneExpandStatus((bool)expandCheck.IsChecked); expandZoneCheck.IsChecked = objSlotDba.GetZoneExpandStatus(); } }
private void expandNumberText_PreviewKeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (objSlotDba == null) { objSlotDba = new SlotDba(); } int expandNumber = 0; if (int.TryParse(expandNumberText.text1.Text, out expandNumber)) { objSlotDba.SetZoneExpandNumber(expandNumber); } expandNumberText.text1.Text = objSlotDba.GetZoneExpandNumber().ToString(); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (objdbProcCon == null) { objdbProcCon = new Connection(); } if (objCustomerDba == null) { objCustomerDba = new CustomerDba(); } if (objSlotDba == null) { objSlotDba = new SlotDba(); } }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (objSlotDba == null) { objSlotDba = new SlotDba(); } if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } InitialUpdateAllSlots(); objSlotDba.triggerSlotUpdate += new EventHandler(Handle_triggerSlotUpdate); objGeneralDba.UnRegisterDBNotification(); objSlotDba.RegisterSlotDetailsWrtFloorNotification(Floor); InitializeCMSettings(); }
public void Handle_triggerSlotUpdate(object sender, EventArgs e) { if (objSlotDba == null) { objSlotDba = new SlotDba(); } SlotData objSlotData = (SlotData)sender; if (objSlotData.SlotFloor == Floor) { CarData objCarData = objSlotDba.GetSlotCarDetails(objSlotData.slotValue); objSlotData.ObjCarData = objCarData; slotPanel.Dispatcher.BeginInvoke(new Action(() => { UpdateSlotInScreen(objSlotData); })); } }
private void LoadDefaultZoneData() { if (objSlotDba == null) { objSlotDba = new SlotDba(); } List <EESZoneData> zoneList = null; zoneList = objSlotDba.GetEESDefaultZoneList(); PopulateZoneData(zoneList); expandNumberText.text1.Text = "6"; expandZoneCheck.IsChecked = true; basementGroup.IsEnabled = false; nonBasementGroup.IsEnabled = false; expandGroup.IsEnabled = false; defaultRadio.IsChecked = true; }
private void LoadCustomizedZoneData() { if (objSlotDba == null) { objSlotDba = new SlotDba(); } List <EESZoneData> zoneList = null; zoneList = objSlotDba.GetEESCustomizedZoneList(); PopulateZoneData(zoneList); expandNumberText.text1.Text = objSlotDba.GetZoneExpandNumber().ToString(); expandZoneCheck.IsChecked = objSlotDba.GetZoneExpandStatus(); basementGroup.IsEnabled = true; nonBasementGroup.IsEnabled = true; expandGroup.IsEnabled = true; customizeRadio.IsChecked = true; }
private void EES_nonbase_ref_aisle_PreviewKeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (objSlotDba == null) { objSlotDba = new SlotDba(); } string sourceName = null; string EESName = null; string textValue; int number = 0; LabelTextBox objTextBox = sender as LabelTextBox; sourceName = objTextBox.Name; EESName = sourceName.Split('_')[0]; if (int.TryParse(objTextBox.text1.Text, out number)) { objSlotDba.SetCustomizedNonBaseRefAisle(EESName, number); } objTextBox.text1.Text = objSlotDba.GetCustomizedNonBaseRefAisle(EESName).ToString(); } }
private void ShowCurrentSlotSelectionData() { if (objSlotDba == null) { objSlotDba = new SlotDba(); } SELECTION_TYPE selEnum = (SELECTION_TYPE)objSlotDba.GetSlotSelectionType(); if (selEnum == SELECTION_TYPE.CUSTOM) { LoadCustomizedZoneData(); selectionTypeText.Text = "CUSTOM"; } else if (selEnum == SELECTION_TYPE.PEAK) { LoadPeakHourZoneData(); selectionTypeText.Text = "PEAK HOUR"; } else { LoadDefaultZoneData(); selectionTypeText.Text = "DEFAULT"; } }
private void Button_Click(object sender, RoutedEventArgs e) { MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Do you want to change slot selection logic?", "Slot selection Confirmation", System.Windows.MessageBoxButton.YesNo); if (messageBoxResult == MessageBoxResult.Yes) { if (objSlotDba == null) { objSlotDba = new SlotDba(); } int selType = (int)SELECTION_TYPE.DEFAULT; if ((bool)peakHourRadio.IsChecked) { selType = (int)SELECTION_TYPE.PEAK; } else if ((bool)customizeRadio.IsChecked) { selType = (int)SELECTION_TYPE.CUSTOM; } objSlotDba.SetSlotSelectionType(selType); ShowCurrentSlotSelectionData(); } }
private void Button_Click(object sender, RoutedEventArgs e) { if (objSlotDba == null) { objSlotDba = new SlotDba(); } if (objSlotData.ObjCarData == null) { objSlotData.ObjCarData = new CarData(); } if ((bool)normalRadio.IsChecked) { objSlotData.SlotStatus = 0; } else if ((bool)carRadio.IsChecked) { objSlotData.SlotStatus = 2; objSlotData.ObjCarData = this.ucCarData.GetCarData(); } else if ((bool)palletRadio.IsChecked) { objSlotData.SlotStatus = 3; } objSlotData.Disable = (bool)disableCheck.IsChecked; objSlotData.Rehandle = (bool)rehandleCheck.IsChecked; Hashtable result = objSlotDba.UpdateSlot(objSlotData); if (int.Parse(result["result"].ToString()) != 1) { MessageBox.Show(result["resultMsg"].ToString()); } else { this.Close(); } }