Ejemplo n.º 1
0
        public void GetAllProdusTest()
        {
            var list = Produs.GetAll();

            if (list == null)
            {
                Assert.Fail();
            }
        }
Ejemplo n.º 2
0
        private void searchProdusBtn_Click(object sender, EventArgs e)
        {
            var form = new SelectItemForm
            {
                Datas = Produs.GetAll().Cast <GestiuneObject>().ToList(),
                Text  = "Alegeti un produs"
            };

            if (form.ShowDialog() == DialogResult.OK)
            {
                SelectedProdus = form.SelectedObject == null ? null : (Produs)form.SelectedObject;
            }
        }
Ejemplo n.º 3
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();
 }
Ejemplo n.º 4
0
        public void CantitateDisponibilaProdusTest()
        {
            var produs = Produs.GetAll().FirstOrDefault();

            if (produs == null)
            {
                return;
            }
            try
            {
                var disp = produs.CantitateDisponibila();
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }
Ejemplo n.º 5
0
 private void RefreshProduseList(string filter = "")
 {
     produsBindingSource.DataSource = null;
     produsBindingSource.DataSource = Produs.GetAll().Where(p => p.Contains(filter));
 }
Ejemplo n.º 6
0
 private void RaportEvolutieVanzariControl_Load(object sender, EventArgs e)
 {
     chartVanzari.Series.Clear();
     produsBindingSource.DataSource = Produs.GetAll();
     intervalCmb.DataSource         = Enum.GetValues(typeof(IntervalType));
 }