Example #1
0
        public void LeaveApproval(LeaveData l)
        {
            var       appDbContext = new LeaveManagementDbContext();
            var       userStore    = new ApplicationUserStore(appDbContext);
            var       userManager  = new ApplicationUserManager(userStore);
            LeaveData ld           = _db.LeaveDatas.Where(temp => temp.LeaveID == l.LeaveID).FirstOrDefault();

            ld.ApprovedBy     = HttpContext.Current.User.Identity.GetUserName();
            ld.ApprovalStatus = l.ApprovalStatus;
            _db.SaveChanges();
        }
Example #2
0
        public void UpdateEmployeeInfo(EmployeeInfo e)
        {
            var             appDbContext = new LeaveManagementDbContext();
            var             userStore    = new ApplicationUserStore(appDbContext);
            var             userManager  = new ApplicationUserManager(userStore);
            ApplicationUser user         = userManager.FindById(e.ApplicationUser.Id);

            EmployeeInfo ei;

            ei = _db.EmployeeInfo.Where(temp => temp.EmployeeInfoID == e.EmployeeInfoID).FirstOrDefault();
            if (ei != null)
            {
                ei.FirstName       = e.FirstName;
                ei.LastName        = e.LastName;
                ei.ProjectsDone    = e.ProjectsDone;
                ei.Address         = e.Address;
                ei.Bio             = e.Bio;
                ei.Hobbies         = e.Hobbies;
                ei.DateOfBirth     = e.DateOfBirth;
                ei.ApplicationUser = user;
                _db.SaveChanges();
            }
        }
Example #3
0
 public HRRepository()
 {
     db = new LeaveManagementDbContext();
 }
 public LeaveInfoRepository(LeaveManagementDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public EmployeeRepository()
 {
     db = new LeaveManagementDbContext();
 }
Example #6
0
 public ApplicationUserStore(LeaveManagementDbContext dbContext) : base(dbContext)
 {
 }
Example #7
0
 public ReportingRepository(LeaveManagementDbContext dbContext)
 {
     _dbContext = dbContext;
 }
Example #8
0
 public PMRepository(LeaveManagementDbContext db)
 {
     _db = db;
 }
Example #9
0
 public HRRepository(LeaveManagementDbContext db)
 {
     _db = new LeaveManagementDbContext();
 }
Example #10
0
 public RemainingHourRepository(LeaveManagementDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public EmployeeRepository(LeaveManagementDbContext dbContext)
 {
     _dbContext = dbContext;
 }