Exemple #1
0
 /// <summary>
 /// Upload New Files those have Id zero
 /// </summary>
 /// <param name="files"></param>
 /// <param name="recordId"></param>
 /// <param name="context"></param>
 public static void InsertFiles(List <File> files, int recordId, EMSContext context)
 {
     if (files != null)
     {
         var fileList = (from x in files where x.FileId == 0 select x).ToList();
         foreach (var file in fileList)
         {
             file.EmpId = recordId;
             context.File.AddRange(fileList);
         }
         context.SaveChanges();
     }
 }
Exemple #2
0
 public UserRepository(EMSContext context)
 {
     _context = context;
 }
Exemple #3
0
 public TaskInformationRepository(EMSContext context)
 {
     _context = context;
 }
Exemple #4
0
 public EmployeeRepository(EMSContext context)
 {
     _context = context;
 }
 public TaskRepository(EMSContext context)
 {
     _context = context;
 }
Exemple #6
0
        /// <summary>
        /// Inactivate the old EmployeeLanguages Mapping Insert New
        /// </summary>
        /// <param name="employeeId">EmployeeId</param>
        /// <param name="employeeLanguagesList">Newly Inserted EmployeeLanguages Mapping</param>
        /// <param name="context">Employee Context</param>
        public void InsertEmployeeLanguages(int employeeId, List <EmployeeLanguage> employeeLanguagesList, EMSContext context)
        {
            //Remove old Employee Language Mappings
            var employeeLanguagesListExisted = context.EmployeeLanguage.Where(x => x.EmpId == employeeId).ToList();

            context.EmployeeLanguage.RemoveRange(employeeLanguagesListExisted);

            //Insert New Employee Language Mappings
            context.EmployeeLanguage.AddRange(employeeLanguagesList);

            context.SaveChanges();
        }
Exemple #7
0
 public EmployeeDataManager()
 {
     context = new EMSContext();
 }
Exemple #8
0
 public SubPartRepository(EMSContext context)
 {
     _context = context;
 }
Exemple #9
0
 public ProjectRepository(EMSContext context)
 {
     _context = context;
 }
 public StatesDataManager()
 {
     context = new EMSContext();
 }
 public PageRepository(EMSContext context)
 {
     _context = context;
 }
 public PastEventRepository(EMSContext context)
 {
     _context = context;
 }
Exemple #13
0
 public DepartmentRepository(EMSContext context)
 {
     _context = context;
 }
 public ContactRepository(EMSContext context)
 {
     _context = context;
 }
 public LanguagesDataManager()
 {
     context = new EMSContext();
 }
Exemple #16
0
 public EventTypeRepository(EMSContext context)
 {
     _context = context;
 }
 public PositionRepository(EMSContext context)
 {
     _context = context;
 }