Esempio n. 1
0
        public ActionResult GetFileView(string Id)
        {
            var _workorderems = new workorderEMSEntities();
            var model         = new List <UploadedFiles>();

            try
            {
                var  id      = Cryptography.GetDecryptedData(Id, true);
                long _UserId = 0;
                long.TryParse(id, out _UserId);
                var _FillableFormRepository = new FillableFormRepository();
                model = _IePeopleManager.GetUploadedFilesOfUser(Id);
                var getUser = _workorderems.UserRegistrations.Where(x => x.UserId == _UserId && x.IsDeleted == false && x.IsEmailVerify == true).FirstOrDefault();
                if (getUser != null)
                {
                    var details = _IGuestUserRepository.GetEmployee(_UserId);
                    ViewBag.ImageUser    = details.Image == null ? HostingPrefix + ConstantImages.Replace("~", "") + "no-profile-pic.jpg" : HostingPrefix + ProfilePicPath.Replace("~", "") + details.Image;
                    ViewBag.EmployeeID   = details.EmpId;
                    ViewBag.EmployeeName = details.FirstName + " " + details.LastName;
                    var getDetails = _FillableFormRepository.GetFileList();
                    ViewBag.GreenList = getDetails.Where(x => x.FLT_FileType == "Green").ToList();
                    ViewBag.Red       = getDetails.Where(x => x.FLT_FileType == "Red").ToList();
                    ViewBag.Yellow    = getDetails.Where(x => x.FLT_FileType == "Yellow").ToList();
                }
                return(PartialView("~/Views/NewAdmin/ePeople/_FilesEmployeeManagement.cshtml", model));
            }
            catch (Exception ex)
            {
                return(PartialView("~/Views/NewAdmin/ePeople/_FilesEmployeeManagement.cshtml", model));
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Created By : Ashwajit Bansod
        /// Created Date : 24-Oct-2019
        /// Created For : To get File type list
        /// </summary>
        /// <returns></returns>
        public List <FormTypeListModel> GetFileList(eTracLoginModel obj)
        {
            var lst = new List <FormTypeListModel>();

            try
            {
                if (obj.UserId > 0)
                {
                    lst = _FillableFormRepository.GetFileList().Select(x => new FormTypeListModel()
                    {
                        FileName   = x.FLT_FileSubType,
                        FileType   = x.FLT_FileType,
                        FileTypeId = x.FLT_Id,
                        IsActive   = x.FLT_IsActive
                    }).ToList();
                }
                return(lst);
            }
            catch (Exception ex)
            {
                Exception_B.Exception_B.exceptionHandel_Runtime(ex, "public List<FormTypeListModel> GetFormList(eTracLoginModel obj)", "Exception While getting list of files with type.", obj);
                throw;
            }
        }