コード例 #1
0
        private void PlanificationArticlesKnco_Load(object sender, EventArgs e)
        {
            foreach (string item in Parametres.list)
            {
                comboBox1.Items.Add(item);
            }

            try
            {
                comboBox1.SelectedItem = Parametres.list.First();
                if (Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "intervalArticleKnco", "", null)) != null)
                {
                    label6.Text   = "Le " + Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "dayArticleKncos", "", null)) + "/" + Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "monthArticleKncos", "", null)) + "/" + Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "yearArticleKncos", "", null)) + " a " + Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "hourArticleKncos", "", null)) + ":" + Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "minArticleKncos", "", null));
                    textBox1.Text = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "intervalArticleKnco", "", null));
                    dataGridView1.Rows.Add(Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "debutArticleKnco", "", null)), Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "finArticleKnco", "", null)));
                    comboBox1.SelectedItem = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "intervalMinOrHourArticleKnco", "", null));
                    if ("MON" == Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "LundiArticleKnco", "", null)))
                    {
                        checkBox1.Checked = true;
                    }
                    if ("TUE" == Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "MardiArticleKnco", "", null)))
                    {
                        checkBox2.Checked = true;
                    }
                    if ("WED" == Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "MecrediArticleKnco", "", null)))
                    {
                        checkBox3.Checked = true;
                    }
                    if ("THU" == Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "JeudiArticleKnco", "", null)))
                    {
                        checkBox4.Checked = true;
                    }
                    if ("FRI" == Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "VendrediArticleKnco", "", null)))
                    {
                        checkBox5.Checked = true;
                    }
                    if ("SAT" == Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "SamediArticleKnco", "", null)))
                    {
                        checkBox6.Checked = true;
                    }
                    if ("SUN" == Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "DimancheArticleKnco", "", null)))
                    {
                        checkBox7.Checked = true;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: KNC-SI/KNC-WEB-Connect
        private void Form1_Load(object sender, EventArgs e)
        {
            textBox11.Text = (string)Parametres.key.GetValue("ServeurMySql" + textBox12.Text);
            textBox10.Text = (string)Parametres.key.GetValue("UserMySql" + textBox12.Text);
            textBox9.Text  = (string)Parametres.key.GetValue("PassMySql" + textBox12.Text);

            //sap-sql
            textBox19.Text         = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "SQLServer", "", null));
            comboBox2.SelectedItem = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "TypeServeur", "", null));
            textBox18.Text         = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "SQLUser", "", null));
            textBox17.Text         = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "SQLPassword", "", null));
            if (Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "SQLAuthModeWindows", "", null)) != "False")
            {
                checkBox15.Checked = true;
            }
            else
            {
                checkBox15.Checked = false;
            }
            comboBox3.SelectedItem = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "SBODbCompany", "", null));
            comboBox1.SelectedItem = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "LicenceServer", "", null));
            textBox16.Text         = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "SBOUser", "", null));
            textBox15.Text         = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "SBOPassword", "", null));

            //mysql
            textBox7.Text  = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "Databasetest", "", null));
            textBox8.Text  = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "ServeurMySqltest", "", null));
            textBox13.Text = Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "UserMySqltest", "", null));
            textBox14.Text = Objets.StrDecrypt(Conversions.ToString(Objets.GlobalGetSettingtest("B1-Prestashop", "Config", "PassMySqltest", "", null)), Conversions.ToString(b1Prestashop_Tools.cleCrypt), false);
            Parametres.startservice("formload");
            if ("1" == ((string)Parametres.key.GetValue("active")))
            {
                pictureBox1.BackgroundImage = Properties.Resources.Cute_Ball_Go_icon_V;
                button26.Enabled            = false;
                button25.Enabled            = true;
            }
            else
            {
                pictureBox1.BackgroundImage = Properties.Resources.Cute_Ball_Shutdown_icon_R;
                button25.Enabled            = false;
                button26.Enabled            = true;
            }
        }