public async Task Execute(IJobExecutionContext context) { if ("1" == ((string)Parametres.key.GetValue("active"))) { string NameCron = "models"; Parametres.RunCommand(NameCron); Parametres.DerniereExecution(NameCron); } }
private void button29_Click(object sender, EventArgs e) { Parametres.key.SetValue("Database", textBox12.Text); Parametres.key.SetValue("ServeurMySql" + textBox12.Text, textBox11.Text); Parametres.key.SetValue("UserMySql" + textBox12.Text, textBox10.Text); Parametres.key.SetValue("PassMySql" + textBox12.Text, textBox9.Text); Parametres.Openconnection(textBox11.Text, textBox10.Text, textBox9.Text, textBox12.Text); //Parametres.Closeconnection(); }
private void button25_Click(object sender, EventArgs e) { Parametres.startservice(""); 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; } }
private void button50_Click(object sender, EventArgs e) { Objets.LocalSaveSetting("B1-Prestashop", "Config", "Databasetest", textBox7.Text); Objets.LocalSaveSetting("B1-Prestashop", "Config", "ServeurMySqltest", textBox8.Text); Objets.LocalSaveSetting("B1-Prestashop", "Config", "UserMySqltest", textBox13.Text); Objets.LocalSaveSetting("B1-Prestashop", "Config", "PassMySqltest", Objets.StrCrypt(textBox14.Text, Conversions.ToString(b1Prestashop_Tools.cleCrypt))); bool Connexion = Parametres.Openconnection(textBox8.Text, textBox13.Text, textBox14.Text, textBox7.Text); if (!Connexion) { Interaction.MsgBox("Connexion échouée : ", MsgBoxStyle.Exclamation, this.Text); } else { Interaction.MsgBox("Connexion réussie.", MsgBoxStyle.Information, this.Text); } }
private void button24_Click(object sender, EventArgs e) { foreach (Control c in groupBox3.Controls) { if (c is CheckBox) { CheckBox cb = (CheckBox)c; if (cb.Checked) { if (cb.Name != "checkBox11") { Parametres.RunCommand(cb.Name); Parametres.DerniereExecution(cb.Name); } } } } }
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; } }
private void button1_Click(object sender, EventArgs e) { try { Parametres.jours.Clear(); TimeSpan tstar = TimeSpan.Parse(dataGridView1.Rows[0].Cells[0].Value.ToString()); TimeSpan tend = TimeSpan.Parse(dataGridView1.Rows[0].Cells[1].Value.ToString()); if (tstar.CompareTo(tend) == -1) { if (Parametres.key.GetValue("intervalGamme") != null) { Parametres.deleteKey(Parametres.ValueKeyGamme); Parametres.ValueKeyGamme.Clear(); } if (!string.IsNullOrWhiteSpace(textBox1.Text)) { if (comboBox1.SelectedItem != null) { Parametres.key.SetValue("intervalGamme", textBox1.Text.ToString()); Parametres.key.SetValue("intervalMinOrHourGamme", comboBox1.SelectedItem); Parametres.key.SetValue("debutGamme", dataGridView1.Rows[0].Cells[0].Value.ToString()); Parametres.key.SetValue("finGamme", dataGridView1.Rows[0].Cells[1].Value.ToString()); Parametres.ValueKeyGamme.Add("intervalGamme"); Parametres.ValueKeyGamme.Add("intervalMinOrHourGamme"); Parametres.ValueKeyGamme.Add("debutGamme"); Parametres.ValueKeyGamme.Add("finGamme"); if (checkBox1.Checked) { Parametres.jours.Add(new jours() { Name = "LundiGamme", variable = "MON" }); } if (checkBox2.Checked) { Parametres.jours.Add(new jours() { Name = "MardiGamme", variable = "TUE" }); } if (checkBox3.Checked) { Parametres.jours.Add(new jours() { Name = "MecrediGamme", variable = "WED" }); } if (checkBox4.Checked) { Parametres.jours.Add(new jours() { Name = "JeudiGamme", variable = "THU" }); } if (checkBox5.Checked) { Parametres.jours.Add(new jours() { Name = "VendrediGamme", variable = "FRI" }); } if (checkBox6.Checked) { Parametres.jours.Add(new jours() { Name = "SamediGamme", variable = "SAT" }); } if (checkBox7.Checked) { Parametres.jours.Add(new jours() { Name = "DimancheGamme", variable = "SUN" }); } foreach (jours jour in Parametres.jours) { Parametres.key.SetValue(jour.Name, jour.variable); Parametres.ValueKeyGamme.Add(jour.Name); } Scheduler sc = new Scheduler(); int StratM = tstar.Minutes; int StartH = tstar.Hours; int EndM = tend.Minutes; int EndH = tend.Hours; sc.Start(StartH, StratM, EndH, EndM, int.Parse(textBox1.Text), new JobGamme(), Parametres.jours, comboBox1.SelectedItem.ToString()); } else { MessageBox.Show("Merci de Sélectionnez votre champ interval !!"); } } else { MessageBox.Show("Merci de remplir votre champ interval !!"); textBox1.Focus(); } } else { MessageBox.Show("Vérifier votre date !!"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }