Example #1
0
        public ActionResult Index(int?page, int PageSize = 10)
        {
            string        UserId     = User.Identity.GetUserId();
            UserViewModel userDetail = generic.GetUserDetail(UserId);

            ViewBag.UserId          = userDetail.SubscriberId;
            ViewData["UserProfile"] = userDetail;
            PopulatePaging(PageSize);
            ViewBag.Paging = PageSize;
            int pageSize    = PageSize;
            int pageNumber  = (page ?? 1);
            var resignation = ems.GetResignation(userDetail.UserId, "Admin").ToPagedList(pageNumber, pageSize);

            if (userDetail.Role == "Employee")
            {
                var empdetails = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();
                ViewData["EmpDetails"]  = empdetails;
                ViewData["CompanyLogo"] = cms.GetCompanyLogo(userDetail.SubscriberId).FirstOrDefault();
                resignation             = ems.GetResignation(userDetail.UserId, "Admin").ToPagedList(pageNumber, pageSize);
            }
            else
            {
                resignation = ems.GetResignation(userDetail.SubscriberId, "Admin").ToPagedList(pageNumber, pageSize);
            }


            return(View(resignation));
        }
Example #2
0
        public ActionResult CandidateCheckIn(string sortOrder, string CourseCode, int?page, Int64 BatchId = 0, string FilterName = "", int PageSize = 10, bool status = false)
        {
            string UserId      = User.Identity.GetUserId();
            var    userDetails = generic.GetUserDetail(UserId);

            ViewBag.UserId          = userDetails.SubscriberId;
            ViewData["UserProfile"] = userDetails;
            ViewData["EmpDetails"]  = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userDetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userDetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            PopulateCourse(userDetails.SubscriberId, CourseCode);
            PopulateBatchByCourse(userDetails.SubscriberId, CourseCode, BatchId, false);
            //PopulateAssignedCourse(userDetails.SubscriberId, CourseCode);
            //PopulateAssignedCourseBatch(userDetails.SubscriberId, CourseCode, BatchId);
            ViewBag.TBatchId = BatchId;
            ViewBag.Course   = CourseCode;
            ViewBag.Batch    = BatchId;
            List <CandidateCourseDetailsView> Details = hostalmgr.GetBatchWiseStudent(CourseCode, BatchId).Where(c => c.CheckInDate == null).ToList();

            ViewBag.CurrentSort   = sortOrder;
            ViewBag.NameSortParam = sortOrder == "Name" ? "Name_desc" : "Name";

            ViewBag.Name       = FilterName;
            ViewBag.SaveStatus = status;
            //Apply filter
            if (!String.IsNullOrEmpty(FilterName))
            {
                Details = Details.Where(s => s.Name.ToLower().Contains(FilterName.ToLower())).ToList();
            }

            //Apply sorting
            if (Details.Count != 0)
            {
                switch (sortOrder)
                {
                case "Name":
                    Details = Details.OrderBy(c => c.Name).ToList();
                    break;

                case "Name_desc":
                    Details = Details.OrderByDescending(c => c.Name).ToList();
                    break;

                default:
                    Details = Details.OrderBy(c => c.Name).ToList();
                    break;
                }
            }

            PopulatePaging(PageSize);
            ViewBag.Paging = PageSize;
            int pageSize   = PageSize;
            int pageNumber = (page ?? 1);

            return(View(Details.ToPagedList(pageNumber, pageSize)));
        }
Example #3
0
        public ActionResult ItemTypeMaster(Int64 ItemTypeId = 0)
        {
            var userDetail = generic.GetUserDetail(User.Identity.GetUserId());

            ViewData["UserProfile"] = userDetail;
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userDetail.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userDetail.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            ViewData["ItemType"]   = admin.GetItemTypeMaster().Where(i => i.CorporateId == userDetail.SubscriberId).ToList();
            return(View(userContext.ItemTypeMasters.Find(ItemTypeId)));
        }
Example #4
0
        // GET: Admin/JobOrderType
        //[Authorize(Roles = "Admin")]
        public ActionResult Index()
        {
            //ViewBag.UserId = User.Identity.GetUserId();
            //ViewBag.UserName = cms.GetUserName(User.Identity.GetUserId());
            var userDetail = generic.GetUserDetail(User.Identity.GetUserId());

            ViewData["UserProfile"] = userDetail;
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userDetail.SubscriberId).FirstOrDefault();
            ViewData["EmpDetails"]  = ems.GetEmployeeBasicDetails(userDetail.UserId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userDetail.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            return(View(db.JobOrderTypeMaster.Where(j => j.CorporateId == userDetail.SubscriberId).ToList()));
        }
Example #5
0
        public ActionResult Index()
        {
            string        UserId      = User.Identity.GetUserId();
            UserViewModel UserDetails = new UserViewModel();

            if (!string.IsNullOrEmpty(UserId))
            {
                UserDetails             = generic.GetUserDetail(UserId);
                ViewData["UserProfile"] = UserDetails;
                ViewData["CompanyLogo"] = cms.GetCompanyLogo(UserDetails.SubscriberId).FirstOrDefault();
                ViewData["EmpDetails"]  = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();
            }
            List <HelpLineLayers> Layers = db.HelpLineLayers.ToList();

            ViewBag.SubscriberId = Layers.First().SubscriberId;

            PopulateCategory();

            List <HelpLineLayerDetails> LayerSCDetails = db.HelpLineLayerDetails.Where(l => l.LayerId == 0).ToList();

            ViewBag.SubCategory = new SelectList(LayerSCDetails, "LayerDetailsId", "LayerText", null);

            List <HelpLineLayerDetails> LayerQDetails = db.HelpLineLayerDetails.Where(l => l.LayerId == 0).ToList();

            ViewBag.Query = new SelectList(LayerQDetails, "LayerDetailsId", "LayerText", null);

            return(View(UserDetails));
        }
Example #6
0
        //[Authorize(Roles = "Candidate")]
        public ActionResult Index()
        {
            string UserId = User.Identity.GetUserId();

            var userdetails = generic.GetUserDetail(UserId);

            ViewData["UserProfile"] = userdetails;
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userdetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userdetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;

            ViewData["CandidateCourse"]    = student.GetCandidateWiseCourseDetail(UserId, true);
            ViewData["LMSCourseMasters"]   = lms.GetLMSCourseMasters(userdetails.SubscriberId);
            ViewData["CandidateTrngAssmt"] = tms.GetCandidateTrainingAssessments(UserId);
            return(View());
        }
        //[Authorize(Roles = "Admin,Employee")]
        public ActionResult Index(bool status = false)
        {
            var userdetails = generic.GetUserDetail(User.Identity.GetUserId());

            ViewData["UserProfile"] = userdetails;
            ViewBag.UserId          = userdetails.SubscriberId;
            ViewData["EmpDetails"]  = emsMgr.GetEmployeeBasicDetails(userdetails.UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cmsMgr.GetCompanyLogo(userdetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userdetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            List <TrainerPlannerView> trainerPlanner = tms.GetTrainerPlaner(userdetails.UserId);

            ViewData["Planner"] = trainerPlanner.AsEnumerable();

            return(View());
        }
        public ActionResult EmployeeBulkUpload()
        {
            string        UserId      = User.Identity.GetUserId();
            UserViewModel userDetails = generic.GetUserDetail(UserId);

            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userDetails.SubscriberId).FirstOrDefault();
            ViewData["UserProfile"] = userDetails;
            var plandetail = admMgr.GetUserplanDetails(userDetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            return(View());
        }
        //[Authorize(Roles = "Client")]
        public ActionResult Create(string JobOrderNumber, string result = "")
        {
            string UserId      = User.Identity.GetUserId();
            var    userDetails = generic.GetUserDetail(UserId);

            ViewData["UserProfile"] = userDetails;
            ViewData["CompanyLogo"] = cmsMgr.GetCompanyLogo(userDetails.SubscriberId).FirstOrDefault();

            ViewBag.Result = result;
            var joborder = udb.JobOrder.Find(JobOrderNumber);

            ViewData["JOItems"] = cmsMgr.GetJobOrderItems(JobOrderNumber).AsEnumerable();

            ViewData["ItemType"] = (from i in udb.ItemTypeMasters.Where(i => i.CorporateId == userDetails.SubscriberId) select i).AsEnumerable();

            ViewData["Content"] = (from i in udb.JobOrderAttachment.Where(i => i.JobOrderNumber == JobOrderNumber) select i).FirstOrDefault();

            ViewData["ItemDuration"] = Global.GetDuration();

            if (joborder != null)
            {
                PopulateOrderType(userDetails.SubscriberId, joborder.JobOrderTypeId);
                PopulateCurrency(joborder.Currency);
                PopulateSalaryRange(joborder.SalaryRange);
                PopulateExperienceRange(joborder.ExpRange);

                if (joborder.StartDate != null)
                {
                    ViewBag.startDate = joborder.StartDate.Value.ToString("dd-MM-yyyy");
                }
            }
            else
            {
                PopulateOrderType(userDetails.SubscriberId);
                PopulateCurrency();
                PopulateSalaryRange();
                PopulateExperienceRange();
            }
            return(View(joborder));
        }
Example #10
0
        //
        // GET: /Manage/ChangePassword
        public ActionResult ChangePassword(string Id = "New")
        {
            //string userId = User.Identity.GetUserId();
            //if (userId != null)
            //{
            //    if (UserManager.IsInRole(userId, "Admin"))
            //        ViewBag.UserRole = "Admin";
            //    else if (UserManager.IsInRole(userId, "Client"))
            //    {
            //        ViewBag.UserRole = "Client";

            //        if (db.CorporateProfile.Find(userId).DepartmentId != "CLI")
            //            ViewBag.UserRole = "Partner";

            //        ViewBag.DeptId = db.CorporateProfile.Find(userId).DepartmentId;
            //    }
            //    else if (UserManager.IsInRole(userId, "Candidate"))
            //    {
            //        ViewBag.UserRole = "Candidate";
            //        ViewBag.DeptId = db.UserProfile.Find(userId).DepartmentId;
            //    }
            //    else if (UserManager.IsInRole(userId, "Employee"))
            //    {
            //        ViewBag.UserRole = "Employee";
            //        ViewBag.DeptId = db.EmployeeBasicDetails.Find(userId).DepartmentId;
            //    }
            //    else if (UserManager.IsInRole(userId, "Administrator"))
            //    {
            //        ViewBag.UserRole = "Administrator";
            //        ViewBag.DeptId = "ADMIN";
            //    }
            //}
            //ViewBag.UserName = GetUserName(userId, ViewBag.UserRole);
            string UserId      = User.Identity.GetUserId();
            var    userdetails = generic.GetUserDetail(UserId);

            ViewData["UserProfile"] = userdetails;
            ViewData["EmpDetails"]  = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userdetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userdetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;

            ViewBag.SaveStatus = Id;
            if (Id == "Failed")
            {
                ViewBag.Message = "Password didn't match";
            }
            return(View());
        }
        // GET: CMS/Transactions
        //[Authorize(Roles = "Admin, Employee")]
        public ActionResult Candidate(string TransactionId, string Status)
        {
            var userDetail = generic.GetUserDetail(User.Identity.GetUserId());

            ViewData["UserProfile"] = userDetail;
            ViewBag.UserId          = userDetail.SubscriberId;
            ViewData["EmpDetails"]  = ems.GetEmployeeBasicDetails(userDetail.UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userDetail.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userDetail.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            if (TransactionId != null && !string.IsNullOrEmpty(Status))
            {
                FeeDetails feedetail = db.FeeDetails.Find(TransactionId);

                if (feedetail != null)
                {
                    if (Status == "Approve")
                    {
                        feedetail.Status = "Approved";
                    }
                    else
                    {
                        feedetail.Status = "Failed";
                    }
                    feedetail.ApprovedBy      = User.Identity.GetUserId();
                    feedetail.ApprovalDate    = DateTime.UtcNow;
                    db.Entry(feedetail).State = EntityState.Modified;
                    db.SaveChanges();
                    return(RedirectToAction("Candidate", "Transactions", new { area = "CMS" }));
                }
            }
            var detials = student.GetCandidatePaymentTransaction(userDetail.SubscriberId).Where(c => c.Status != "Failed");

            return(View(detials));
        }
Example #12
0
        public ActionResult Notifications(string Id = "", string UserAction = "Add", long NotificationId = 0, string NType = null)
        {
            string UserId = User.Identity.GetUserId();

            var userdetails = generic.GetUserDetail(UserId);

            ViewBag.UserId          = userdetails.SubscriberId;
            ViewData["UserProfile"] = userdetails;
            ViewData["EmpDetails"]  = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userdetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userdetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            if (userdetails.Role == "Employee")
            {
                var confirmationdate = userContext.EmpJoiningDetail.Where(c => c.UserId == UserId).Select(c => c.ConfirmationDate).FirstOrDefault();
                ViewBag.Date = DateTime.Now.Date;
                if (confirmationdate != null)
                {
                    ViewBag.cdate = confirmationdate.Value.Date;
                }
            }
            //for checking employeeconfirmation details
            ViewData["ConfirmEmployee"] = userContext.EmployeeConfirmation.Where(c => c.ApprovedBy == UserId).ToList();
            ViewData["plandetail"]      = plandetail;
            if (UserAction == "Delete" && NotificationId != 0)
            {
                admin.RemoveNotification(NotificationId);
                return(RedirectToAction("Notifications", "UserNotification"));
            }
            if (NotificationId != 0)
            {
                admin.UpdateNotification(NotificationId, DateTime.Now);
            }
            if (NType == "JobOrder")
            {
                return(RedirectToAction("JobOrderDetails", "JobOrder", new { area = "CMS", id = Id, CV = false }));
            }
            else if (NType == "Task")
            {
                return(RedirectToAction("TaskDetails", "Task", new { area = "CMS", Id = Id }));
            }

            List <UserNotificationView> Details = admin.GetUserNotification(UserId);

            return(View(Details));
        }
Example #13
0
        //[Authorize(Roles = "Admin,Client,Employee")]
        public ActionResult Index(string Status, string Id, string InvoiceTo, string InvoiceNumber, bool data = false, string UserAction = "Add")
        {
            ViewBag.Result = "Failed";
            if (data == true)
            {
                ViewBag.Result = "Succeeded";
            }

            string UserId     = User.Identity.GetUserId();
            var    UserDetail = generic.GetUserDetail(User.Identity.GetUserId());

            ViewData["UserProfile"] = generic.GetUserDetail(UserId);
            ViewData["EmpDetails"]  = emsMgr.GetEmployeeBasicDetails(UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cmsMgr.GetCompanyLogo(UserDetail.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(UserDetail.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;

            ViewData["JOItems"]      = cmsMgr.GetJobOrderItems(Id).AsEnumerable();
            ViewData["ItemType"]     = (from i in db.ItemTypeMasters.Where(i => i.CorporateId == UserDetail.SubscriberId) select i).AsEnumerable();
            ViewData["InvItems"]     = cmsMgr.GetInvoiceItems(InvoiceNumber).AsEnumerable();
            ViewData["InvTaxs"]      = admin.GetInvoiceTaxes(InvoiceNumber).AsEnumerable();
            ViewData["TaxType"]      = admin.GetTaxMaster().AsEnumerable();
            ViewData["ItemDuration"] = Global.GetDuration();
            ViewBag.UserAction       = UserAction;
            if (UserAction == "Edit")
            {
                var Invoice = admin.GetInvoiceDetails(UserId, InvoiceNumber);
                ViewBag.InvoiceDate    = Invoice.InvoiceDate;
                ViewBag.Currency       = Invoice.Currency;
                ViewBag.InvoiceNumber  = InvoiceNumber;
                ViewBag.InvoiceTo      = Invoice.InvoiceTo;
                ViewBag.ReferenceId    = Invoice.ReferenceId;
                ViewBag.NetAmount      = Invoice.NetAmount;
                ViewBag.AdditionalCost = Invoice.AdditionalCost;
                ViewBag.Deductions     = Invoice.Deductions;
                ViewData["Content"]    = (from i in db.InVoiceAttachment.Where(i => i.ReferenceId == Invoice.ReferenceId) select i).FirstOrDefault();
                PopulateCurrency(Invoice.Currency);
                return(View(Invoice));
            }
            else
            {
                ViewBag.InvoiceTo      = InvoiceTo;
                ViewBag.ReferenceId    = Id;
                ViewBag.InvoiceDate    = DateTime.Now.Date;
                ViewBag.AdditionalCost = 0;
                ViewBag.Deductions     = 0;
                PopulateCurrency();
            }

            return(View());
        }
Example #14
0
        // GET: CMS/Task
        public ActionResult Index()
        {
            string UserId      = User.Identity.GetUserId();
            var    UserDetails = generic.GetUserDetail(UserId);

            ViewData["UserProfile"] = UserDetails;
            ViewData["EmpDetails"]  = emsMgr.GetEmployeeBasicDetails(UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cmsMgr.GetCompanyLogo(UserDetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(UserDetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            return(View());
        }
Example #15
0
        //[Authorize(Roles = "Admin,Employee,Candidate")]
        public ActionResult Discussion(string CourseCode)
        {
            ViewData["CourseDetail"] = admin.GetCourseMasterDetails(CourseCode);
            string userId = User.Identity.GetUserId();

            var userdetails = generic.GetUserDetail(userId);

            ViewData["UserProfile"] = userdetails;
            ViewData["EmpDetails"]  = ems.GetEmployeeBasicDetails(userId).FirstOrDefault();
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userdetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userdetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            ViewData["Reply"]      = lms.GetReviewReply();
            ViewBag.CommentsCount  = lms.SPCountComments(CourseCode).TOTALCOMMENTS;
            List <DiscussionForumView> Details = lms.GetReview(CourseCode);

            return(View(Details));
        }
        //[Authorize(Roles = "Employee")]
        public ActionResult Index(bool Status = false)
        {
            string UserId      = User.Identity.GetUserId();
            var    UserDetails = generic.GetUserDetail(UserId);

            ViewData["UserProfile"] = UserDetails;
            //ViewData["EmpInvoiceStatus"] = cms.GetEMPInvoicetatusCount(UserId);
            //ViewData["TaskStatus"] = cms.GetTaskCount(UserId);
            ViewData["TrainingStatus"] = cms.GetTrainingCount(UserId);
            ViewBag.NotificationCount  = admin.SPCountNotification(UserId).TOTALNOTIFICATION;
            ViewData["EmpDetails"]     = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();
            ViewData["CompanyLogo"]    = cms.GetCompanyLogo(UserDetails.SubscriberId).FirstOrDefault();
            //var plandetail = admin.GetUserplanDetails(UserDetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();
            //ViewData["plandetail"] = plandetail;
            if (Status == true)
            {
                ViewBag.Result = Status;
            }
            return(View(admin.GetUserwiseTasksInvoicesAndTrainigsCount(UserId)));
        }
Example #17
0
        //[Authorize(Roles = "Admin")]
        public ActionResult LectureMaster(string Id, string LectureId, string Keywords, bool status = false, string UserAction = "Add", Int64 FileId = 0)
        {
            UserViewModel userDetails = generic.GetUserDetail(User.Identity.GetUserId());

            ViewData["UserProfile"] = userDetails;
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userDetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userDetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            ViewBag.UserAction     = UserAction;
            ViewBag.Result         = "Failed";
            ViewBag.Keywords       = Keywords;
            if (status == true)
            {
                ViewBag.Result = "Succeeded";
            }
            ViewData["LectureMaster"] = lms.GetLectureMaster(userDetails.SubscriberId, null);

            LectureContentUpload Content = new LectureContentUpload();

            if (Id != null && Id != string.Empty)
            {
                var contents = db.LectureContentUpload.Find(FileId);

                Content.LectureId   = contents.LectureId;
                Content.FileId      = contents.FileId;
                Content.FileName    = contents.FileName;
                Content.ContentType = contents.ContentType;
            }
            ViewData["Content"] = Content;
            if (UserAction == "Delete" && !string.IsNullOrEmpty(LectureId))
            {
                lms.IsdeleteLecture(LectureId);
                return(View());
            }

            return(View(db.LectureMaster.Find(LectureId)));
        }
Example #18
0
        public ActionResult Record(string AtendenceDate, DateTime?AttendenceDate, string Id, bool Status = false)
        {
            ViewBag.Status = Status;

            string        UserId      = User.Identity.GetUserId();
            UserViewModel UserDetails = generic.GetUserDetail(UserId);

            ViewData["userprofile"] = UserDetails;
            ViewData["EmpDetails"]  = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(UserDetails.SubscriberId).FirstOrDefault();
            //var plandetail = admin.GetUserplanDetails(UserDetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();
            //ViewData["plandetail"] = plandetail;
            PopulateAttedanceSessions();
            if (!String.IsNullOrEmpty(AtendenceDate))
            {
                AttendenceDate = DateTime.ParseExact(AtendenceDate, "dd-MM-yyyy", CultureInfo.InvariantCulture);
                var attendance = db.CandidateAttendance.Where(a => a.AttendenceDate == AttendenceDate && a.TrainingId == Id).ToList();
                ViewData["attendancerecord"] = attendance;
                ViewBag.date = AtendenceDate;
            }
            var trainingDetail = db.TrainingSchedule.Find(Id);

            ViewBag.BatchId = trainingDetail.BatchId;
            var date = db.CourseBatch.Find(trainingDetail.BatchId);

            ViewBag.StartDate  = date.FromDate;
            ViewBag.Enddate    = date.ToDate;
            ViewBag.TrainingId = Id;
            //ViewData["CourseBatch"] = db.CourseBatch.Find(trainingDetail.BatchId);

            ViewData["TrainerDetail"] = ems.GetSubscriberWiseEmployeeList(UserDetails.SubscriberId).Where(e => e.UserId == trainingDetail.TrainerId).FirstOrDefault();
            var candidate = student.GetSubscriberWiseCandidateList(UserDetails.SubscriberId, trainingDetail.BatchId).OrderBy(c => c.Name).ToList();

            ViewBag.CandidateCount = candidate.Count;
            ViewData["Candidate"]  = candidate;

            return(View());
        }
Example #19
0
        public ActionResult AddTeamMember(string MemberId)
        {
            string UserId     = User.Identity.GetUserId();
            var    UserDetail = generic.GetUserDetail(UserId);

            ViewData["UserProfile"] = UserDetail;
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(UserDetail.SubscriberId).FirstOrDefault();

            ViewBag.MemberId = MemberId;
            PopulateTeamRoles();
            ViewData["Rights"]     = admin.GetempRights();
            ViewData["TeamMember"] = cms.GetTeamMember(UserId).OrderBy(c => c.Name);
            if (MemberId != null)
            {
                ClientTeamMemberProfileView Team = cms.GetTeamMember(UserId, MemberId).FirstOrDefault();
                var Trights = cms.GetTeamMemberRights(MemberId).AsEnumerable();
                Team.ClientTeamRights  = Trights;
                ViewData["TeamRights"] = Trights;
                PopulateTeamRoles(Team.EmpRoleId);
                return(View(Team));
            }
            return(View());
        }
Example #20
0
        // GET: RMS/RMS

        //[Authorize(Roles = "Employee")]
        public ActionResult Index(string Id, bool status = true)
        {
            string UserId      = User.Identity.GetUserId();
            var    UserDetails = generic.GetUserDetail(UserId);

            ViewData["UserProfile"] = UserDetails;
            ViewData["EmpDetails"]  = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(UserDetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(UserDetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            ViewBag.Result         = "Failed";
            if (status == true)
            {
                ViewBag.Result = "Succeeded";
            }
            PopulateFrequency();
            ViewData["BranchDetails"] = rms.GetTrainer(UserId).FirstOrDefault();
            var QuestionList = rms.GetQuestion(UserDetails.SubscriberId);

            return(View(QuestionList));
        }
Example #21
0
        // GET: CMS/Dashboard
        //[Authorize(Roles = "Admin")]
        public ActionResult Index(bool IsTrail = false)
        {
            UserViewModel userdetails = generic.GetUserDetail(User.Identity.GetUserId());

            ViewData["UserProfile"] = userdetails;
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userdetails.SubscriberId).FirstOrDefault();
            ViewBag.UserId          = userdetails.UserId;
            //var plandetail = admin.GetUserplanDetails(userdetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();
            //ViewData["plandetail"] = plandetail;
            var myTraining = tms.GetTrainingSchedule(userdetails.SubscriberId, "NA");

            ViewData["myTraining"] = myTraining.ToList();
            //ViewData["myTraining"] = myTraining.Where(c => c.Status == "Inprogress").Take(4).ToList();
            //var details = student.GetCandidatePaymentTransaction(userdetails.SubscriberId).Where(c => c.Status != "Initiate");
            //ViewData["FeeDetails"] = details.Take(4).ToList();
            //var userplan = admin.GetUserplanDetails(userdetails.SubscriberId).OrderByDescending(c => c.UserPlanId).FirstOrDefault();
            //if (userplan == null || userplan.PlanEndDate < DateTime.UtcNow || userplan.Status != "Succeeded")
            //{
            //    return RedirectToAction("Plan", "Plan_Pricing", new { area = "Admin" });
            //}

            var getCount = admin.GetCountEntry(userdetails.SubscriberId);

            ViewBag.NotificationCount = admin.SPCountNotification(userdetails.SubscriberId).TOTALNOTIFICATION;
            ViewBag.CourseCount       = admin.SPCountCourse(userdetails.SubscriberId).TOTALCOURSE;

            DateTime WeekFirstdate     = DateTime.Now.Date.AddDays(0 * (Int32)DateTime.Now.DayOfWeek);
            DateTime LastWeekFirstdate = WeekFirstdate.Date.AddDays(-7 * (Int32)DateTime.Now.DayOfWeek);
            DateTime LastWeekLastdate  = WeekFirstdate.Date.AddDays(-2 * (Int32)DateTime.Now.DayOfWeek);

            var TotalTransaction = student.GetCandidatePaymentTransaction(userdetails.SubscriberId).Where(c => c.Status == "Approved" && c.Status == "Succeeded");

            TotalTransaction = TotalTransaction.Where(c => c.PaymentDate >= WeekFirstdate && c.PaymentDate <= DateTime.Today).ToList();
            float CurrentWeektotal = TotalTransaction.Sum(c => c.FeePaid);

            ViewBag.WeekTransaction = CurrentWeektotal;

            var LastWeekTotalTransaction = student.GetCandidatePaymentTransaction(userdetails.SubscriberId).Where(c => c.Status == "Approved" && c.Status == "Succeeded");

            LastWeekTotalTransaction = LastWeekTotalTransaction.Where(c => c.PaymentDate >= LastWeekFirstdate && c.PaymentDate <= LastWeekLastdate).ToList();
            float LastWeektotal = LastWeekTotalTransaction.Sum(c => c.FeePaid);

            ViewBag.LastWeekTransaction = LastWeektotal;

            float avarage = (CurrentWeektotal * 100) / LastWeektotal;

            ViewBag.Average = Convert.ToString(avarage);
            return(View(getCount));
            //return View();
        }
        //[Authorize(Roles = "Employee")]
        public ActionResult BasicDetails(DateTime?DOB, bool status = false)
        {
            string        UserId      = User.Identity.GetUserId();
            UserViewModel userdetails = generic.GetUserDetail(User.Identity.GetUserId());

            ViewData["UserProfile"] = userdetails;
            ViewBag.Result          = "Failed";
            if (status == true)
            {
                ViewBag.Result = "Succeeded";
            }
            ViewData["Reporting"]   = ems.GetSubscriberWiseEmployeeList(userdetails.SubscriberId).Where(r => r.UserId == UserId).FirstOrDefault();
            ViewData["CompanyLogo"] = cms.GetCompanyLogo(userdetails.SubscriberId).FirstOrDefault();
            var plandetail = admin.GetUserplanDetails(userdetails.SubscriberId).Where(c => c.AddOnId == 3).FirstOrDefault();

            ViewData["plandetail"] = plandetail;
            var empdetails = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();

            ViewData["EmpDetails"] = empdetails;
            if (empdetails != null)
            {
                PopulateMaritalStatus(empdetails.MaritalStatus);
                PopulateGenderStatus(empdetails.Gender);
                PopulateNationality(empdetails.Nationality);
                if (empdetails.DOB != null)
                {
                    ViewBag.dob = empdetails.DOB.Value.ToString("dd-MM-yyyy");
                }
                //PopulateEmployementStatus(empdetails.Status);
                //PopulateGrade(empdetails.GradeId);
                //if (empdetails.DOB != null)
                //{
                //    ViewBag.dob = empdetails.DOB.Value.ToString("dd-MM-yyyy");
                //}
                //if (empdetails.DateofJoining != null)
                //{
                //    ViewBag.doj = empdetails.DateofJoining.Value.ToString("dd-MM-yyyy");
                //}
                //if (empdetails.DateofConfirmation != null)
                //{
                //    ViewBag.doc = empdetails.DateofConfirmation.Value.ToString("dd-MM-yyyy");
                //}
            }
            else
            {
                PopulateMaritalStatus();
                PopulateGenderStatus();
                PopulateNationality();
                ViewBag.dob = DOB.Value.ToString("dd-MM-yyyy");
                PopulateEmployementStatus();
                //PopulateGrade();
            }
            ///Achal Jha For Payroll Date : 17-05-2017 Reason : For PAyroll

            return(View(empdetails));
        }
Example #23
0
        // GET: CMS/Trainer
        //[Authorize(Roles = "Employee,Admin")]
        public ActionResult Index(int?page, int PageSize = 10, string Qualification = null, string Organization = null, string Name = null, string Domain = null, string Zone = null, string LanguageKnown = null, string City = null)
        {
            string        UserId      = User.Identity.GetUserId();
            UserViewModel userDetails = generic.GetUserDetail(UserId);

            ViewData["UserProfile"] = userDetails;
            if (userDetails.Role == "Employee")
            {
                var empdetails = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault();
                ViewData["EmpDetails"]  = empdetails;
                ViewData["CompanyLogo"] = cms.GetCompanyLogo(userDetails.SubscriberId).FirstOrDefault();
            }
            PopulatePaging(PageSize);
            ViewBag.Paging = PageSize;
            ViewBag.Page   = page;
            int pageSize   = PageSize;
            int pageNumber = (page ?? 1);

            PopulateDomain();
            PopulateLanguageKnown();
            PopulateQualification();
            PopulateOrganization();
            PopulateZone();
            var InstructorLead = cms.GetInstructerLead(userDetails.SubscriberId);

            if (!string.IsNullOrEmpty(Qualification))
            {
                ViewBag.Qualifications = Qualification;
                var values = InstructorLead.Select(x => "," + x + ",");
                var query  = from c in InstructorLead
                             where values.Any(i => ("," + c.Qualification + ",").Contains(Qualification))
                             select c;
                //InstructorLead = InstructorLead.Where(c => c.Qualification == Qualification).ToList();

                //var query = from c in InstructorLead
                //           where c.Qualification.Contains(Qualification)

                //            select c;
                InstructorLead = query.ToList();
            }
            if (!string.IsNullOrEmpty(Organization))
            {
                ViewBag.Organizations = Organization;
                var values = InstructorLead.Select(x => "," + x + ",");
                var query  = from c in InstructorLead
                             where values.Any(i => ("," + c.Organization + ",").Contains(Organization))
                             select c;
                //InstructorLead = InstructorLead.Where(c => c.Organization == Organization).ToList();
                //var query = from c in InstructorLead
                //            where  (c.Organization.Split(',').Contains(Organization) || c.Organization == Organization)
                //            select c;
                InstructorLead = query.ToList();
            }
            if (!string.IsNullOrEmpty(LanguageKnown))
            {
                ViewBag.LanguageKnowns = LanguageKnown;
                var values = InstructorLead.Select(x => "," + x + ",");
                var query  = from c in InstructorLead
                             where values.Any(i => ("," + c.LanguageKnown + ",").Contains(LanguageKnown))
                             select c;
                //InstructorLead = InstructorLead.Where(c => c.Organization == Organization).ToList();
                //var query = from c in InstructorLead
                //            where  (c.Organization.Split(',').Contains(Organization) || c.Organization == Organization)
                //            select c;
                InstructorLead = query.ToList();
            }
            if (!string.IsNullOrEmpty(Name))
            {
                ViewBag.Name   = Name;
                InstructorLead = (from u in InstructorLead where u.IName.Contains(Name.ToUpper()) select u).ToList();
            }
            if (!string.IsNullOrEmpty(City))
            {
                ViewBag.Cites  = City;
                InstructorLead = (from u in InstructorLead where (u.City ?? "").Contains(City.ToUpper()) select u).ToList();
            }
            if (!string.IsNullOrEmpty(Zone))
            {
                ViewBag.Zones  = Zone;
                InstructorLead = InstructorLead.Where(c => c.Zone == Zone).ToList();
            }
            if (!string.IsNullOrEmpty(Domain))
            {
                ViewBag.Domains = Domain;
                // InstructorLead = InstructorLead.Where(c => c.DomainExpertize == Domain).ToList();
                var values = InstructorLead.Select(x => "," + x + ",");
                var query  = from c in InstructorLead
                             where values.Any(i => ("," + c.DomainExpertize + ",").Contains(Domain))
                             select c;
                //List<InstructorLeadProfileView> inmt= new List<InstructorLeadProfileView>();
                ////InstructorLead = (from u in InstructorLead where u.DomainExpertize.Contains(Domain) select u).ToList();
                //foreach (var item in InstructorLead)
                //{
                //    var InstructorLeadss = (from u in InstructorLead where item.DomainExpertize.StartsWith(Domain) select u);
                //    if(InstructorLeadss != null)
                //    {
                //        inmt.Add(item);
                //    }
                //}
                //InstructorLead = inmt;
                InstructorLead = query.ToList();
            }
            ViewBag.EmCount = InstructorLead.Count();
            return(View(InstructorLead.ToPagedList(pageNumber, pageSize)));
        }