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 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; }