Пример #1
0
        public Cauthu[] GetPlayerr(string name)
        {
            var db     = new QLCTEntities1();
            var player = db.Cauthus.Where(item => item.TenCauThu.Equals(name)).ToArray();

            return(player);
        }
Пример #2
0
        public Cauthu GetPlayer(int id)
        {
            var db     = new QLCTEntities1();
            var player = db.Cauthus.Find(id);

            return(player);
        }
Пример #3
0
        public List <Cauthu> Getplayers()
        {
            var           db      = new QLCTEntities1();
            List <Cauthu> players = db.Cauthus.ToList();

            return(players);
        }
Пример #4
0
        public void DeletePlayer(int id)
        {
            var db     = new QLCTEntities1();
            var player = db.Cauthus.Find(id);

            db.Cauthus.Remove(player);
            db.SaveChanges();
        }
Пример #5
0
        public void EditPlayer(int id, string TenCauThu, string Gioitinh, DateTime NgaySinh, string Nickname, string Quequan, string ChieuCao, string Vitri, string Soao, string clb)
        {
            var db            = new QLCTEntities1();
            var currentPlayer = db.Cauthus.Find(id);

            currentPlayer.TenCauThu = TenCauThu;
            currentPlayer.Gioi_Tinh = Gioitinh;
            currentPlayer.NgaySinh  = NgaySinh;
            currentPlayer.Nickname  = Nickname;
            currentPlayer.Quequan   = Quequan;
            currentPlayer.Chieucao  = ChieuCao;
            currentPlayer.Vitri     = Vitri;
            currentPlayer.Soao      = Soao;
            currentPlayer.clb       = clb;

            db.Entry(currentPlayer).State = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
        }
Пример #6
0
        public void AddPlayer(string TenCauThu, string Gioitinh, DateTime NgaySinh, string Nickname, string Quequan, string ChieuCao, string Vitri, string Soao, string clb)
        {
            var db     = new QLCTEntities1();
            var player = new Cauthu();

            player.TenCauThu = TenCauThu;
            player.Gioi_Tinh = Gioitinh;
            player.NgaySinh  = NgaySinh;
            player.Nickname  = Nickname;
            player.Quequan   = Quequan;
            player.Chieucao  = ChieuCao;
            player.Vitri     = Vitri;
            player.Soao      = Soao;
            player.clb       = clb;

            db.Cauthus.Add(player);
            db.SaveChanges();
        }
Пример #7
0
        public Login[] Getlogin()
        {
            var db = new QLCTEntities1();

            return(db.Logins.ToArray());
        }