public ResponseModel GetstoreDashboardList([FromBody] StoreDashboardModel dasbhboardmodel) { List <StoreDashboardResponseModel> objStoreDash = new List <StoreDashboardResponseModel>(); ResponseModel objResponseModel = new ResponseModel(); int StatusCode = 0; string statusMessage = ""; try { string _token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); //authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(_token)); StoreDashboard newstoreDash = new StoreDashboard(); objStoreDash = newstoreDash.getStoreDashboardTaskList(new StoreDashboardService(_connectioSting), dasbhboardmodel); StatusCode = objStoreDash.Count == 0 ? (int)EnumMaster.StatusCode.RecordNotFound : (int)EnumMaster.StatusCode.Success; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)StatusCode); objResponseModel.Status = true; objResponseModel.StatusCode = StatusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = objStoreDash; } catch (Exception) { throw; } return(objResponseModel); }
public ResponseModel StoreLoggedInAccountDetails() { LoggedInAgentModel loggedinAccInfo = null; ResponseModel objResponseModel = new ResponseModel(); int statusCode = 0; string statusMessage = ""; StoreDashboard storeDashboard = new StoreDashboard(); try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); var folderName = Path.Combine(_profileImg_Resources, StoreProfileImage); var pathToSave = Path.Combine(Directory.GetCurrentDirectory(), folderName); loggedinAccInfo = storeDashboard.GetLogginAccountInfo(new StoreDashboardService(_connectioSting), authenticate.TenantId, authenticate.UserMasterID, pathToSave); statusCode = loggedinAccInfo != null ? (int)EnumMaster.StatusCode.Success : (int)EnumMaster.StatusCode.RecordNotFound; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = loggedinAccInfo != null ? loggedinAccInfo : null; } catch (Exception) { throw; } return(objResponseModel); }