public static void FillReportFacture(string Ref) { CurrentLigneFactures = new DalFacture().GetLigneFacturesByFacture(Ref); string Date = CurrentLigneFactures.Rows[0][5].ToString(); string Montant = CurrentLigneFactures.Rows[0][3].ToString(); CurrentLigneFactures = MiseEnforme.AdaptDataTableLigneFacture(CurrentLigneFactures); System.Diagnostics.Process.Start(ExportDataTableToPdf(CurrentLigneFactures, Ref, Date, Montant)); }
public List<Article> GetArticleList() { List<Article> AllArticles = new List<Article>(); MySqlCommand = new SqlCommand("select * from [Article]"); dt = Connexion.FunctionToRead(MySqlCommand); dt = MiseEnforme.AdaptDataTableArticle(dt); foreach (DataRow row in dt.Rows) { AllArticles.Add(ConvertRowToArticle(row)); } return AllArticles; }
private void TxtSearch_TextChanged(object sender, EventArgs e) { if (string.IsNullOrEmpty(TxtSearch.Text.Trim())) { FillDtgListeLigneFactures(Fac.RefProp); } else { List <LigneFacture> Listefacture = new List <LigneFacture>(); Listefacture = MyFactureDal.GetLigneFacturesList(Fac.RefProp); var query = from o in Listefacture where o.RefProp.Contains(TxtSearch.Text) || o.PrixUProp >= float.Parse(TxtSearch.Text) || o.QuantProp >= Int32.Parse(TxtSearch.Text) select o; DtgListeLigneFacture.DataSource = MiseEnforme.AdaptDataTableLigneFacture(query.ToList()); } }
public void FillDtgListeLigneFactures(string RefFacture) { CurrentDataTableLigneFactures = new DalFacture().GetLigneFacturesByFacture(RefFacture); CurrentDataTableLigneFactures = MiseEnforme.AdaptDataTableLigneFacture(CurrentDataTableLigneFactures); if (CurrentDataTableLigneFactures.Rows.Count == 0) { Btn_Modifier.Enabled = false; Btn_Enregistrer.Enabled = false; Btn_SupprimerLF.Enabled = false; } else { Btn_Modifier.Enabled = true; Btn_Enregistrer.Enabled = true; Btn_SupprimerLF.Enabled = true; } DtgListeLigneFacture.DataSource = CurrentDataTableLigneFactures; }
public int FillDtgListeArticle() { CurrentDataTableArticle = new DALArticle().GetAllArticles(); CurrentDataTableArticleInit = CurrentDataTableArticle; CurrentDataTableArticle = MiseEnforme.AdaptDataTableArticle(CurrentDataTableArticle); dataGridView1.DataSource = CurrentDataTableArticle; if (CurrentDataTableArticle.Rows.Count == 0) { Btn_Modifier.Enabled = false; Btn_Supprimer.Enabled = false; } else { Btn_Modifier.Enabled = true; Btn_Supprimer.Enabled = true; } return(CurrentDataTableArticle.Rows.Count); }
public int FillDtgListeFacture() { CurrentDataTableFacture = new DalFacture().GetAllFacture(); CurrentDataTableFactureInit = CurrentDataTableFacture; CurrentDataTableFacture = MiseEnforme.AdaptDataTableFacture(CurrentDataTableFacture); DtgListeFactures.DataSource = CurrentDataTableFacture; if (CurrentDataTableFacture.Rows.Count == 0) { Btn_SuppF.Enabled = false; Btn_consulter.Enabled = false; Btn_Imprimer.Enabled = false; } else { Btn_SuppF.Enabled = true; Btn_consulter.Enabled = true; Btn_Imprimer.Enabled = true; } return(CurrentDataTableFacture.Rows.Count); }
private void TxtSearch_TextChanged(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(TxtSearch.Text.Trim())) { FillDtgListeFacture(); } else { List <Facture> Listefacture = new List <Facture>(); Listefacture = MyDALFacture.GetFactureList(); var query = from o in Listefacture where o.RefProp.Contains(TxtSearch.Text) || o.MontantProp == float.Parse(TxtSearch.Text) select o; DtgListeFactures.DataSource = MiseEnforme.AdaptDataTableFacture(query.ToList()); } } catch (Exception ex) { MessageBox.Show("Caractères invalide !!"); } }
private void Factures_Load(object sender, EventArgs e) { DtgListeFactures.DataSource = MiseEnforme.InitialiseDataGridFacture(CurrentDataTableFacture); FillDtgListeFacture(); }
private void Articles_Load(object sender, EventArgs e) { dataGridView1.DataSource = MiseEnforme.InitialiseDataGridArticle(CurrentDataTableArticle); FillDtgListeArticle(); }