Exemple #1
0
        public List <material_herramienta> lista_mat()
        {
            mhc = dm.Getmaterial_herramientaCollection().FilterByestado(true);
            List <material_herramienta> lp = mhc.Cast <material_herramienta>().ToList();

            return(lp);
        }
Exemple #2
0
        public void insertar_material(string nom, string marca, int id_prov, double valor)
        {
            mhc = dm.Getmaterial_herramientaCollection();
            List <material_herramienta> lp = mhc.Cast <material_herramienta>().ToList();
            int id;

            if (lp.Count == 0)
            {
                id = 1;
            }
            else
            {
                id = lp.Last().id + 1;
            }
            dm.Newmaterial_herramienta(id, nom, marca, id_prov, valor, true);
            dm.CommitAll();
        }