public IActionResult AuditQuery(DataAuditQueryDto model) { var currentRoleId = _PartnerManager.GetCurrentUserRole(this.HttpContext); var permission = _partActRepo.GetPartAct("DataAudit.Query", currentRoleId); if (permission == null) { toastNotification.AddErrorToastMessage("ليس لديك الصلاحية الكافية", new ToastrOptions { Title = "" }); return(Redirect(Request.Headers["Referer"].ToString())); } var results = _auditing.GetAuditig(new IDataAuditRepo.GetListParam { ActivityId = model.ActivityId, CreatorId = model.CreatedById, CreatorAccount = model.CreatedByAccount, StartDate = model.StartDate, EndDate = model.EndDate, IncludeDates = model.IncludeDates }); model.Results = results; model.Activities = new ActivityRepo(db, _PartnerManager).GetDataAuditActivities(); return(View(model)); }
public IActionResult AuditQuery() { var currentRoleId = _PartnerManager.GetCurrentUserRole(this.HttpContext); var permission = _partActRepo.GetPartAct("DataAudit.Query", currentRoleId); if (permission == null) { toastNotification.AddErrorToastMessage("ليس لديك الصلاحية الكافية", new ToastrOptions { Title = "" }); return(Redirect(Request.Headers["Referer"].ToString())); } var model = new DataAuditQueryDto(); model.StartDate = DateTime.Today.Subtract(TimeSpan.FromDays(10)); model.EndDate = DateTime.Today.AddDays(1); model.Activities = new ActivityRepo(db, _PartnerManager).GetDataAuditActivities(); return(View(model)); }