Beispiel #1
0
 public List <Tbl_Section> GetAllDepartments()
 {
     try
     {
         return(_context.Tbl_Section.ToList());
     }
     catch (Exception ex)
     {
         _logService.Insert(new Log()
         {
             Type = LogType.Error, Priority = LogPriority.High, Description = ex.Message, PageUrl = "GetAllDepartments", CreatedOn = DateTime.Now.ToString("yyyy-MM-dd HH:mm"), UpdatedOn = DateTime.Now.ToString("yyyy-MM-dd HH:mm")
         });
         return(new List <Tbl_Section>());
     }
 }
Beispiel #2
0
        public List <Tbl_User> SearchUsers(string FirstName, string LastName, string PersonelId, string Username, int active, int section)
        {
            try
            {
                return(_context.Tbl_User.Where(x => x.Name.Contains(FirstName) || x.LastName.Contains(LastName) || x.PersonnelID.Contains(PersonelId) || x.UserName.Contains(Username) || x.Active.Equals(active) || x.Section_ID.Equals(section)).ToList());
            }
            catch (Exception ex)
            {
                _logService.Insert(new Log()
                {
                    Type = LogType.Error, Priority = LogPriority.High, Description = ex.Message, PageUrl = "SearchUsers", CreatedOn = DateTime.Now.ToString("yyyy-MM-dd HH:mm"), UpdatedOn = DateTime.Now.ToString("yyyy-MM-dd HH:mm")
                });

                return(new List <Tbl_User>());
            }
        }