/********************************************* HANDLERS *******************************************************************/

        // --- Check ProducerType data before insert/update Passport
        void wc_ws_checkPassportProducerCompleted(object sender, ws_checkPassportProducerCompletedEventArgs e)
        {
            int    i = e.OpValue;
            string s = e.OpStatus;

            if (e.Result == 1)
            {
                switch (ucMode)
                {
                case 'U':     // mode_U
                    wc.ws_updatePassportAsync(Ex_Pass);
                    break;

                case 'W':     // mode_W
                    wc.ws_insertPassportAsync(Ex_Pass, (int)ucPID);
                    break;
                }
            }
            else if (e.OpValue == 50017)
            {
                InfoWindow w = new InfoWindow(Messages.m_Warning, e.OpStatus.ToString());
                w.Show();
            }
            else
            {
                cwnd_ShitHappens w = new cwnd_ShitHappens(ErrorResources.err_DB, e.OpStatus.ToString());
                w.Show();
            }
        }
/********************************************* HANDLERS *******************************************************************/ 

        // --- Check ProducerType data before insert/update Passport
        void wc_ws_checkPassportProducerCompleted(object sender, ws_checkPassportProducerCompletedEventArgs e)
        {
            int i = e.OpValue;
            string s = e.OpStatus;

            if (e.Result == 1)
            {
                switch (ucMode)
                {
                    case 'U': // mode_U
                        wc.ws_updatePassportAsync(Ex_Pass);
                        break;
                    case 'W': // mode_W
                        wc.ws_insertPassportAsync(Ex_Pass, (int)ucPID);
                        break;
                }
            }
            else if (e.OpValue == 50017)
            {
                InfoWindow w = new InfoWindow(Messages.m_Warning, e.OpStatus.ToString());
                w.Show();
            }
            else
            {
                cwnd_ShitHappens w = new cwnd_ShitHappens(ErrorResources.err_DB, e.OpStatus.ToString());
                w.Show();
            }
        }