Exemplo n.º 1
0
 public bool DeleteUserInfo(string GongHao)
 {
     try
     {
         using (USPEntities usp = new USPEntities())
         {
             var models = usp.UserInfo.Where(c => c.员工工号 == GongHao).ToList();
             usp.UserInfo.RemoveRange(models);
             usp.SaveChanges();
         }
         return(true);
     }
     catch (Exception ex)
     {
         LogUtil.Exception("ExceptionLogger", ex);
         return(false);
     }
 }