Пример #1
0
        public override dynamic Restaurar()
        {
            Estoc estocDessat = new Estoc();

            try
            {
                BaseDeDades.Desconecta();
                BaseDeDades.Conecta();
                Recepta[]        receptes  = Recepta.ReceptesDessades(BaseDeDades);
                Producte[]       productes = Producte.ProductesDessats(BaseDeDades, receptes);
                UnitatProducte[] unitats   = UnitatProducte.UnitatsDessades(BaseDeDades, receptes, productes);
                estocDessat.Afegir(productes);
                //poso els objectes en el control!
                Afegir(receptes);
                for (int i = 0; i < receptes.Length; i++)
                {
                    foreach (Ingredient ingredient in receptes[i])
                    {
                        Afegir(ingredient);
                    }
                }
                Afegir(productes);
                Afegir(unitats);
            }
            catch { }
            return(estocDessat);
        }
Пример #2
0
 public static UnitatProducte[] UnitatsDessades(Gabriel.Cat.BaseDeDades baseDeDades)
 {
     Recepta[] receptesDessades = Recepta.ReceptesDessades(baseDeDades);
     return(UnitatsDessades(baseDeDades, receptesDessades, Producte.ProductesDessats(baseDeDades, receptesDessades)));
 }
Пример #3
0
 public static Producte[] ProductesDessats(Gabriel.Cat.BaseDeDades baseDeDades)
 {
     return(ProductesDessats(baseDeDades, Recepta.ReceptesDessades(baseDeDades)));
 }