Example #1
0
        private void bIngresar_Click(object sender, EventArgs e)
        {
            UsuariosCEN usuarioCEN = null;
            usuarioCEN = new UsuariosCEN();

            if (tbUsuario.Text != null && tbContraseña.Text != null)
            {
                if (usuarioCEN.Login(tbContraseña.Text, tbUsuario.Text) == true)
                {
                    MessageBox.Show("Bienvenido a Veterinary Manager");
                  //  MenuPrincipal menu = new MenuPrincipal();   Aqui he puesto el mdi para que vuelva a ser lo de siempre tengo que descomentar
                  //  menu.Visible = true;
                    MDIFomulario1 menu = new MDIFomulario1();
                    menu.Visible = true;
                    this.Dispose(false);
                }
                else
                {
                    MessageBox.Show("Login incorrecto");
                }
            }
        }
        public static void InitializeData()
        {
            /*PROTECTED REGION ID(initializeDataMethod) ENABLED START*/
            try
            {
                /*List<VeterinaryManagerGenNHibernate.EN.Mediaplayer.MusicTrackEN> musicTracks = new List<VeterinaryManagerGenNHibernate.EN.Mediaplayer.MusicTrackEN>();
                 * VeterinaryManagerGenNHibernate.EN.Mediaplayer.UserEN userEN = new VeterinaryManagerGenNHibernate.EN.Mediaplayer.UserEN();
                 * VeterinaryManagerGenNHibernate.EN.Mediaplayer.ArtistEN artistEN = new VeterinaryManagerGenNHibernate.EN.Mediaplayer.ArtistEN();
                 * VeterinaryManagerGenNHibernate.EN.Mediaplayer.MusicTrackEN musicTrackEN = new VeterinaryManagerGenNHibernate.EN.Mediaplayer.MusicTrackEN();
                 * VeterinaryManagerGenNHibernate.CEN.Mediaplayer.ArtistCEN artistCEN = new VeterinaryManagerGenNHibernate.CEN.Mediaplayer.ArtistCEN();
                 * VeterinaryManagerGenNHibernate.CEN.Mediaplayer.UserCEN userCEN = new VeterinaryManagerGenNHibernate.CEN.Mediaplayer.UserCEN();
                 * VeterinaryManagerGenNHibernate.CEN.Mediaplayer.MusicTrackCEN musicTrackCEN = new VeterinaryManagerGenNHibernate.CEN.Mediaplayer.MusicTrackCEN();
                 * VeterinaryManagerGenNHibernate.CEN.Mediaplayer.PlayListCEN playListCEN = new VeterinaryManagerGenNHibernate.CEN.Mediaplayer.PlayListCEN();
                 *
                 *              //Add Users
                 * userEN.Email = "*****@*****.**";
                 * userEN.Name = "user";
                 * userEN.Surname = "userSurname";
                 * userEN.Password = "******";
                 * userCEN.New_(userEN.Name, userEN.Surname, userEN.Email, userEN.Password);
                 *
                 * //Add Music Track1
                 * musicTrackEN.Id = "http://www2.b3ta.com/mp3/Beer Beer Beer (YOB mix).mp3";
                 * musicTrackEN.Format = "mp3";
                 * musicTrackEN.Lyrics = "Beer Beer Beer Beer Beer Beer ..";
                 * musicTrackEN.Name = "Beer Beer Beer";
                 * musicTrackEN.Company = "Company";
                 * musicTrackEN.Cover = "http://www.tomasabraham.com.ar/cajadig/2007/images/nro18-2/beer1.jpg";
                 * musicTrackEN.Price = 20;
                 * musicTrackEN.Rating = 5;
                 * musicTrackEN.CommunityRating = 5;
                 * musicTrackEN.Duration = 200;
                 * musicTrackCEN.New_(musicTrackEN.Id, musicTrackEN.Format, musicTrackEN.Lyrics, musicTrackEN.Name,
                 *  musicTrackEN.Company, musicTrackEN.Cover, musicTrackEN.CommunityRating, musicTrackEN.Rating,
                 *  musicTrackEN.Price, musicTrackEN.Duration);
                 * musicTracks.Add(musicTrackEN);
                 * musicTrackCEN.AsignUser(musicTrackEN.Id,userEN.Email);
                 *
                 * //Define Album
                 * //VeterinaryManagerGenNHibernate.CEN.Mediaplayer.AlbumCEN albumCEN = new VeterinaryManagerGenNHibernate.CEN.Mediaplayer.AlbumCEN();
                 * //albumCEN.New_("Album 1", "This is a Album 1", artists, musicTracks);*/
                UsuariosCEN usuarioCEN = new UsuariosCEN ();
                usuarioCEN.Nuevo_usuario ("a", "a");

                /*PROTECTED REGION END*/
            }
            catch (Exception ex)
            {
                System.Console.WriteLine (ex.InnerException);
                throw ex;
            }
        }