public RtLeaveApiController() { _leaveRepository = RTUnityMapper.GetInstance <IEmployeeLeave>(); _departmentRepository = RTUnityMapper.GetInstance <IDepartment>(); _noticeBoardRepository = RTUnityMapper.GetInstance <INoticeBoard>(); _attendance = RTUnityMapper.GetInstance <IAttendance>(); }
public IHttpActionResult Post(LocalPasswordModel model) { if (ModelState.IsValid) { var response = RTUnityMapper.GetInstance <IUserCredential>().ChangePassword(model.UserName, CryptographyHelper.CreateMD5Hash(model.ConfirmPassword)); return(Ok(response)); } return(Ok(new { Success = false, Message = "Oops!try again." })); }
public IHttpActionResult CreateToken([FromBody] LoginModel model) { var password = CryptographyHelper.CreateMD5Hash(model.Password); var user = RTUnityMapper.GetInstance <IUserCredential>().Get(model.LoginID, password); if (user == null) { return(BadRequest()); } var token = TokenManager.GenerateToken(model.LoginID); return(Ok(new { Success = true, Token = TokenManager.GenerateToken(model.LoginID), UserKey = user.DoctorId })); }
public RtAccountApiController() { _emplpoyeeRepository = RTUnityMapper.GetInstance <IEmployee>(); _userCredential = RTUnityMapper.GetInstance <IUserCredential>(); }
public RtCompanyApiController() { _companyRepository = RTUnityMapper.GetInstance <ICompany>(); }
public RtNoticeBoardApiController() { _noticeBoardRepository = RTUnityMapper.GetInstance <INoticeBoard>(); }
public RtDepartmentApiController() { _departmentRepository = RTUnityMapper.GetInstance <IDepartment>(); }
public RtTaskApiController() { _taskRepository = RTUnityMapper.GetInstance <IEmployeeTask>(); }
public RtAttendanceApiController() { _attendance = RTUnityMapper.GetInstance <IAttendance>(); _company = RTUnityMapper.GetInstance <ICompany>(); }