/// <summary> /// Set values for Merchant Context /// </summary> public void InitializeMerchantContext() { try { _errorLog.LogInfo("IntializedMerchantContext called"); if (!String.IsNullOrEmpty(HttpContext.Current.User.Identity.Name)) { var user = HttpContext.Current.User.Identity.Name; UserId = HttpContext.Current.User.Identity.GetUserId(); var roleId = _merchantDataRepository.GetRoleIdByCustomerName(user); UserDetails = _merchantDataRepository.GetUserDetails(UserId); CompanyDetails = _merchantDataRepository.GetCompanyDetail((int)UserDetails.CompanyId); Permission = _merchantDataRepository.GetPermissionByRoleId(roleId, CompanyDetails.Id); WorkFlow = _merchantDataRepository.WorkFlowDetails(CompanyDetails.Id, roleId); } } catch (Exception ex) { _errorLog.LogException(ex); throw; } }