Exemplo n.º 1
0
        public Form1()
        {
            #region enchegar
            db = new VeterianEntities();
            Debug.AutoFlush = true;
            InitializeComponent();
            CBTipoAnimal.Items.Add("default");
            setCBTipoAnimal();
            DTPtimeToday();
            CBTipoAnimal.SelectedIndex = CBTipoAnimal.FindStringExact("default");
            logs.crearLog("inicio correcto");
            //UltraGrid1 ug = new

            #endregion

            #region chequeoDB
            using (VeterianEntities db2 = new VeterianEntities())
            {
                var queryVet1 = (from p in db2.PET where p.PetName == "kira" select new { PetType = p.PetType }).FirstOrDefault();
                Console.WriteLine("PreChequeoQueryVet1 = {0}", queryVet1.PetType);
                MessageBox.Show("PreChequeoQueryVet1 = " + queryVet1.PetType);
                Debug.WriteLine("PreChequeoDebug--queryVet1 = " + queryVet1.PetType);
                Trace.WriteLine("PreChequeoTrace--queryVet1 = " + queryVet1.PetType);
            }

            #endregion
        }
Exemplo n.º 2
0
            public void getSQLDatePET2(ref VeterianEntities db, ref List <PET> listaMascotas, ref PET[] arrayPets)
            {
                listaMascotas = (from p in db.PET select p).ToList();

                Debug.Write("Listpet: ");
                foreach (var item in listaMascotas)
                {
                    //Console.WriteLine(item.PetID + "  " + item.PetName);
                    //Console.WriteLine(item.PetID + "  " + item.PetName);
                    Debug.Write(item.PetID.ToString().Trim() + "--" + item.PetName.ToString().Trim() + "  ");
                }
                Debug.WriteLine("");

                arrayPets = listaMascotas.ToArray();
                Debug.Write("Array: ");
                foreach (var item in arrayPets)
                {
                    Debug.Write(item.PetID.ToString().Trim() + "--" + item.PetName.ToString().Trim() + "   ");
                }
            }