private void RefreshFacturileMele() { facturaIntrareBindingSource.DataSource = null; var facturi = FacturaIntrare.GetAll().Where(p => p.SumaRamasaDePlatit > 0).ToList(); facturaIntrareBindingSource.DataSource = facturi; }
private void refreshBtn_Click(object sender, EventArgs e) { var raport = new DatoriiReport(); raport.FacturiIntrareDataSource.DataSource = FacturaIntrare.GetAll().Where(p => p.SumaRamasaDePlatit > 0).ToList(); reportViewer.Report = raport; reportViewer.RefreshReport(); }
public void GetAllFacturaIntrareTest() { var target = FacturaIntrare.GetAll(); if (target == null) { Assert.Fail(); } }
private void RefreshFacturiList(string filter = "") { facturiGrid.Rows.Clear(); int index = 0; foreach (var item in FacturaIntrare.GetAll().Where(p => p.Contains(filter))) { facturiGrid.Rows.Add(item.Serie, item.Numar, item.Data.ToString("dd/MM/yyyy"), item.FirmaObject.Nume); facturiGrid.Rows[index++].Tag = item; } }
private void LoadData() { progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca bancile..."; Banca.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca delegatii..."; Delegat.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca drepturile..."; Drept.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca facturile..."; FacturaIntrare.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca facturile..."; FacturaIesire.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca firmele..."; Firma.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca platile..."; Plata.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca platile..."; PlataFactura.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca platile..."; PozitieFacturaIesire.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca platile..."; PozitieFacturaIntrare.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca produsele..."; Produs.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca rolurile..."; Rol.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca platile..."; RolDrept.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca stocurile..."; Stoc.GetAll(); progressBar.Invoke(new UpdateDelegate(UpdateProgressBar)); runningOperationLbl.Text = "Se incarca utilizatorii..."; Utilizator.GetAll(); }
private void platesteAutomatBtn_Click(object sender, EventArgs e) { sumaPartialaTbox.Text = string.Empty; if (facturaIntrareBound == null) { return; } while (sumaDisponibila > 0) // ies daca nu mai am cu ce plati { var factura = FacturaIntrare.GetAll().OrderBy(p => p.Data).Where(p => p.SumaRamasaDePlatit > 0).FirstOrDefault(); if (factura == null) { return; // ies daca nu mai gasesc facturi de platit } if (!PlatesteFactura(factura)) { return; } } }