コード例 #1
0
//*************** ОБРАБОТКА КНОПОК ******************************************

        //---- Button shows InsertDevice Form
        private void btn_show_insertForm_Click(object sender, RoutedEventArgs e)
        {
            if (tree_Devices.SelectedItem != null)
            {
                string s;
                int    typeID;

                if (SN.IsType)
                {
                    s      = SN.name;
                    typeID = SN.id;
                }
                else
                {
                    s      = SN.parentName;
                    typeID = SN.parentID;
                }

                show_InsertForm();
                show_Passport('W', typeID);
                tab_InsertDevice.Header = "Добавить в раздел \"" + s + "\"";
            }
            else
            {
                InfoWindow iw = new InfoWindow(Messages.m_Warning, Messages.m_treeItemIsNotSelected);
                iw.Show();
            }
        }
コード例 #2
0
 private void btn_deleteProducer_Click(object sender, RoutedEventArgs e)
 {
     producerType = list_Catalogs.SelectedItem as wsProducerType;
     if (producerType != null)
     {
         wc.ws_checkProducerAsync((int)producerType.ProducerID);
     }
     else
     {
         InfoWindow iw = new InfoWindow(Messages.m_Message, "Не выбран элемент для удаления");
         iw.Show();
     }
 }
コード例 #3
0
        void wc_ws_updateProducerCompleted(object sender, ws_updateProducerCompletedEventArgs e)
        {
            if (e.Result == 1)
            {
                InfoWindow iw = new InfoWindow(Messages.m_Message, Messages.m_ProduserUpdated);
                iw.Show();
            }
            else
            {
                cwnd_ShitHappens w = new cwnd_ShitHappens(ErrorResources.err_UPDATE, e.OpStatus.ToString());
                w.Show();
            }

            this.DialogResult = true;
        }
コード例 #4
0
        void wc_ws_updateProducerCompleted(object sender, ws_updateProducerCompletedEventArgs e)
        {

            if (e.Result == 1)
            {
                InfoWindow iw = new InfoWindow(Messages.m_Message, Messages.m_ProduserUpdated);
                iw.Show();
            }
            else
            {
                cwnd_ShitHappens w = new cwnd_ShitHappens(ErrorResources.err_UPDATE, e.OpStatus.ToString());
                w.Show();
            }

            this.DialogResult = true;
        }
コード例 #5
0
        void wc_ws_TestDBConnectionCompleted(object sender, WS_Link.ws_TestDBConnectionCompletedEventArgs e)
        {
            SolidColorBrush brush1 = new SolidColorBrush(Colors.Gray);

            if (e.Result != 0)
            {
                txt_result.Text           = e.OpStatus.ToString();
                brush1.Color              = Colors.Green;
                txt_AuthResult.Foreground = brush1;
            }
            else
            {
                brush1.Color          = Colors.Red;
                txt_result.Foreground = brush1;
                Views.InfoWindow iw = new Views.InfoWindow("Ошибка связи", e.OpStatus.ToString());
                iw.Show();
            }
        }
コード例 #6
0
 private void btn_deleteProducer_Click(object sender, RoutedEventArgs e)
 {
     producerType = list_Catalogs.SelectedItem as wsProducerType;
     if (producerType != null)
     {
         wc.ws_checkProducerAsync((int)producerType.ProducerID);
     }
     else
     {
         InfoWindow iw = new InfoWindow(Messages.m_Message,"Не выбран элемент для удаления");
         iw.Show();
     }
 }
コード例 #7
0
/********************************************* 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();
            }
        }
コード例 #8
0
ファイル: Index.xaml.cs プロジェクト: undejavue/SITbusiness
//*************** ОБРАБОТКА КНОПОК ******************************************

        //---- Button shows InsertDevice Form
        private void btn_show_insertForm_Click(object sender, RoutedEventArgs e)
        {
            
            if (tree_Devices.SelectedItem != null)
            {
                string s;
                int typeID;

                if (SN.IsType)
                {
                    s = SN.name;
                    typeID = SN.id;
                }
                else
                {
                    s = SN.parentName;
                    typeID = SN.parentID;
                }

                show_InsertForm();
                show_Passport('W', typeID);
                tab_InsertDevice.Header = "Добавить в раздел \"" + s + "\"";
            }
            else
            {
                InfoWindow iw = new InfoWindow(Messages.m_Warning, Messages.m_treeItemIsNotSelected);
                iw.Show();
            }
        }
コード例 #9
0
ファイル: Home.xaml.cs プロジェクト: undejavue/SITbusiness
        void wc_ws_TestDBConnectionCompleted(object sender, WS_Link.ws_TestDBConnectionCompletedEventArgs e)
        {
            SolidColorBrush brush1 = new SolidColorBrush(Colors.Gray);

            if (e.Result != 0)
            {
                txt_result.Text = e.OpStatus.ToString();
                brush1.Color = Colors.Green;
                txt_AuthResult.Foreground = brush1;
            }
            else
            {
                brush1.Color = Colors.Red;
                txt_result.Foreground = brush1;
                Views.InfoWindow iw = new Views.InfoWindow("Ошибка связи", e.OpStatus.ToString());
                iw.Show();
            }
        }