Example #1
0
        public ActionResult AttendanceReport()
        {
            int empcode = Convert.ToInt32(Session["EmpCode"]);
            AttendanceReportsDTO     result     = new AttendanceReportsDTO();
            IEnumerable <OfficeDTOs> officelist = _officeServices.GetClildOfficeListByEmpCode(empcode);
            List <int> nepaliyears = _reportServices.GetYearList();

            List <SelectListItem> sl  = new List <SelectListItem>();
            List <SelectListItem> yrs = new List <SelectListItem>();
            List <SelectListItem> Mth = _reportServices.NepaliMonthList();


            foreach (int str in nepaliyears)
            {
                yrs.Add(new SelectListItem
                {
                    Text  = str.ToString(),
                    Value = str.ToString()
                });
            }
            foreach (OfficeDTOs str in officelist)
            {
                sl.Add(new SelectListItem
                {
                    Text  = str.OfficeName,
                    Value = str.OfficeId.ToString()
                });
            }

            result.BranchSelectList = sl;
            result.MonthList        = Mth;
            result.YearList         = yrs;
            return(View(result));
        }
Example #2
0
        public ActionResult Index()
        {
            int EmpCode = Convert.ToInt32(Session["Empcode"]);

            ViewBag.dllOfficeTypeList = _officeService.GetClildOfficeListByEmpCode(Convert.ToInt32(ViewBag.EmpCode));

            ViewBag.dllDesginationList = _designationService.GetDesignationList().ToList();
            ViewBag.dllLeaveYearList   = _LeaveApplicationService.GetLeaveYearSelectList();

            return(View());
        }
        // GET: OverallPayrollSheet
        public ActionResult Index()
        {
            int EmpCode = Convert.ToInt32(Session["Empcode"]);

            int fyid     = Convert.ToInt32(Request["fyId"]);
            int officeId = Convert.ToInt32(Request["officeId"]);

            if (fyid == 0)
            {
                fyid = _fiscalService.GetCurrentFyId();
            }
            if (officeId == 0)
            {
                officeId = Convert.ToInt32(Session["OfficeId"]);
            }

            ViewBag.fsId     = fyid;
            ViewBag.officeId = officeId;

            IEnumerable <PayrollSalaryViewModel> ViewList = _PayrollGenerationService.GetYearlyPayrollSalaryTable(fyid, officeId);

            ViewBag.FiscalsDropdown = _fiscalService.GetFiscalDropDown();
            ViewBag.OfficeList      = _officeService.GetClildOfficeListByEmpCode(EmpCode);

            return(View(ViewList));
        }
Example #4
0
        public ActionResult Index(DailyAttendanceFilterViewModel att)
        {
            att.searchdate = Convert.ToDateTime(NepEngDate.NepToEng(att.searchdateNP));

            try
            {
                ViewBag.date               = att.searchdateNP;
                ViewBag.empdoce            = att.EmpCode;
                ViewBag.Desgid             = att.DsgId;
                ViewBag.officeid           = att.officeid;
                ViewBag.ddlDesignationList = _designationServices.GetDesignationList();
                int empcode = Convert.ToInt32(Session["EmpCode"]);
                //IEnumerable<OfficeDTOs> officelist = _officeServices.GetClildOfficeListByEmpCode(empcode);

                int AdminEmpCode = ViewBag.EmpCode;

                ViewBag.ddlOfficeTypeList = _officeServices.GetClildOfficeListByEmpCode(empcode);
                IEnumerable <DailyAttendanceFilterViewModel> list = _attendanceDailyServices.GetAttendanceDailyStatus(AdminEmpCode, att.searchdate, att.EmpCode, att.DsgId, att.officeid);
                return(View(list));
            }
            catch (Exception Ex)
            {
                ViewBag.Error = Ex.Message;
                return(View());
            }
        }
        public ActionResult CreateHoliday()
        {
            HolidayDTOs offieList = new HolidayDTOs();
            IEnumerable <OfficeDTOs>   officelist = _officeServices.GetClildOfficeListByEmpCode(Convert.ToInt32(ViewBag.EmpCode));
            IEnumerable <EthnicityDTO> ethnicity  = _ethnicityServices.GetEthnicityList();
            IEnumerable <ReligionDTO>  religion   = _religionServices.GetReligionList();
            List <SelectListItem>      sl         = new List <SelectListItem>();
            List <SelectListItem>      eth        = new List <SelectListItem>();
            List <SelectListItem>      rel        = new List <SelectListItem>();
            List <SelectListItem>      gender     = new List <SelectListItem>();

            gender.Add(new SelectListItem
            {
                Text  = "All",
                Value = "All"
            });

            gender.Add(new SelectListItem
            {
                Text  = "Male",
                Value = "Male"
            });
            gender.Add(new SelectListItem
            {
                Text  = "Female",
                Value = "Female"
            });


            rel.Add(new SelectListItem
            {
                Text  = "All",
                Value = "0"
            });

            eth.Add(new SelectListItem
            {
                Text  = "All",
                Value = "0"
            });

            sl.Add(new SelectListItem
            {
                Text  = "All",
                Value = "0"
            });

            foreach (OfficeDTOs str in officelist)
            {
                sl.Add(new SelectListItem
                {
                    Text  = str.OfficeName,
                    Value = str.OfficeId.ToString()
                });
            }



            foreach (EthnicityDTO row in ethnicity)
            {
                eth.Add(new SelectListItem
                {
                    Text  = row.EthnicityName,
                    Value = row.EthnicityId.ToString()
                });
            }

            foreach (ReligionDTO row in religion)
            {
                rel.Add(new SelectListItem
                {
                    Text  = row.ReligionName,
                    Value = row.ReligionId.ToString()
                });
            }


            offieList.BranchSelectList    = sl;
            offieList.EthnicitySelectList = eth;
            offieList.ReligionSelectList  = rel;
            offieList.GenderList          = gender;

            return(View(offieList));
        }
Example #6
0
        public ActionResult Index(int?page, string EmpName, int?SearchEmpCode, int?OfficeId, int?DeptId, int?DesgId, int?GroupId, int?BgId, int?LevelId, int?RankId, int?ShiftId, int?SectionId, int?JobTypeId)
        {
            if (!ViewBag.AllowView)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }
            if (ViewBag.AllowView == true)
            {
                ViewBag.dllOfficeTypeList  = _officeTypeServices.GetClildOfficeListByEmpCode(Convert.ToInt32(ViewBag.EmpCode));
                ViewBag.dllDepartmentList  = _departmentServices.GetDepartmentlist();
                ViewBag.dllDesginationList = _designationServices.GetDesignationList().ToList();
                ViewBag.ddlGroupList       = _groupServices.GetGroupList();
                ViewBag.ddlBgGroupList     = _bgGroupService.GetBusinessGroupByEmpRoleId(Convert.ToInt32(ViewBag.EmpRoleId));

                ViewBag.dllLevelList   = _levelServices.GetLevellist();
                ViewBag.dllRankList    = _rankServices.GetRankList();
                ViewBag.dllShiftList   = _shiftService.GetShiftsLIst();
                ViewBag.dllSectionList = _sectionServices.GetSectionList();
                ViewBag.dllJobTypeList = _jobTypeservices.GetJobTypeList();


                int roleId = Convert.ToInt32(ViewBag.EmpRoleId);
                // // int curentemp = Convert.ToInt32(Session["Empcode"]); //Logged in user employee code
                //   var emplist = _employeeService.GetEmployeeList(curentemp);
                EmployeeSearchViewModel searchModel = new EmployeeSearchViewModel();

                ViewBag.SearchEmpCode = SearchEmpCode;
                ViewBag.EmpName       = EmpName;
                ViewBag.BgId          = BgId;
                ViewBag.OfficeId      = OfficeId;
                ViewBag.DesgId        = DesgId;
                ViewBag.GroupId       = GroupId;
                ViewBag.LevelId       = LevelId;
                ViewBag.RankId        = RankId;
                ViewBag.ShiftId       = ShiftId;
                ViewBag.SectionId     = SectionId;
                ViewBag.JobTypeId     = JobTypeId;

                var emplist = _employeeService.
                              SearchEmployees(SearchEmpCode, EmpName, OfficeId,
                                              DeptId, DesgId, GroupId, BgId, roleId);
                if (LevelId > 0)
                {
                    emplist = emplist.Where(a => a.EmpLevelId == searchModel.LevelId).ToList();
                }
                if (RankId > 0)
                {
                    emplist = emplist.Where(a => a.EmpRankId == searchModel.RankId).ToList();
                }
                if (ShiftId > 0)
                {
                    emplist = emplist.Where(a => a.EmpShiftId == searchModel.ShiftId).ToList();
                }
                if (SectionId > 0)
                {
                    emplist = emplist.Where(a => a.EmpSectionId == searchModel.SectionId).ToList();
                }
                if (JobTypeId > 0)
                {
                    emplist = emplist.Where(a => a.EmpJobTypeId == searchModel.JobTypeId).ToList();
                }
                int pageSizes = 20;

                int pageNumber = (page ?? 1);
                return(View(emplist.ToPagedList(pageNumber, pageSizes)));
            }
            else
            {
                ViewBag.errorMsg = "Not Authorize";
                return(View());
            }
        }