Ejemplo n.º 1
0
        public string SaveTan(OfflineDTO offlineDTO, [FromUri] int currentUserRole, [FromUri] string UserName)
        {
            var id = claimServices.UserId((ClaimsIdentity)User.Identity);

            return(TanService.SaveTan(id, offlineDTO, currentUserRole, ip, UserName));
        }
Ejemplo n.º 2
0
 public object SaveException(ActivityTracing ErrorInfo)
 {
     return(TanService.SaveException(ErrorInfo));
 }
Ejemplo n.º 3
0
        public object GetRoleBasedTanData([FromUri] int tanId, [FromUri] int currentRole)
        {
            var id = claimServices.UserId((ClaimsIdentity)User.Identity);

            return(TanService.GetRoleBasedTanData(tanId, id, currentRole));
        }
Ejemplo n.º 4
0
        public object UserReactionsReports([FromUri] int currentRoleId)
        {
            var id = claimServices.UserId((ClaimsIdentity)User.Identity);

            return(TanService.UserReactionsReports(id, currentRoleId));
        }
Ejemplo n.º 5
0
        public object Assigntans(List <int> tanIds, [FromUri] string toUserId, [FromUri] int currentRoleId, [FromUri] string comment, [FromUri] Role role)
        {
            var id = claimServices.UserId((ClaimsIdentity)User.Identity);

            return(TanService.AssignTans(tanIds, toUserId, currentRoleId, id, comment, role));
        }
Ejemplo n.º 6
0
        public object PullTaskWithGrouping([FromUri] int currentRole, [FromUri] bool pullTasks)
        {
            var id = claimServices.UserId((ClaimsIdentity)User.Identity);

            return(TanService.PullTask(id, currentRole, pullTasks));
        }
Ejemplo n.º 7
0
 public object GetErrorReportData([FromBody] ErrorReportDto ErrorReport)
 {
     return(TanService.GetErrorReport(ErrorReport));
 }
Ejemplo n.º 8
0
        public List <TaskDTO> Mytans([FromUri] int currentRole, [FromUri] bool pullTasks)
        {
            var id = claimServices.UserId((ClaimsIdentity)User.Identity);

            return(TanService.MyTans(id, currentRole, pullTasks));
        }
Ejemplo n.º 9
0
        public object SubmitTan(int tanId, int currentRole)
        {
            var id = claimServices.UserId((ClaimsIdentity)User.Identity);

            return(TanService.SubmitTan(tanId, currentRole, id));
        }
Ejemplo n.º 10
0
 public object Versions(string tanNumber)
 {
     return(TanService.GetVersions(tanNumber));
 }
Ejemplo n.º 11
0
        public object AproveTan(int tanId, int currentRole, [Optional] bool QCRequired)
        {
            var id = claimServices.UserId((ClaimsIdentity)User.Identity);

            return(TanService.ApproveTan(tanId, currentRole, id, QCRequired));
        }
Ejemplo n.º 12
0
        public UserInfoDTO GetUserInfo(int currentRole)
        {
            var id = claimServices.UserId((ClaimsIdentity)User.Identity);

            return(TanService.GetUserInfo(id, currentRole));
        }
Ejemplo n.º 13
0
 public List <RegulerExpression> GetRegulerExpressions()
 {
     return(TanService.GetRegulerExpressions());
 }
Ejemplo n.º 14
0
 public List <RolesDTO> GetUserRoles([FromUri] string UserName)
 {
     return(TanService.UserRoles(UserName));
 }
Ejemplo n.º 15
0
        public ActionResult UserWiseSummary1(string FromDate, string ToDate, string tanStates, bool fromUpdatedDate, bool fromCompletedDate)
        {
            List <UserWiseReports> userwiseReports = new List <UserWiseReports>();
            //var dateStrings = dates.Split(',');
            var      dateList   = new List <DateTime>();
            DateTime dtFromDate = DateTime.ParseExact(FromDate.Trim(), "MM/dd/yyyy", CultureInfo.InvariantCulture);
            DateTime dtToDate   = DateTime.ParseExact(ToDate.Trim(), "MM/dd/yyyy", CultureInfo.InvariantCulture);
            var      range      = dtFromDate.DateRange(dtToDate);

            dateList = range.ToList();
            List <string> TanStates = new List <string>();

            if (!string.IsNullOrEmpty(tanStates))
            {
                TanStates = tanStates.Split(',').ToList();
            }
            //foreach (var d in dateStrings)
            //    dateList.Add(DateTime.ParseExact(d.Trim(), "dd-MM-yyyy", CultureInfo.InvariantCulture));
            var users         = db.Users.Include(user => user.ApplicationRoles);
            var CuratorsData  = TanService.UserWiseTanNumbers(Role.Curator, TanStates);
            var ReviewersData = TanService.UserWiseTanNumbers(Role.Reviewer, TanStates);
            var QCsData       = TanService.UserWiseTanNumbers(Role.QC, TanStates);

            foreach (var user in users)
            {
                var             curationdata = CuratorsData.ContainsKey(user.Id) ? TanService.ReactionsCountDateWisewithStages(TanService.GetTanNumbers(1, user.Id, true), 1, fromUpdatedDate, fromCompletedDate) : new Dictionary <DateTime, ReactionsCount>();
                var             Reviewdata   = ReviewersData.ContainsKey(user.Id) ? TanService.ReactionsCountDateWisewithStages(TanService.GetTanNumbers(2, user.Id, true), 2, fromUpdatedDate, fromCompletedDate) : new Dictionary <DateTime, ReactionsCount>();
                var             Qcdata       = QCsData.ContainsKey(user.Id) ? TanService.ReactionsCountDateWisewithStages(TanService.GetTanNumbers(3, user.Id, true), 3, fromUpdatedDate, fromCompletedDate) : new Dictionary <DateTime, ReactionsCount>();
                UserWiseReports uwr          = new UserWiseReports();
                foreach (var date in dateList)
                {
                    if (curationdata != null && curationdata.ContainsKey(date))
                    {
                        uwr.UserName = user.UserName;
                        uwr.CuratedReactionsCount          += curationdata[date].TotalReactionsCount;
                        uwr.CuratedAnalogousReactionsCount += curationdata[date].AnalogousReactionsCount;
                        uwr.CuratedStagesCount              = curationdata[date].StagesCount;
                    }
                    if (Reviewdata != null && Reviewdata.ContainsKey(date))
                    {
                        uwr.UserName = user.UserName;
                        uwr.ReviewedReactionsCount          += Reviewdata[date].TotalReactionsCount;
                        uwr.ReviewedAnalogousReactionsCount += Reviewdata[date].AnalogousReactionsCount;
                        uwr.ReviewedStagesCount             += Reviewdata[date].StagesCount;
                    }
                    if (Qcdata != null && Qcdata.ContainsKey(date))
                    {
                        uwr.UserName                   = user.UserName;
                        uwr.QcReactionsCount          += Qcdata[date].TotalReactionsCount;
                        uwr.QcAnalogousReactionsCount += Qcdata[date].AnalogousReactionsCount;
                        uwr.QcStagesCount             += Qcdata[date].StagesCount;
                    }
                }
                if (!string.IsNullOrEmpty(uwr.UserName))
                {
                    userwiseReports.Add(uwr);
                }
            }
            ViewBag.UserWiseReports = userwiseReports.OrderByDescending(ur => ur.CuratedReactionsCount).ToList();
            return(PartialView("~/Views/Report/_userWiseReports.cshtml"));
        }