Example #1
0
        public bool ktkc(NHACC ma)
        {
            int r = data.NHACCs.Count(t => t.MANCC == ma.MANCC.ToString());

            try
            {
                if (r == 0)
                {
                    return(true);
                }
                return(false);
            }
            catch
            {
                return(false);
            }
        }
Example #2
0
 public bool sua(NHACC pmh)
 {
     try
     {
         NHACC thanhvien = data.NHACCs.Where(t => t.MANCC == pmh.MANCC.ToString()).FirstOrDefault();
         thanhvien.TENNCC    = pmh.TENNCC;
         thanhvien.DIACHINCC = pmh.DIACHINCC;
         thanhvien.EMAIL     = pmh.EMAIL;
         thanhvien.SDTNHACC  = pmh.SDTNHACC;
         thanhvien.HOPTAC    = pmh.HOPTAC;
         data.SubmitChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }