Beispiel #1
0
        public OsnNadpisWindow(string projecPath)
        {
            InitializeComponent();

            project = new Data.ProjectDB(projecPath);

            //Заполнение граф окна значениями из базы данных проекта
            gr1aTextBox.Text         = project.GetOsnNadpisItem("1a").specificationValue;
            gr1bTextBox.Text         = "<Авто>";
            gr2TextBox.Text          = project.GetOsnNadpisItem("2").specificationValue;
            gr3TextBox.Text          = project.GetOsnNadpisItem("3").perechenValue;
            gr4aTextBox.Text         = project.GetOsnNadpisItem("4a").perechenValue;
            gr4bTextBox.Text         = project.GetOsnNadpisItem("4b").perechenValue;
            gr4cTextBox.Text         = project.GetOsnNadpisItem("4c").perechenValue;
            gr5TextBox.Text          = project.GetOsnNadpisItem("5").perechenValue;
            gr6TextBox.Text          = project.GetOsnNadpisItem("6").perechenValue;
            gr7TextBox.Text          = project.GetOsnNadpisItem("7").perechenValue;
            gr8TextBox.Text          = project.GetOsnNadpisItem("8").perechenValue;
            gr9TextBox.Text          = project.GetOsnNadpisItem("9").perechenValue;
            gr10TextBox.Text         = project.GetOsnNadpisItem("10").perechenValue;
            gr11aTextBox.Text        = project.GetOsnNadpisItem("11a").perechenValue;
            gr11bTextBox.Text        = project.GetOsnNadpisItem("11b").perechenValue;
            gr11cTextBox.Text        = project.GetOsnNadpisItem("11c").perechenValue;
            gr11dTextBox.Text        = project.GetOsnNadpisItem("11d").perechenValue;
            gr11eTextBox.Text        = project.GetOsnNadpisItem("11e").perechenValue;
            gr14aTextBox.Text        = project.GetOsnNadpisItem("14a").perechenValue;
            gr15aTextBox.Text        = project.GetOsnNadpisItem("15a").perechenValue;
            gr16aTextBox.Text        = project.GetOsnNadpisItem("16a").perechenValue;
            gr19SpecTextBox.Text     = project.GetOsnNadpisItem("19").specificationValue;
            gr19PerechenTextBox.Text = project.GetOsnNadpisItem("19").perechenValue;
            gr21SpecTextBox.Text     = project.GetOsnNadpisItem("21").specificationValue;
            gr21PerechenTextBox.Text = project.GetOsnNadpisItem("21").perechenValue;
            gr22SpecTextBox.Text     = project.GetOsnNadpisItem("22").specificationValue;
            gr22PerechenTextBox.Text = project.GetOsnNadpisItem("22").perechenValue;
            gr24TextBox.Text         = project.GetOsnNadpisItem("24").perechenValue;
            gr25SpecTextBox.Text     = project.GetOsnNadpisItem("25").specificationValue;
            gr25PerechenTextBox.Text = project.GetOsnNadpisItem("25").perechenValue;
            gr25VedomostTextBox.Text = project.GetOsnNadpisItem("25").vedomostValue;
            gr32TextBox.Text         = project.GetOsnNadpisItem("32").perechenValue;

            string perechenType = project.GetOsnNadpisItem("2").perechenValue;

            if (perechenType.Length >= 3)
            {
                perechenType = perechenType.Substring(perechenType.Length - 3, 3);
            }
            else
            {
                perechenType = "ПЭ3";
            }

            switch (perechenType)
            {
            case "ПЭ1":
                PerechenTypeComboBox.SelectedIndex = 0;
                break;

            case "ПЭ2":
                PerechenTypeComboBox.SelectedIndex = 1;
                break;

            case "ПЭ3":
                PerechenTypeComboBox.SelectedIndex = 2;
                break;

            case "ПЭ4":
                PerechenTypeComboBox.SelectedIndex = 3;
                break;

            case "ПЭ5":
                PerechenTypeComboBox.SelectedIndex = 4;
                break;

            case "ПЭ6":
                PerechenTypeComboBox.SelectedIndex = 5;
                break;

            case "ПЭ7":
                PerechenTypeComboBox.SelectedIndex = 6;
                break;

            case "ПЭ0":
                PerechenTypeComboBox.SelectedIndex = 7;
                break;
            }
        }
Beispiel #2
0
        public OsnNadpisWindow(string projecPath)
        {
            InitializeComponent();

            project = new Data.ProjectDB(projecPath);

            //Заполнение граф окна значениями из базы данных проекта
            gr1aTextBox.Text         = project.GetOsnNadpisItem("1a").specificationValue;
            gr1bTextBox.Text         = "<Авто>";
            gr2TextBox.Text          = project.GetOsnNadpisItem("2").specificationValue;
            gr3TextBox.Text          = project.GetOsnNadpisItem("3").perechenValue;
            gr4aTextBox.Text         = project.GetOsnNadpisItem("4a").perechenValue;
            gr4bTextBox.Text         = project.GetOsnNadpisItem("4b").perechenValue;
            gr4cTextBox.Text         = project.GetOsnNadpisItem("4c").perechenValue;
            gr5TextBox.Text          = project.GetOsnNadpisItem("5").perechenValue;
            gr6TextBox.Text          = project.GetOsnNadpisItem("6").perechenValue;
            gr7TextBox.Text          = project.GetOsnNadpisItem("7").perechenValue;
            gr8TextBox.Text          = project.GetOsnNadpisItem("8").perechenValue;
            gr9TextBox.Text          = project.GetOsnNadpisItem("9").perechenValue;
            gr10TextBox.Text         = project.GetOsnNadpisItem("10").perechenValue;
            gr11aTextBox.Text        = project.GetOsnNadpisItem("11a").perechenValue;
            gr11bTextBox.Text        = project.GetOsnNadpisItem("11b").perechenValue;
            gr11cTextBox.Text        = project.GetOsnNadpisItem("11c").perechenValue;
            gr11dTextBox.Text        = project.GetOsnNadpisItem("11d").perechenValue;
            gr11eTextBox.Text        = project.GetOsnNadpisItem("11e").perechenValue;
            gr14aTextBox.Text        = project.GetOsnNadpisItem("14a").perechenValue;
            gr15aTextBox.Text        = project.GetOsnNadpisItem("15a").perechenValue;
            gr16aTextBox.Text        = project.GetOsnNadpisItem("16a").perechenValue;
            gr19SpecTextBox.Text     = project.GetOsnNadpisItem("19").specificationValue;
            gr19PerechenTextBox.Text = project.GetOsnNadpisItem("19").perechenValue;
            gr21SpecTextBox.Text     = project.GetOsnNadpisItem("21").specificationValue;
            gr21PerechenTextBox.Text = project.GetOsnNadpisItem("21").perechenValue;
            gr22SpecTextBox.Text     = project.GetOsnNadpisItem("22").specificationValue;
            gr22PerechenTextBox.Text = project.GetOsnNadpisItem("22").perechenValue;
            gr24TextBox.Text         = project.GetOsnNadpisItem("24").perechenValue;
            gr25SpecTextBox.Text     = project.GetOsnNadpisItem("25").specificationValue;
            gr25PerechenTextBox.Text = project.GetOsnNadpisItem("25").perechenValue;
            gr25VedomostTextBox.Text = project.GetOsnNadpisItem("25").vedomostValue;
            gr32TextBox.Text         = project.GetOsnNadpisItem("32").perechenValue;
        }