public void UpdateListFilterGrade(int employeeListFilterID, string[] gradeID)
        {
            var filterGrades = AllEmployeeListFilterGrades.Where(e => e.EmployeeListFilterId == employeeListFilterID);

            if (gradeID != null)
            {
                int[] arrayGradeID = gradeID.Select(g => Convert.ToInt32(g)).ToArray();
                if (filterGrades != null)
                {
                    foreach (var grade in filterGrades)
                    {
                        if (!arrayGradeID.Contains(grade.GradeId))
                        {
                            context.EmployeeListFilterGrade.Remove(grade);
                        }
                    }
                    context.SaveChanges();
                }

                foreach (var id in arrayGradeID)
                {
                    if (!filterGrades.Any(g => g.GradeId == id))
                    {
                        context.EmployeeListFilterGrade.Add(new EmployeeListFilterGrade()
                        {
                            EmployeeListFilterId = employeeListFilterID,
                            GradeId         = id,
                            BusinessGroupId = CurrentBusinessGroupId,
                            CreatedBy       = CurrentUserId,
                            CreatedDate     = DateTime.Now
                        });
                    }
                }
            }
            else
            {
                if (filterGrades != null)
                {
                    foreach (var grade in filterGrades)
                    {
                        context.EmployeeListFilterGrade.Remove(grade);
                    }
                }
            }

            context.SaveChanges();
        }
        public int[] GetFilterGradeID(int employeeListFilterID)
        {
            var ids = AllEmployeeListFilterGrades.Where(e => e.EmployeeListFilterId == employeeListFilterID).Select(s => s.GradeId).ToArray();

            return(ids);
        }