public IActionResult Index() { var scale = new Scale(_lookupAppService); var photoTrackingLKDId = (_lookupAppService.GetAllLookDetail(null, LookUpDetailConst.PhotoTracking)).Result.Items.FirstOrDefault().Id; var businessDocumentList = (_documentAppService.GetAllBusinessDocuments(null, photoTrackingLKDId, null)).Result.Items.ToList(); var heightInCm = _lookupAppService.GetAllLookDetail(null, LookUpDetailConst.Cm).Result.Items.First().Id; var model = new ProfileVModel { LoginInformations = _sessionAppService.GetCurrentLoginInformations().Result, UserTrackingFilter = new UserTrackingFilter() { MeasurementScale = scale, MeasurementScaleLKDId = heightInCm }, PhotoTrackingBusinessDocumentList = businessDocumentList }; //Set UserId string userEnycId = HttpContext.Request.Query["id"].ToString(); if (!string.IsNullOrEmpty(userEnycId)) { model.UserTrackingFilter.UserIdEnyc = userEnycId; } else { model.UserTrackingFilter.UserIdEnyc = CryptoEngine.EncryptString(AbpSession.UserId.Value.ToString()); } model.PersonalDetail = LoadPersonalDetail(model.UserTrackingFilter.UserIdEnyc).Result; return(View(model)); }
public JsonResult GetBatchLists() { string LoginUser = (string)Session["LoginSAPID"]; string userkey = ConfigurationManager.AppSettings["userkey"]; string uid = ConfigurationManager.AppSettings["uid"]; string EmployerId = (string)Session["EMPLOYER_ID"]; string CompanyName = (string)Session["CompanyName"]; string _access_key = ConfigurationManager.AppSettings["Salt"]; try { Employer.Employer employer = new Employer.Employer(); DataTable dt = employer.FetchStatementEmployerBatch(CompanyName, EmployerId, userkey, uid); dt.TableName = "EmployerBatch"; dt.Columns.ToString(); var batches = (from DataRow dr in dt.Rows select new { ID = CryptoEngine.EncryptString(dr["Category ID"].ToString(), _access_key), BatchName = dr["StmtBatchName"].ToString(), AddressId = CryptoEngine.EncryptString(dr["Address ID"].ToString(), _access_key), }).ToList(); return(Json(new { data = batches }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { LogError logerror = new LogError(); logerror.ErrorLog("", LoginUser, "", "StatementOptions/GetBatchLists", "StatementOptions", "GetBatchLists", "FetchInternalUsers Error", ex.Message.ToString(), 0); return(Json(new { data = "Error has occured" }, JsonRequestBehavior.AllowGet)); } }
public string GetProfilePhotoPath() { if (LoginInformations.User.ProfilePhotoPath == null) { return(null); } var profilePhotoPath = CryptoEngine.EncryptString(LoginInformations.User.ProfilePhotoPath); return(profilePhotoPath); }
public async Task <ListResultDto <BusinessDocumentAttachmentDto> > GetAllBusinessDocumentAttachments(int?id = null, int?businessDocumentId = null, int?businessEntityId = null) { var documentAttachmentList = await _businessDocumentAttachmentRepository .GetAll() .WhereIf(id.HasValue, e => e.Id == id) .WhereIf(businessDocumentId.HasValue, e => e.BusinessDocumentId == businessDocumentId) .WhereIf(businessEntityId.HasValue, e => e.BusinessEntityId == businessEntityId) //.WhereIf(businessEntityDateTime.HasValue, e => e.CreationTime == businessEntityDateTime) .OrderByDescending(t => t.CreationTime) .ToListAsync(); var list = ObjectMapper.Map <List <BusinessDocumentAttachmentDto> >(documentAttachmentList); list.ForEach(x => x.picEnyc = CryptoEngine.EncryptString(x.Id.ToString())); return(new ListResultDto <BusinessDocumentAttachmentDto>(list)); }
public JsonResult GotoUserProfile(long userId) { string id = null; if (_userManager.IsAdminUser(AbpSession.UserId.Value)) { id = userId.ToString(); } else { id = AbpSession.UserId.Value.ToString(); } string url = string.Format("/Admin/Profile/Index?id={0}", HttpUtility.UrlEncode(CryptoEngine.EncryptString(id))); return(Json(new { success = true, targetUrl = url })); }