private void button1_Click(object sender, EventArgs e) { try { if (designTxt.Text == "") { MessageBox.Show("Avant de cliquez ici, completer le champs 'Designation'"); } else { Activites a = new Activites(); a.Activite = designTxt.Text; a.SaveDatas(a); DynamicClasses.GetInstance().Alert("Activité ajoutée", DialogForms.FrmAlert.enmType.Success); designTxt.Clear(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ShowAppointmentDetail(object sender, EventArgs e) { try { int appId = (int)((LinkLabel)sender).Tag; string sql = @"SELECT * FROM Affichage_Details_Activite WHERE Id=" + appId + ""; DataTable dt = DynamicClasses.GetInstance().QueryAsDataTable(sql); if (dt.Rows.Count > 0) { DataRow row = dt.Rows[0]; FrmActivites fr = new FrmActivites(); fr.id = Convert.ToInt32(row["Id"]); fr.descTxt.Text = row["Description"].ToString(); fr.activCombo.Text = row["Activite"].ToString(); fr.heureTxt.Text = row["HeureActivite"].ToString(); fr.dgDepart.Rows.Add(DynamicClasses.GetInstance().retourId(row["Departement"].ToString(), "@design", "GET_ID_DEPART"), row["Departement"].ToString()); fr.dateTxt.Value = Convert.ToDateTime(row["DateActivite"]); //fr.dateTxt.Enabled = false; fr.ShowDialog(); DisplayCurrentDate(); } } catch (Exception ex) { MessageBox.Show("L'erreur suivante est survenue lors du chargement des données de l'activité : " + ex.Message); } }
private void btnSave_Click(object sender, EventArgs e) { try { if (UserSession.GetInstance().Fonction == "Administrateur" || UserSession.GetInstance().Fonction == "SA") { if (nomsTxt.Text == "" || adresseTxt.Text == "" || fonctionTxt.Text == "" || phoneTxt.Text == "" || emailTxt.Text == "" || sexe == "") { DynamicClasses.GetInstance().Alert("Completez tous les champs !", DialogForms.FrmAlert.enmType.Info); } else if (passTxt.Text != "" && passConfTxt.Text != "") { if ((passTxt.Text != passConfTxt.Text)) { DynamicClasses.GetInstance().Alert("Vérifier passwords", DialogForms.FrmAlert.enmType.Warning); } else { SaveDatas(); } } } } catch (Exception ex) { MessageBox.Show("L'erreur suivant est survenue : " + ex.Message); } }
private void AddAppointmentToFlDay(int startDayAtFlNumber) { try { DateTime startDate = new DateTime(currentDate.Year, currentDate.Month, 1); DateTime endDate = startDate.AddMonths(1).AddDays(-1); string sql = @"SELECT * FROM Affichage_Details_Activite WHERE DateActivite BETWEEN '" + (startDate.ToString("yyyy-MM-dd")) + "' AND '" + (endDate.ToString("yyyy-MM-dd")) + "'"; DataTable dt = DynamicClasses.GetInstance().QueryAsDataTable(sql); foreach (DataRow row in dt.Rows) { DateTime appDay = Convert.ToDateTime(row["DateActivite"]); LinkLabel link = new LinkLabel(); link.Name = @"link" + row["Id"]; link.Text = row["Activite"].ToString(); link.Tag = row["Id"]; link.Click += (EventHandler)ShowAppointmentDetail; link.AutoSize = false; link.TextAlign = ContentAlignment.MiddleLeft; link.Size = new Size(104, 23); link.Font = new Font("Century Gothic", 8); listFlDay[(appDay.Day - 1) + (startDayAtFlNumber - 1)].Controls.Add(link); } } catch (Exception ex) { MessageBox.Show("L'erreur suivant est survenue lors de l'affectation des événements aux dates : " + ex.Message); } }
private void Enregistrer() { try { if (designTxt.Text == "") { DynamicClasses.GetInstance().Alert("Champs vides détectés", DialogForms.FrmAlert.enmType.Error); } else { TypeDepense typ = new TypeDepense(); typ.Id = id; typ.Designation = designTxt.Text; typ.SaveDatas(typ); DynamicClasses.GetInstance().Alert("Type save", DialogForms.FrmAlert.enmType.Success); designTxt.Clear(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void Enregistrer() { try { if (nomTxt.Text == "" || commTxt.Text == "" || accroTxt.Text == "" || addTxt.Text == "" || phoneTxt.Text == "" || phone2.Text == "" || mailTxt.Text == "" || siteTxt.Text == "") { DynamicClasses.GetInstance().Alert("Champs vides détectés", DialogForms.FrmAlert.enmType.Error); } else { Eglise m = new Eglise(); m.Nom = nomTxt.Text; m.Communaute = commTxt.Text; m.Acronyme = accroTxt.Text; m.Adresse = addTxt.Text; m.Telephone1 = phoneTxt.Text; m.Telephone2 = phone2.Text; m.Mail = mailTxt.Text; m.Logo = logo.Image; m.Siteweb = siteTxt.Text; m.Enregistrer(m); DynamicClasses.GetInstance().Alert("Infos save", DialogForms.FrmAlert.enmType.Success); SelectData(new Eglise()); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button1_Click(object sender, EventArgs e) { try { if (departTxt.Text == "") { DynamicClasses.GetInstance().Alert("Champs vide détecté", DialogForms.FrmAlert.enmType.Error); } else if (UserSession.GetInstance().Fonction == "Secrétaire" || UserSession.GetInstance().Fonction == "SA") { Departements depart = new Departements(); depart.Id = id; depart.Departement = departTxt.Text; depart.SaveDatas(depart); DynamicClasses.GetInstance().Alert("Département save", DialogForms.FrmAlert.enmType.Success); departTxt.Clear(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void Enregistrer() { try { DateTime datecelebr; datecelebr = Convert.ToDateTime(dateTxt.Text); if (refprev == 0 || datecelebr > DateTime.Today || pastTxt.Text == "") { MessageBox.Show("Impossible d'enregistrer, Champs vides ou dates supérieur", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Stop); } else if (UserSession.GetInstance().Fonction == "Secrétaire" || UserSession.GetInstance().Fonction == "SA") { FaireMariage fm = new FaireMariage(); fm.Id = id; fm.RefPrev = refprev; fm.DateMariage = Convert.ToDateTime(dateTxt.Text); fm.Pasteur = pastTxt.Text; fm.SaveDatas(fm); DynamicClasses.GetInstance().Alert(lblConjoint.Text + " mariés au " + dateTxt.Text, DialogForms.FrmAlert.enmType.Success); Initialiser(); this.Close(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void Enregistre() { try { DateTime datecelebr; datecelebr = Convert.ToDateTime(dateTxt.Text); if (lieuTxt.Text == "" || dateTxt.Text == "" || pastTxt.Text == "" || datecelebr < DateTime.Today) { MessageBox.Show("Impossible d'enregistrer, Champs vides ou dates supérieur", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Stop); } else { Mariage m = new Mariage(); m.Id = id; m.DateCelebration = Convert.ToDateTime(dateTxt.Text); m.Pasteur = pastTxt.Text; m.SaveDatas(m); DynamicClasses.GetInstance().Alert("Date mariage save", DialogForms.FrmAlert.enmType.Success); Initialise(); } } catch (Exception ex) { if (dateTxt.Text == " / /") { MessageBox.Show("Date vide"); } MessageBox.Show(ex.Message); } }
void Enregistrer() { try { DateTime datecelebr; datecelebr = Convert.ToDateTime(recptTxt.Text); if (lieuTxt.Text == "" || recptTxt.Text == "" || pastTxt.Text == "" || datecelebr < DateTime.Today) { MessageBox.Show("Impossible d'enregistrer, Champs vides ou dates supérieur", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Stop); } else if (UserSession.GetInstance().Fonction == "Secrétaire" || UserSession.GetInstance().Fonction == "SA") { Bapteme b = new Bapteme(); b.Id = Id; b.Lieu = lieuTxt.Text; b.DateCelebration = Convert.ToDateTime(recptTxt.Text); b.Pasteur = pastTxt.Text; b.SaveDatas(b); DynamicClasses.GetInstance().Alert("Programme save", DialogForms.FrmAlert.enmType.Success); Initialise(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void Enregistrer() { try { if (designTxt.Text == "") { DynamicClasses.GetInstance().Alert("Champs vides détectés", DialogForms.FrmAlert.enmType.Error); } else { SourceEntree source = new SourceEntree(); source.Id = id; source.Designation = designTxt.Text; source.SaveDatas(source); DynamicClasses.GetInstance().Alert("Source save", DialogForms.FrmAlert.enmType.Success); designTxt.Clear(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button1_Click(object sender, EventArgs e) { try { if (userTxt.Text == "" || passTxt.Text == "") { MessageBox.Show("Veuillez completez tout les champs svp !!!", "Erreur de connection", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { PubCon.testlog = DynamicClasses.GetInstance().loginTest(userTxt.Text, passTxt.Text); //Envoyer(); if (PubCon.testlog == 1) { ClsMonitoring mon = new ClsMonitoring(); mon.Operation = "Connexion"; mon.Enregistrer(mon); MessageBox.Show("La connection a reussie !!!", "Message Serveur...", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); //frm.Show(); } } } catch (Exception ex) { MessageBox.Show("L'erreur suivant est survenue : " + ex.Message); } }
void EnvoieMessage(string numero, string message) { ClsSMS sms = new ClsSMS(); sms.NumeroTutaire1 = numero; sms.CorpsMessage1 = message; sms.EtatSms1 = 0; sms.Utilisateur1 = UserSession.GetInstance().UserName; DynamicClasses.GetInstance().insert_Messagerie(sms); }
private void button2_Click_2(object sender, EventArgs e) { Repports rep = new Repports(); Fiche_Stock fiche_stock = new Fiche_Stock(); fiche_stock.SetDataSource(DynamicClasses.GetInstance().call_report("Affichage_Mouvement_Stock", "designationprod", lab_designation.Text.Trim())); rep.crystalReportViewer1.ReportSource = fiche_stock; rep.crystalReportViewer1.Refresh(); rep.Show(); }
private void btnSave_Click(object sender, EventArgs e) { if (UserSession.GetInstance().Fonction == "Administrateur") { Enregistrer(); } else { DynamicClasses.GetInstance().Alert("Niveau Admin requis", DialogForms.FrmAlert.enmType.Warning); } }
private void button1_Click(object sender, EventArgs e) { if (UserSession.GetInstance().Fonction == "Financier" || UserSession.GetInstance().Fonction == "SA") { Enregistrer(); } else { DynamicClasses.GetInstance().Alert("Niveau Finance Requis", DialogForms.FrmAlert.enmType.Warning); } }
private void button3_Click(object sender, EventArgs e) { groupBox_detail.Visible = false; groupBox_Fiche.Visible = true; Fiche_Stock_detail fiche = new Fiche_Stock_detail(); DynamicClasses.GetInstance().call_Rapport(code_prod); fiche.Database.Tables["ConsommationMoyenne"].SetDataSource(DynamicClasses.GetInstance().ds.Tables[0]); fiche.Database.Tables["Affichage_Mouvement_Stock"].SetDataSource(DynamicClasses.GetInstance().ds.Tables[1]); crystalReportViewer1.ReportSource = fiche; crystalReportViewer1.Refresh(); }
private void button1_Click(object sender, EventArgs e) { try { PubCon.testlog = DynamicClasses.GetInstance().loginTest(textBox1.Text, textBox2.Text); Envoyer(); if (PubCon.testlog == 1) { this.Close(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void timer1_Tick(object sender, EventArgs e) { try { //Refresh(new ClsSMS()); if (rbtnRecou.Checked == true) { DynamicClasses.GetInstance().SendSMSDettes(); } else if (rbtnAutre.Checked == true) { DynamicClasses.GetInstance().SendMessages(); } } catch (Exception ex) { //MessageBox.Show("L'erreur suivant est survenue : " + ex.Message); } }
void SaveDatas() { Utilisateurs ag = new Utilisateurs(); ag.Id = idAgent; ag.Noms = nomsTxt.Text; ag.Sexe = sexe; ag.Adresse = adresseTxt.Text; ag.Fonction = fonctionTxt.Text; ag.Telephone = phoneTxt.Text; ag.Email = emailTxt.Text; ag.Pseudo = userTxt.Text; ag.PassWord = passConfTxt.Text; ag.Photo = photo.Image; ag.Enreistrer(ag); DynamicClasses.GetInstance().Alert("Utilisateur save", DialogForms.FrmAlert.enmType.Success); Clear(); }
private void button1_Click(object sender, EventArgs e) { try { if (userTxt.Text == "" || passTxt.Text == "" || tontineCombo.Text == "") { MessageBox.Show("Veuillez completez tout les champs svp !!!", "Erreur de connection", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { PubCon.testlog = DynamicClasses.GetInstance().loginTest(userTxt.Text, passTxt.Text); InstantRound.GetInstance().Id = dn.retourId("Id", "TRound", "Designation", tontineCombo.Text); //Envoyer(); if (PubCon.testlog == 1) { if (UserSession.GetInstance().Etat == "Bloquer") { MessageBox.Show("Vous n'etes pas autorisez à vous connecter veuillez contacter un administrateur", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop); } else { MessageBox.Show("La connection a reussie !!!", "Message Serveur...", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); Principale_Form frm = new Principale_Form(); frm.ChargerUser(new UC_Home()); } //frm.Show(); } } } catch (Exception) { throw; } }
private void Enregistrer() { DateTime datenaissaissance; datenaissaissance = Convert.ToDateTime(naissTxt.Text); try { if (nomTxt.Text == "" || sex == "" || naissTxt.Text == "" || pereTxt.Text == "" || mereTxt.Text == "" || datenaissaissance.Date >= DateTime.Today) { MessageBox.Show("Impossible d'enregistrer, Champs obligatoires vides ou dates supérieur", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Stop); } else if (UserSession.GetInstance().Fonction == "Secrétaire" || UserSession.GetInstance().Fonction == "SA") { int dif = 0; dif = DateTime.Today.Year - datenaissaissance.Year; DateTime daterecpt; daterecpt = Convert.ToDateTime(recptTxt.Text); if (daterecpt > DateTime.Today) { MessageBox.Show("Impossible d'enregistrer une date de réception qui n'est pas encore arriver\n Laisser le champs date réception vide ou bien inserer une date valide", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop); } else if (daterecpt.Date <= datenaissaissance.Date) { MessageBox.Show("Impossible d'enregistrer une date de réception inférieur à la date de naissance\n Laisser le champs date réception vide ou bien inserer une date valide", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop); } else { if (dif < 5) { ReceptionEnfant r = new ReceptionEnfant(); r.Id = id; r.Noms = nomTxt.Text; r.Sexe = sex; r.DateNaissance = Convert.ToDateTime(naissTxt.Text); r.DateReception = Convert.ToDateTime(recptTxt.Text); r.ProvOrigine = provTxt.Text; r.TerrOrigine = terrTxt.Text; r.Pere = pereTxt.Text; r.Mere = mereTxt.Text; r.Pasteur = pastTxt.Text; r.SaveDatas(r); DynamicClasses.GetInstance().Alert("Enfant save", DialogForms.FrmAlert.enmType.Success); //Initialisation des champs Initialiser(); //Message de confirmation } else { MessageBox.Show("Seul les enfants de moins de 5ans sont acceptés", "Information", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void load_grid() { dataGridView1.DataSource = DynamicClasses.GetInstance().Load_data("Affichage_Mouvement_Stock"); }
void loadPhoto(string chamPhoto, string id, PictureBox pic) { DynamicClasses dn = new DynamicClasses(); dn.retreivePhoto(chamPhoto, "agent", "idagent", id, pic); }
void Load_Product() { dataGridView1.DataSource = DynamicClasses.GetInstance().Load_data("Affichage_Produit_Pv_Dexpir"); }
void loadPhoto(string id, PictureBox pic) { DynamicClasses dn = new DynamicClasses(); dn.retreivePhoto(id, pic, "SELECT_PHOTO"); }
private void button4_Click(object sender, EventArgs e) { DynamicClasses.GetInstance().Sortie_Entree_Sortie(); }