예제 #1
0
 private void MyInfoControl_Load(object sender, EventArgs e)
 {
     returnFromComboFlag   = true;
     firmeCmb.DataSource   = Firma.GetAll();
     firmeCmb.SelectedItem = Setare.GetSetare().MyFirma;
     returnFromComboFlag   = false;
 }
예제 #2
0
        private void RefreshFirmeList(string filter = "")
        {
            firmeGrid.Rows.Clear();
            int index = 0;

            foreach (var item in Firma.GetAll().Where(p => p.Contains(filter)))
            {
                firmeGrid.Rows.Add(item.Nume, item.Cui, item.Rc, item.Iban, item.Adresa, item.Telefon, item.DataInfiintarii.ToString("dd/MM/yyyy"), item.BancaObject.Nume, item.DelegatObject.Nume);
                firmeGrid.Rows[index++].Tag = item;
            }
        }
        private void searchFirmaBtn_Click(object sender, EventArgs e)
        {
            var form = new SelectItemForm
            {
                Datas = Firma.GetAll().Cast <GestiuneObject>().ToList(),
                Text  = "Cautare firma"
            };

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                SelectedFirma = form.SelectedObject == null ? null : (Firma)form.SelectedObject;
            }
        }
예제 #4
0
        private void searchBtn_Click(object sender, EventArgs e)
        {
            var form = new SelectItemForm
            {
                Datas = Firma.GetAll().Cast <GestiuneObject>().ToList(),
                Text  = "Cautare firma"
            };

            if (form.ShowDialog() == DialogResult.OK)
            {
                SelectedFirma = form.SelectedObject == null ? null : (Firma)form.SelectedObject;
                ClearAndEnableTextBoxes(nrTbox, serieTbox, sumaDisponibilaTbox, sumaPartialaTbox);
            }
        }
예제 #5
0
 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 refreshBtn_Click(object sender, EventArgs e)
        {
            var raport       = new DatoriiPeFirmeReport();
            var listaDatorii = new List <DatorieFirma>();

            foreach (var firma in Firma.GetAll())
            {
                var facturi     = FacturaIesire.GetAll().Where(p => p.IdFirma == firma.ID && p.SumaRamasaDePlatit > 0).ToList();
                var sumaPlatita = facturi.Sum(p => p.SumaPlatita);
                var sumaRamasa  = facturi.Sum(p => p.SumaRamasaDePlatit);
                listaDatorii.Add(new DatorieFirma
                {
                    NumeFirma   = firma.Nume,
                    SumaPlatita = sumaPlatita.ToString("0.00"),
                    SumaRamasa  = sumaRamasa.ToString("0.00")
                });
            }
            raport.DatoriiSource.DataSource = listaDatorii;
            reportViewer.Report             = raport;
            reportViewer.RefreshReport();
        }