private void UserControl_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
        {
            ReallocatePop objReallocatePop = null;

            objReallocatePop = new ReallocatePop();
            if (objVLCDba == null)
            {
                objVLCDba = new VLCDba();
            }
            if (objGeneralDba == null)
            {
                objGeneralDba = new GeneralDba();
            }

            bool isBlocked   = false;
            int  requestType = -1;

            isBlocked    = objVLCDba.GetVLCBlockedStatus(this.MachineCode);
            this.QueueId = objVLCDba.GetVLCQueueId(this.MachineCode);
            requestType  = this.QueueId != 0 ? objGeneralDba.GetRequestType(this.QueueId) : -1;
            if (isBlocked && QueueId != 0 && (requestType == 1 || requestType == 0 || requestType == 5 || requestType == 6))
            {
                objReallocatePop.MachineCode    = this.MachineCode;
                objReallocatePop.MachineChannel = this.MachineChannel;
                objReallocatePop.QueueId        = this.QueueId;
                objReallocatePop.Show();
            }
        }
Exemple #2
0
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     if (objERPDba == null)
     {
         objERPDba = new ERPDba();
     }
     if (objVLCDba == null)
     {
         objVLCDba = new VLCDba();
     }
     try
     {
         hostListView.Child = wgrid;
         // wgrid.dataGridView1.DataSource = GetERPTasks("").DefaultView;
         objDataTable = GetERPTasks();
         if (objDataTable != null && objDataTable.Columns.Count != 0)
         {
             wgrid.dataGridView1.DataSource = objDataTable.DefaultView;
         }
         //RefreshGrid();
         SetGridColumnSize();
         ColumnStatus();
         ChangeProcessingRecordBackColor();
         DoOnLoad();
     }
     catch (Exception errMsg)
     {
         MessageBox.Show(errMsg.Message);
     }
     finally
     {
     }
 }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     if (objGeneralDba == null)
     {
         objGeneralDba = new GeneralDba();
     }
     if (objVLCDba == null)
     {
         objVLCDba = new VLCDba();
     }
     lblMachineName.Content = this.MachineCode;
     SetTriggerStatus(objGeneralDba.GetMachineTriggerStatus(this.MachineCode));
     SetEnableStatus(objVLCDba.GetVLCEnabledStatus(this.MachineCode));
 }
        private void chkStatus_Checked(object sender, RoutedEventArgs e)
        {
            RadioButton radio = sender as RadioButton;

            if (objVLCDba == null)
            {
                objVLCDba = new VLCDba();
            }
            if (radio.Name.Equals(chkEnable.Name))
            {
                objVLCDba.SetVLCEnabledStatus(this.MachineCode, true);
            }
            else if (radio.Name.Equals(chkDisable.Name))
            {
                objVLCDba.SetVLCEnabledStatus(this.MachineCode, false);
            }
        }
        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);
        }