Ejemplo n.º 1
0
        private void cbox_ModelsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            wsSimpleItem si = cbox_ModelsList.SelectedItem as wsSimpleItem;

            if (si != null)
            {
                int id = (int)si.ID;
                globalListSubModels            = globalTreeModels.getListByLevel(2, id);
                cbox_SubModelsList.ItemsSource = globalListSubModels;
                if (cbox_SubModelsList.Items.Count > 0)
                {
                    cbox_SubModelsList.SelectedIndex = ScoDe.SetBoxIndex_wsSimpleItem(cbox_SubModelsList, Ex_Pass.DevSubModelID);
                }
                Ex_Pass.DevModel = si.Description;
            }
        }
Ejemplo n.º 2
0
        void wc_ws_selectPassport_EXCompleted(object sender, ws_selectPassport_EXCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                Ex_Pass = e.Result;

                grid_Passport_EX.DataContext = Ex_Pass;

                DBTree DBTREEmodels = new DBTree();

                DBTREEmodels.DBDATA = e.Result.tbl_Models;

                Node treeModels = new Node(DBTREEmodels.GetAnyNodeinDB);

                globalTreeModels            = treeModels;
                globalListModels            = globalTreeModels.getListByLevel(1, null);
                cbox_ModelsList.ItemsSource = globalListModels;

                //cbox_ProducersList.ItemsSource = Ex_Pass.list_Producers;
                //auto_DevDescrRU.ItemsSource = Ex_Pass.helper_DevDescr;

                if (cbox_ModelsList.Items.Count > 0)
                {
                    cbox_ModelsList.SelectedIndex = ScoDe.SetBoxIndex_wsSimpleItem(cbox_ModelsList, Ex_Pass.DevModelID);
                }

                if (cbox_ProducersList.Items.Count > 0)
                {
                    cbox_ProducersList.SelectedIndex = ScoDe.SetBoxIndex_wsProducerType(cbox_ProducersList, Ex_Pass.ProducerID);
                }
            }
            else
            {
                cwnd_ShitHappens w = new cwnd_ShitHappens(ErrorResources.err_SELECT, e.OpStatus.ToString());
                w.Show();
            }
        }
Ejemplo n.º 3
0
        void wc_ws_selectPassport_EXCompleted(object sender, ws_selectPassport_EXCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                Ex_Pass = e.Result;

                grid_Passport_EX.DataContext = Ex_Pass;

                DBTree DBTREEmodels = new DBTree();

                DBTREEmodels.DBDATA = e.Result.tbl_Models;

                Node treeModels = new Node(DBTREEmodels.GetAnyNodeinDB);

                globalTreeModels = treeModels;
                globalListModels = globalTreeModels.getListByLevel(1, null);
                cbox_ModelsList.ItemsSource = globalListModels;

                //cbox_ProducersList.ItemsSource = Ex_Pass.list_Producers;
                //auto_DevDescrRU.ItemsSource = Ex_Pass.helper_DevDescr;

                if (cbox_ModelsList.Items.Count > 0)
                {
                    cbox_ModelsList.SelectedIndex = ScoDe.SetBoxIndex_wsSimpleItem(cbox_ModelsList, Ex_Pass.DevModelID);
                }

                if (cbox_ProducersList.Items.Count > 0)
                {
                    cbox_ProducersList.SelectedIndex = ScoDe.SetBoxIndex_wsProducerType(cbox_ProducersList, Ex_Pass.ProducerID);
                }
            }
            else
            {
                cwnd_ShitHappens w = new cwnd_ShitHappens(ErrorResources.err_SELECT, e.OpStatus.ToString());
                w.Show();
            }            
        }