private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } _floor.Text = "FLOOR " + floor; VLC_Drive_01.IsChecked = objGeneralDba.GetFloorVLCStatus(floor, VLC_Drive_01.Name); VLC_Drive_02.IsChecked = objGeneralDba.GetFloorVLCStatus(floor, VLC_Drive_02.Name); VLC_Drive_03.IsChecked = objGeneralDba.GetFloorVLCStatus(floor, VLC_Drive_03.Name); VLC_Drive_04.IsChecked = objGeneralDba.GetFloorVLCStatus(floor, VLC_Drive_04.Name); VLC_Drive_05.IsChecked = objGeneralDba.GetFloorVLCStatus(floor, VLC_Drive_05.Name); VLC_Drive_06.IsChecked = objGeneralDba.GetFloorVLCStatus(floor, VLC_Drive_06.Name); VLC_Drive_01.Checked += VLC_Drive_Checked; VLC_Drive_01.Unchecked += VLC_Drive_Unchecked; VLC_Drive_02.Checked += VLC_Drive_Checked; VLC_Drive_02.Unchecked += VLC_Drive_Unchecked; VLC_Drive_03.Checked += VLC_Drive_Checked; VLC_Drive_03.Unchecked += VLC_Drive_Unchecked; VLC_Drive_04.Checked += VLC_Drive_Checked; VLC_Drive_04.Unchecked += VLC_Drive_Unchecked; VLC_Drive_05.Checked += VLC_Drive_Checked; VLC_Drive_05.Unchecked += VLC_Drive_Unchecked; VLC_Drive_06.Checked += VLC_Drive_Checked; VLC_Drive_06.Unchecked += VLC_Drive_Unchecked; }
private void UserControl_MouseRightButtonUp(object sender, MouseButtonEventArgs e) { if (objCMDba == null) { objCMDba = new CMDba(); } if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } bool isBlocked = false; int requestType = -1; isBlocked = objCMDba.GetCMBlockedStatus(this.MachineCode); this.QueueId = objCMDba.GetCMQueueId(this.MachineCode); requestType = this.QueueId != 0 ? objGeneralDba.GetRequestType(this.QueueId) : -1; if (isBlocked && QueueId != 0 && (requestType == 1 || requestType == 0 || requestType == 5 || requestType == 6 || requestType == 3)) //entry or exit { ReallocatePop objReallocatePop = null; objReallocatePop = new ReallocatePop(); objReallocatePop.MachineCode = this.MachineCode; objReallocatePop.MachineChannel = this.MachineChannel; objReallocatePop.QueueId = this.QueueId; objReallocatePop.Show(); } }
private void transfer_but_Click(object sender, RoutedEventArgs e) { if (objGeneralDba == null) objGeneralDba = new GeneralDba(); if(RequestType==3) { MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Do you want to transfer?", "Transfer Confirmation", System.Windows.MessageBoxButton.YesNo); if (messageBoxResult == MessageBoxResult.Yes) { //4: for transfer objGeneralDba.SetReallocateData(this.QueueId, this.MachineCode, 4); this.Close(); } } else { ChangeTotransferPop objPop = new ChangeTotransferPop(); objPop.MachineCode = this.MachineCode; objPop.QueueId = this.QueueId; objPop.ShowDialog(); this.Close(); } }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } if (objPSDba == null) { objPSDba = new PSDba(); } if (!objPSDba.GetPSSwitchOffStatus(this.MachineCode)) { AsynchReadSettingsForPS(); //pallet.Dispatcher.BeginInvoke(DispatcherPriority.Background, // new InvokeDelegate(SetPalletPresentStatus), GetPalletPresentStatusFromOpc()); } this.timerToUpdateStatus = new System.Timers.Timer(); this.timerToUpdateStatus.Enabled = true; this.timerToUpdateStatus.Interval = 3000; this.timerToUpdateStatus.Start(); this.timerToUpdateStatus.Elapsed += new System.Timers.ElapsedEventHandler(timerToUpdateStatus_Elapsed); }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (objEESDba == null) { objEESDba = new EESDba(); } if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } SetEESName(); try { AsynchReadSettingsForEES(); //pallet.Dispatcher.BeginInvoke(DispatcherPriority.Background, // new InvokeDelegate(SetPalletPresentStatus), GetPalletPresentStatusFromOpc()); } catch (Exception errMsg) { } this.timerToUpdateStatus = new System.Timers.Timer(); this.timerToUpdateStatus.Enabled = true; this.timerToUpdateStatus.Interval = 3000; this.timerToUpdateStatus.Start(); this.timerToUpdateStatus.Elapsed += new System.Timers.ElapsedEventHandler(timerToUpdateStatus_Elapsed); }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { //Console.WriteLine(objCarData.CardId); if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } }
private void refresh_but_Click(object sender, RoutedEventArgs e) { if (objGeneralDba == null) objGeneralDba = new GeneralDba(); //3: for reallocation objGeneralDba.SetReallocateData(this.QueueId,this.MachineCode,3); this.Close(); }
private void UserControl_Unloaded(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } objSlotDba.triggerSlotUpdate -= new EventHandler(Handle_triggerSlotUpdate); objGeneralDba.UnRegisterDBNotification(); TerminateCMSettings(); }
private void checkBut_Click(object sender, EventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } if (!string.IsNullOrEmpty(cardIdText.Text)) { MemberData objMemberData = objGeneralDba.GetMemberDetailsUsingCardId(cardIdText.Text); nameText.Text = objMemberData.memberName; plateText.Text = objMemberData.PlateNo; } }
private void UserControl_Unloaded(object sender, RoutedEventArgs e) { if (bgGrp1 != null) { bgGrp1.Dispose(); bgGrp1 = null; } timerToUpdateStatus.Stop(); timerToUpdateStatus.Dispose(); objCMDba = null; objGeneralDba = null; }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } if (objPVLDba == null) { objPVLDba = new PVLDba(); } lblMachineName.Content = this.MachineCode; SetTriggerStatus(objGeneralDba.GetMachineTriggerStatus(this.MachineCode)); SetEnableStatus(objPVLDba.GetPVLEnabledStatus(this.MachineCode)); }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } if (objEESDba == null) { objEESDba = new EESDba(); } lblMachineName.Content = this.MachineCode; this.triggerGrid.Visibility = Visibility.Hidden; // SetTriggerStatus(objGeneralDba.GetMachineTriggerStatus(this.MachineCode)); SetEnableStatus(objEESDba.GetEESEnabledStatus(this.MachineCode)); }
private void restart_but_Click(object sender, RoutedEventArgs e) { if (objGeneralDba == null) objGeneralDba = new GeneralDba(); MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure?", "RESTART Confirmation", System.Windows.MessageBoxButton.YesNo); if (messageBoxResult == MessageBoxResult.Yes) { //3: for reallocation objGeneralDba.SetReallocateData(this.QueueId, "SLOT", 3); this.Close(); } }
public ucMachineMaintenanceExcelMaping() { InitializeComponent(); if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } OnLoad(); hostListView.Child = wgrid; wgrid.dataGridView1.ReadOnly = false; LoadCMData(); wgrid.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnKeystroke; wgrid.dataGridView1.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(dataGridView1_CellValueChanged); }
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(); }
private void retrive_but_Click(object sender, RoutedEventArgs e) { if (objGeneralDba == null) objGeneralDba = new GeneralDba(); if (RequestType != 0) { MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Do you want to Retrieve?", "Retrieve Confirmation", System.Windows.MessageBoxButton.YesNo); if (messageBoxResult == MessageBoxResult.Yes) { //4: for transfer objGeneralDba.InsertQueue(this.CardId, 0); this.Close(); } } }
void timerToUpdateStatus_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { // cmLock.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(SetLockedStatus), objCMDba.GetCMBlockedStatus(MachineCode)); if (objCMDba == null) { objCMDba = new CMDba(); } if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } this.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(SetLockedStatus), objCMDba.GetCMBlockedStatus(MachineCode)); triggerStatus.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(SetTriggerStatus), objGeneralDba.GetMachineTriggerStatus(MachineCode)); disableGrid.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegate(SetDisableStatus), !objCMDba.GetCMEnabledStatus(MachineCode)); this.QueueId = objCMDba.GetCMQueueId(this.MachineCode); cardIdLabel.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new InvokeDelegateForString(SetCardId), objGeneralDba.GetCardIdFromQueue(this.QueueId)); }
public void SetHoldStatus() { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } if (objGeneralDba.GetHoldFlagStatus(QueueId)) { btnHold.Visibility = Visibility.Hidden; btnResume.Visibility = Visibility.Visible; } else { btnHold.Visibility = Visibility.Visible; btnResume.Visibility = Visibility.Hidden; } }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (objVLCDba == null) { objVLCDba = new VLCDba(); } if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } Task.Factory.StartNew(new Action(() => UserControl_Initialized())); AsynchReadSettingsForVLC(); this.timerToUpdateStatus = new System.Timers.Timer(); this.timerToUpdateStatus.Enabled = true; this.timerToUpdateStatus.Interval = 3000; this.timerToUpdateStatus.Start(); this.timerToUpdateStatus.Elapsed += new System.Timers.ElapsedEventHandler(timerToUpdateStatus_Elapsed); }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } machines = objGeneralDba.GetAllMachines(); machines.Add(filterMachineLabel); filterMachine.ItemsSource = machines; filterMachine.SelectedValue = filterMachineLabel; List <string> notifCategories = Enum.GetNames(typeof(NotificationData.errorCategory)).ToList(); notifCategories.Add(filterCategoryLabel); filterCategory.ItemsSource = notifCategories; filterCategory.SelectedValue = filterCategoryLabel; filterStartDate.Value = CommonMethods.AbsoluteStart(DateTime.Now); filterEndDate.Value = CommonMethods.AbsoluteEnd(DateTime.Now); FilterGrid(); }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (objCMDba == null) { objCMDba = new CMDba(); } if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } AsynchReadSettingsForCM(); SetRotationStatus(false); this.timerToUpdateStatus = new System.Timers.Timer(); this.timerToUpdateStatus.Enabled = true; this.timerToUpdateStatus.Interval = 3000; this.timerToUpdateStatus.Start(); this.timerToUpdateStatus.Elapsed += new System.Timers.ElapsedEventHandler(timerToUpdateStatus_Elapsed); }
private void Button_Click(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } decimal transId = 0; if (Decimal.TryParse(transIdText.Text, out transId)) { if (objGeneralDba.CompletePMSTask(transId)) { MessageBox.Show("Transaction completed successfully "); this.Close(); } else { MessageBox.Show("Error in completing transaction"); } } }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } // LoadLogData(0); LoadLogData(queueId); this.timerToUpdateGrid = new System.Timers.Timer(); this.timerToUpdateGrid.Enabled = true; this.timerToUpdateGrid.Interval = 10000; this.timerToUpdateGrid.Elapsed += new System.Timers.ElapsedEventHandler(timerToUpdateGrid_Elapsed); data = new ObservableCollection <DBLogData>(); this.dbLogGrid.ItemsSource = data; this.timerToUpdateGrid.Start(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (objGeneralDba == null) objGeneralDba = new GeneralDba(); RequestType=objGeneralDba.GetRequestType(QueueId); if (RequestType != 3 && RequestType != 1 && RequestType != 0) transfer_but.Visibility = Visibility.Hidden; if (RequestType == 3) { refresh_but.Visibility = Visibility.Hidden; restart_but.Visibility = Visibility.Hidden; } if (RequestType == 0) { retrive_but.Visibility = Visibility.Hidden; } lblMachineName.Content = this.MachineCode; CardId=objGeneralDba.GetCardIdFromQueue(QueueId); cardIdLabel.Content = CardId; }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } if (objCMDba == null) { objCMDba = new CMDba(); } lblMachineName.Content = this.MachineCode; SetTriggerStatus(objGeneralDba.GetMachineTriggerStatus(this.MachineCode)); SetEnableStatus(objCMDba.GetCMEnabledStatus(this.MachineCode)); if (this.MachineCode.Contains("LCM")) { SetRotatoinStatusToView(); } else { chkRotation.Visibility = Visibility.Hidden; } }
private void Button_Click(object sender, RoutedEventArgs e) { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } try { string retMsg = objGeneralDba.SaveChangeToTransferSlot(QueueId, int.Parse(toFloor.Text), int.Parse(toAisle.Text), int.Parse(toRow.Text)); if (retMsg.Equals("Success")) { objGeneralDba.SetReallocateData(QueueId, MachineCode, 4); this.Close(); } else { MessageBox.Show(retMsg); } } catch (FormatException ex) { MessageBox.Show("Please enter valid inputs"); } }
void InsertingRequest(QueueData objQueueData) { if (objEESDba == null) { objEESDba = new EESDba(); } if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } QueueData objQueueData1 = new QueueData(); string eesChannel = null; string eesCode = null; objEESDba.getEESParameters(gateNumber, out eesChannel, out eesCode); objQueueData1.eesNumber = gateNumber; objQueueData1.requestType = 1; objQueueData1.customerId = objQueueData.customerId; objQueueData1.patronName = objQueueData.patronName; objQueueData1.plateNumber = objQueueData.plateNumber; objQueueData1.needSimulation = objQueueData.needSimulation; objQueueData1.needWash = objQueueData.needWash; objQueueData1.isRotate = objQueueData.isRotate; objQueueData1.carType = objQueueData.carType; //if (IsHighCar(eesChannel, eesCode)) //{ // objQueueData1.carType = kioskSimulation.QueueData.CAR_TYPE.high; //} //else //{ // objQueueData1.carType = objQueueData.carType; //} objGeneralDba.InsertQueueForSimulation(objQueueData1); }
public void DoOnLoad() { if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } if (objEESDba == null) { objEESDba = new EESDba(); } try { SetFloorStatusInLoad(); AssignDBValuesToControls(); AssignToEESCombos(); AssignNormalModeEES(); SetStatusOfL2AutoScheduleToGui(); SelectTab(); initializeTimeSlider(); } catch (Exception ex) { } }
void ChangeProcessingRecordBackColor() { if (objNewConnection == null) { objNewConnection = new Connection(); } if (objEESDba == null) { objEESDba = new EESDba(); } if (objGeneralDba == null) { objGeneralDba = new GeneralDba(); } int queueId = 0; try { if (wgrid.dataGridView1.DataSource != null) { //for (int i = 0; i <= wgrid.dataGridView1.Rows.Count - 1; i++) //{ // if (Convert.ToString(wgrid.dataGridView1.Rows[i].Cells["PROCESS"].Value) == "REHNDLING") // { // wgrid.dataGridView1.Rows[i].Cells["PROCESS"].Style.ForeColor = System.Drawing.Color.White; // wgrid.dataGridView1.Rows[i].Cells["PROCESS"].Style.BackColor = System.Drawing.Color.DarkRed; // } //} int pathLockId = objGeneralDba.GetPathlockId(); for (int i = 0; i <= wgrid.dataGridView1.Rows.Count - 1; i++) { var grid = wgrid.dataGridView1; var processCell = grid.Rows[i].Cells["PROCESS"]; if (!Convert.ToString(grid.Rows[i].Cells["PROCESS"].Value).Equals("PROCESSING")) { processCell.Style.ForeColor = System.Drawing.Color.White; processCell.Style.SelectionForeColor = System.Drawing.Color.White; processCell.Style.BackColor = System.Drawing.Color.DarkCyan; processCell.Style.SelectionBackColor = System.Drawing.Color.DarkCyan; } var modeCell = grid.Rows[i].Cells["MODE"]; if (Convert.ToString(modeCell.Value) == "ENTRY") { modeCell.Style.ForeColor = System.Drawing.Color.DarkGreen; } else if (Convert.ToString(modeCell.Value) == "EXIT") { modeCell.Style.ForeColor = System.Drawing.Color.DarkRed; } var qCell = grid.Rows[i].Cells["TRANS ID"]; var snoCell = grid.Rows[i].Cells["S_NO"]; queueId = int.Parse(Convert.ToString(qCell.Value)); if (objNewConnection.IsTriggerEnabledUsingQueueId(queueId)) { snoCell.Style.BackColor = System.Drawing.Color.Red; snoCell.Style.SelectionBackColor = System.Drawing.Color.Red; } if (Convert.ToString(grid.Rows[i].Cells["HOLD_FLAG"].Value).Equals("1")) { snoCell.Style.BackColor = System.Drawing.Color.Yellow; snoCell.Style.SelectionBackColor = System.Drawing.Color.Yellow; } var washCell = grid.Rows[i].Cells["CAR WASH"]; if (Convert.ToString(washCell.Value) == "YES") { washCell.Style.BackColor = System.Drawing.Color.BlueViolet; } var timerCell = grid.Rows[i].Cells["TIMER"]; Int32 tempVal = 0; Int32.TryParse(timerCell.Value.ToString().Split(':')[0], out tempVal); if (tempVal >= 9) { timerCell.Style.ForeColor = System.Drawing.Color.Red; timerCell.Style.SelectionForeColor = System.Drawing.Color.Red; } var cmdCell = grid.Rows[i].Cells["L2 CMD"]; if (Convert.ToString(cmdCell.Value).Equals("Payment")) { gateForGrid = Convert.ToString(grid.Rows[i].Cells["GATE"].Value); char c = gateForGrid[gateForGrid.Length - 1]; wgrid.BeginInvoke(new InvokeDelegate(new Action(() => { objEESDba.getEESParameters(c - '0', out eesChannelForGrid, out eesCodeForGrid); if (GetInnerDoorBlockedStatus(eesChannelForGrid, eesCodeForGrid)) { cmdCell.Style.BackColor = System.Drawing.Color.Red; cmdCell.Style.SelectionBackColor = System.Drawing.Color.Red; } //else //{ // cmdCell.Style.BackColor = System.Drawing.Color.Green; // cmdCell.Style.SelectionBackColor = System.Drawing.Color.Green; //} }))); } var transIdCell = grid.Rows[i].Cells["TRANS ID"]; if (pathLockId != 0 && Convert.ToString(transIdCell.Value).Equals(pathLockId.ToString())) { transIdCell.Style.BackColor = System.Drawing.Color.LightCyan; transIdCell.Style.SelectionBackColor = System.Drawing.Color.LightCyan; } } } } catch (Exception errMsg) { Console.WriteLine(); } finally { } }