public NHAN_VIEN GetDVByUsername(String username)
        {
            NHAN_VIEN result = new NHAN_VIEN();

            result = context.NHAN_VIEN.FirstOrDefault(m => m.USERNAME.ToUpper() == username.ToUpper());
            return(result);
        }
        public NHAN_VIEN GetDVByMa(int pMaT)
        {
            NHAN_VIEN result = new NHAN_VIEN();

            result = context.NHAN_VIEN.FirstOrDefault(m => m.MA_NV == pMaT);
            return(result);
        }
        public int Add(NHAN_VIEN pT)
        {
            int result = 0;

            context.NHAN_VIEN.Add(pT);
            result = context.SaveChanges();
            return(result);
        }
        public int Delete(int pMaT)
        {
            int       result = 0;
            NHAN_VIEN k      = context.NHAN_VIEN.FirstOrDefault(m => m.MA_NV == pMaT);

            context.NHAN_VIEN.Remove(k);
            result = context.SaveChanges();
            return(result);
        }
        public int Update(NHAN_VIEN pT)
        {
            int       result = 0;
            NHAN_VIEN k      = context.NHAN_VIEN.FirstOrDefault(m => m.MA_NV == pT.MA_NV);

            if (k != null)
            {
                k.TEN_NV   = pT.TEN_NV;
                k.USERNAME = pT.USERNAME;
                k.PASSWORD = pT.PASSWORD;
                k.DIA_CHI  = pT.DIA_CHI;
                k.EMAIL    = pT.EMAIL;
            }
            result = context.SaveChanges();
            return(result);
        }