Exemple #1
0
        public bool Delete()
        {
            try
            {
                DALC.Admin p = CommonBC.SystemLeagueEntities.Admin.First(r => r.Id == Id);

                CommonBC.SystemLeagueEntities.Admin.Remove(p);
                CommonBC.SystemLeagueEntities.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Exemple #2
0
        public bool Update()
        {
            try
            {
                DALC.Admin p = CommonBC.SystemLeagueEntities.Admin.First(r => r.Id == Id);

                Nick  = p.Nick;
                Email = p.Email;
                Pass  = p.Pass;

                CommonBC.SystemLeagueEntities.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Exemple #3
0
        public bool Read()
        {
            try
            {
                DALC.Admin p = CommonBC.SystemLeagueEntities.Admin.First(r => r.Id == Id);

                Id            = p.Id;
                Nick          = p.Nick;
                Email         = p.Email;
                Pass          = p.Pass;
                FechaRegistro = p.FechaRegistro;

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Exemple #4
0
        //crud

        public bool Create()
        {
            try
            {
                DALC.Admin p = new DALC.Admin();

                p.Id            = Id;
                p.Nick          = Nick;
                p.Email         = Email;
                p.Pass          = Pass;
                p.FechaRegistro = FechaRegistro;

                CommonBC.SystemLeagueEntities.Admin.Add(p);
                CommonBC.SystemLeagueEntities.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }