コード例 #1
0
        public ActionResult Details(int id)
        {
            PayrollInsurancePremiumDTO Record = new PayrollInsurancePremiumDTO();

            Record             = _PayrollInsurancePremiumService.GetOnePayrollInsurancePremium(id);
            ViewBag.EmpCode    = Record.EmpCode;
            Record.StartDateNP = NepEngDate.EngToNep(Convert.ToDateTime(Record.StartDate)).ToString().Replace('/', '-');
            Record.EndDateNP   = NepEngDate.EngToNep(Convert.ToDateTime(Record.EndDate)).ToString().Replace('/', '-');
            if (Record.AmountType == "A")
            {
                Record.AmountType = "Annual";
            }
            else if (Record.AmountType == "H")
            {
                Record.AmountType = "Half Yearly";
            }
            else if (Record.AmountType == "Q")
            {
                Record.AmountType = "Quarterly";
            }
            else if (Record.AmountType == "M")
            {
                Record.AmountType = "Monthly";
            }
            return(View("../PayrollInsurancePremium/Details", Record));
        }
コード例 #2
0
ファイル: KajController.cs プロジェクト: monjurulrana/EasyHRM
        public ActionResult Details(int id)
        {
            EmployeeJobHistoryDTO    Record      = _jobHistoryService.GetJobHistoryById(id);
            EmployeeDetailsViewModel partialData = _employeeService.GetEmployeeDetails(Record.EmpCode);
            EmployeeKaazViwModel     res         = new EmployeeKaazViwModel();

            res.LetterIssueDateNP = (NepEngDate.EngToNep(Convert.ToDateTime(Record.LetterIssueDate)));
            res.KajStartDateNP    = (NepEngDate.EngToNep(Convert.ToDateTime(Record.KajStartDate)));
            res.KajEndDateNP      = (NepEngDate.EngToNep(Convert.ToDateTime(Record.KajEndDate)));
            res.Id = Record.HistoryId;
            res.LetterIssueDate        = Record.LetterIssueDate;
            res.LetterRefNo            = Record.LetterRefNo;
            res.LetterChalaniNumber    = Record.ChalaniNumber;
            res.KajStartDate           = Record.KajStartDate;
            res.KajEndDate             = Record.KajEndDate;
            res.SadarGarneEmployeeCode = Record.SadarGarneEmployeeCode;
            res.KaajType    = Record.KaajType;
            res.Instruction = Record.Instruction;
            res.Remarks     = Record.Remarks;
            res.Designation = partialData.Designation;
            res.JobType     = partialData.JobType;
            res.Department  = partialData.Department;
            res.OfficeName  = partialData.OfficeName;
            res.Rank        = partialData.Rank;
            res.Name        = partialData.Name;
            res.Section     = partialData.Section;
            res.Level       = partialData.Level;
            res.Name        = partialData.Name;
            res.EmpCode     = Record.EmpCode;
            ListOfDatas(Record.EmpCode);
            return(View("../Employee/Kajmakhataune/Details", res));
        }
コード例 #3
0
        public ActionResult EditFamily(int id)
        {
            EmployeeFamilyViewModel res = new EmployeeFamilyViewModel();

            res        = _empFamilyService.GetEmpFamilyByID(id);
            res.FDobNP = NepEngDate.EngToNep(Convert.ToDateTime(res.FDob));
            return(View(res));
        }
コード例 #4
0
        public ActionResult Update(int id)
        {
            //ViewBag.SideBar = _moduleService.AdminEmployeeDetailsMenu(id);
            EmployeeFamilyDTO Record = new EmployeeFamilyDTO();

            Record        = _EmployeeFamilyService.GetOneEmployeeFamily(id);
            Record.FDobNP = !String.IsNullOrEmpty(Convert.ToString(Record.FDob)) ? NepEngDate.EngToNep(Convert.ToDateTime(Record.FDob)) : null;
            return(View("../Employee/Family/Update", Record));
        }
コード例 #5
0
        public ActionResult Update(int id)
        {
            PayrollLeaveDeductionDTO Record = _payrollLeaveDeductionService.GetOnePayrollLeaveDeduction(id);

            Record.EmployeeCodeSelectlist = _LeaveEarnedService.GetBrancheEmployeeSelectList(Convert.ToInt32(ViewBag.Empcode));
            Record.YearSelectList         = _SpecialleavetypeService.GetYearSelectList();
            Record.LeaveDateNepali        = (NepEngDate.EngToNep(Record.LeaveDate));
            Record.LeaveTypeSelectList    = _payrollLeaveDeductionService.GetPayrollLeaveDeductionLeaveTypeSelectList();
            Record.EmpId = Record.EmpCode;
            return(View("../Leave/PayrollLeaveDeduction/Update", Record));
        }
コード例 #6
0
        // GET: PayrollOvertimes/Edit/5
        public ActionResult Edit(int id)
        {
            int EmpCode            = Convert.ToInt32(Session["Empcode"]);
            PayrollOvertimeDTO res = new PayrollOvertimeDTO();

            res = _payrollOvertimeService.GetPayrollOvertimeById(id);
            res.OvertimeDateNP        = (NepEngDate.EngToNep(Convert.ToDateTime(res.OvertimeDate)));
            res.ApproveStatusDateNP   = (NepEngDate.EngToNep(Convert.ToDateTime(res.ApproveStatusDate)));
            res.OvertimeAppliedDateNP = (NepEngDate.EngToNep(Convert.ToDateTime(res.OvertimeAppliedDate)));
            res.ApproverList          = _dynamicSelectList.GetLeaveApproverSelectList(res.EmpCode, "Overtime");
            ViewBag.EmpCode           = res.EmpCode;
            ViewBag.ddlEmployeeList   = _dynamicSelectList.GetEmployeeByEmpCode(EmpCode).ToList();
            return(View(res));
        }
コード例 #7
0
        public ActionResult Update(int id)
        {
            int EmpCode = Convert.ToInt32(Session["Empcode"]);
            PayrollInsurancePremiumDTO Record = new PayrollInsurancePremiumDTO();

            Record = _PayrollInsurancePremiumService.GetOnePayrollInsurancePremium(id);
            Record.InsuranceCompanySelectlist = _PayrollInsurancePremiumService.GetInsuranceCompanySelectList();
            Record.AmountTypeSelectList       = StaticSelectList.AmountTypeSelectList();
            ViewBag.ddlEmployeeList           = _dynamicSelectList.GetEmployeeByEmpCode(EmpCode).ToList();
            ViewBag.EmpCode    = Record.EmpCode;
            Record.StartDateNP = NepEngDate.EngToNep(Convert.ToDateTime(Record.StartDate)).ToString().Replace('/', '-');
            Record.EndDateNP   = NepEngDate.EngToNep(Convert.ToDateTime(Record.EndDate)).ToString().Replace('/', '-');
            return(View("../PayrollInsurancePremium/Update", Record));
        }
コード例 #8
0
        // GET: PayrollOvertimes
        public ActionResult Index()
        {
            List <PayrollOvertimeDTO> list = _payrollOvertimeService.GetAllPayrollOvertime();

            foreach (var item in list)
            {
                item.ApproverName         = _employeeService.GetEmployeeByID(Convert.ToInt32(item.ApprovedById)).Name;
                item.OvertimeDateNP       = (NepEngDate.EngToNep(Convert.ToDateTime(item.OvertimeDate)));
                item.ApproveStatusDateNP  = (NepEngDate.EngToNep(Convert.ToDateTime(item.ApproveStatusDate)));
                ViewBag.Overtimedate      = Convert.ToDateTime(item.ApproveStatusDate).ToString("yyyy-MMM-dd");
                ViewBag.ApproveStatusDate = Convert.ToDateTime(item.ApproveStatusDate).ToString("yyyy-MMM-dd");
            }


            return(View(list));
        }
コード例 #9
0
        public ActionResult Update(int id)
        {
            int            curentemp = Convert.ToInt32(Session["Empcode"]);
            int            roleid    = Convert.ToInt32(Session["RoleId"]);
            LeaveEarnedDTO Record    = new LeaveEarnedDTO();

            Record = _LeaveEarnedService.GetOneLeaveEarned(id);
            Record.WorkedStartDateNP   = NepEngDate.EngToNep(Record.WorkedStartDate);
            Record.WorkedEndDateNP     = NepEngDate.EngToNep(Record.WorkedEndDate);
            Record.YearSelectList      = _SpecialleavetypeService.GetYearSelectList();
            Record.LeaveTypeSelectList = _LeaveEarnedService.GetEarnedLeaveTypeList();


            //   Record.EmployeeCodeSelectlist = _LeaveEarnedService.GetSelectedBranchEmployeeSelectList(curentemp,Convert.ToInt32(Record.EmpCode));
            Record.ApproveEmployeeCodeSelectlist = _DynamicSelectList.GetLeaveApproverSelectList(Record.EmpCode, "Earning");
            Record.EmpId = Record.EmpCode;
            Record.GetRecommederSelectList = _DynamicSelectList.GetLeaveRecommenderSelectList(Record.EmpCode, "Earning");

            return(View("../Leave/LeaveEarned/Update", Record));
        }
コード例 #10
0
ファイル: KajController.cs プロジェクト: monjurulrana/EasyHRM
        public ActionResult Index(int empCode)
        {
            if (!ViewBag.AllowView)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }
            ListOfDatas(empCode);
            List <EmployeeJobHistoryDTO> res = _jobHistoryService.GetAllHistoryOfEmployeeForKaaz(empCode);

            foreach (var item in res)
            {
                item.DesignationName   = _designationServices.GetDesignationById((int)item.DesgId).DsgName;
                item.LetterIssueDateNP = (NepEngDate.EngToNep(Convert.ToDateTime(item.LetterIssueDate)));
                item.KajStartDateNP    = (NepEngDate.EngToNep(Convert.ToDateTime(item.KajStartDate)));
                item.KajEndDateNP      = (NepEngDate.EngToNep(Convert.ToDateTime(item.KajEndDate)));
            }

            ViewBag.EmpCode = empCode;
            return(View("../Employee/kajmakhataune/Index", res));
        }
コード例 #11
0
        public ActionResult EditEducation(int id)
        {
            EmpEducationDTO res = new EmpEducationDTO();

            res = _empEducationService.GetEducationByEduId(id);
            res.PassedDateNP = NepEngDate.EngToNep(Convert.ToDateTime(res.PassedDate));
            List <SelectListItem> educationLevel = new List <SelectListItem>();

            foreach (var row in _educationLevel.GetEducationLevel())
            {
                educationLevel.Add(new SelectListItem
                {
                    Text  = row.LevelName,
                    Value = row.LevelId.ToString()
                });
            }
            IEnumerable <SelectListItem> CountryList = _countryService.GetCountryList();

            ViewBag.EducationLevel = educationLevel;
            ViewBag.Countries      = CountryList;
            return(View(res));
        }
コード例 #12
0
 public ActionResult Index()
 {
     try
     {
         //ViewBag.SideBar = _moduleService.AdminEmployeeDetailsMenu(id);
         PayrollInsuranceInformation Record = new PayrollInsuranceInformation();
         Record.PayrollInsurancePremiumList = new List <PayrollInsurancePremiumDTO>();
         Record.PayrollInsurancePremiumList = _PayrollInsurancePremiumService.GetAllPayrollInsurancePremium().ToList();
         foreach (var item in Record.PayrollInsurancePremiumList)
         {
             item.StartDateNP = NepEngDate.EngToNep(Convert.ToDateTime(item.StartDate)).ToString().Replace('/', '-');
             item.EndDateNP   = NepEngDate.EngToNep(Convert.ToDateTime(item.EndDate)).ToString().Replace('/', '-');
             if (item.AmountType == "A")
             {
                 item.AmountType = "Annual";
             }
             else if (item.AmountType == "H")
             {
                 item.AmountType = "Half Yearly";
             }
             else if (item.AmountType == "Q")
             {
                 item.AmountType = "Quarterly";
             }
             else if (item.AmountType == "M")
             {
                 item.AmountType = "Monthly";
             }
         }
         //Record.EmpId = id;
         //IEnumerable<PayrollInsurancePremiumDTO> list = _PayrollInsurancePremiumService.GetAllPayrollInsurancePremium();
         return(View(Record));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
コード例 #13
0
        // GET: Banks/Edit/5
        public ActionResult Edit(int id)
        {
            BankDTO bankByID = _bankService.GetBankId(id);

            bankByID.BankAddedDateNP = !String.IsNullOrEmpty(Convert.ToString(bankByID.BankAddedDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(bankByID.BankAddedDate)) : null;

            return(View(bankByID));
        }
コード例 #14
0
        public ActionResult EducationEdit(int empId, int eduId)
        {
            if (!ViewBag.AllowView)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }
            List <SelectListItem> educationLevel = new List <SelectListItem>();

            foreach (var row in _educationLevel.GetEducationLevel())
            {
                educationLevel.Add(new SelectListItem
                {
                    Text  = row.LevelName,
                    Value = row.LevelId.ToString()
                });
            }
            IEnumerable <SelectListItem> countries = _countryService.GetCountryList();

            ViewBag.Countries      = countries;
            ViewBag.EducationLevel = educationLevel;
            ViewBag.EmployeeDetail = _empDetails.GetEmployeeDetails(empId);
            ViewBag.SideBar        = _moduleService.AdminEmployeeDetailsMenu(empId);
            EmpEducationDTO data = _empEducationService.GetEducationByEduId(eduId);

            data.PassedDateNP = !String.IsNullOrEmpty(Convert.ToString(data.PassedDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(data.PassedDate)) : null;

            //data.PassedDate = Convert.ToDateTime( NepDateConverter.EngToNep(data.PassedDate).ToString());
            return(View("../Employee/Education/EducationEdit", data));
        }
コード例 #15
0
        public ActionResult DarbandiEdit(int DarbandiId)
        {
            try
            {
                if (ViewBag.AllowEdit)
                {
                    ViewBag.officeList = _officeService.GetOfficeData();
                    ViewBag.desgList   = _designationServices.GetDesignationList();
                    DarbandiDTO DarbandiById = _darbandiService.GetDarbandiById(DarbandiId);
                    DarbandiById.DarbandiDateNP = !String.IsNullOrEmpty(Convert.ToString(DarbandiById.DarbandiDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(DarbandiById.DarbandiDate)) : null;

                    ModelState.Clear();
                    return(View(DarbandiById));
                }
                else
                {
                    ViewBag.Error = "You are not Authorize to use this Page";
                    return(PartialView("_partialviewNotFound"));
                }
            }
            catch (Exception Ex)
            {
                ViewBag.error = Ex.Message;
                throw Ex;
            }
        }
コード例 #16
0
        public ActionResult LeaveYearEdit(int id)
        {
            LeaveYearDTO leaveYearD = _leaveYearService.GetLeaveYearInfoById(id);

            leaveYearD.YearStartDateNp = !String.IsNullOrEmpty(Convert.ToString(leaveYearD.YearStartDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(leaveYearD.YearStartDate)) : null;
            leaveYearD.YearEndDateNp   = !String.IsNullOrEmpty(Convert.ToString(leaveYearD.YearEndDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(leaveYearD.YearEndDate)) : null;

            return(View(leaveYearD));
        }
コード例 #17
0
        public ActionResult EmployeePrizeEdit(int empCode, int id)
        {
            if (!ViewBag.AllowEdit)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }
            EmployeePrizeDTO res = _empPrizeService.GetPrizeById(id);

            res.PrizeDateNP        = !String.IsNullOrEmpty(Convert.ToString(res.PrizeDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(res.PrizeDate)) : null;
            ViewBag.EmployeeDetail = _employeeService.GetEmployeeDetails(empCode);
            ViewBag.SideBar        = _moduleService.AdminEmployeeDetailsMenu(empCode);
            List <SelectListItem> designationList = new List <SelectListItem>();

            foreach (var row in _designationServices.GetDesignationList())
            {
                designationList.Add(new SelectListItem
                {
                    Text  = row.DsgName,
                    Value = row.DsgId.ToString()
                });
            }
            ViewBag.DesignationList = designationList;
            return(View("../Employee/EmployeePrize/Edit", res));
        }
コード例 #18
0
        public ActionResult Edit(int Id, int EId)
        {
            if (!ViewBag.AllowEdit)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }
            ViewBag.EmployeeDetail = _employeeService.GetEmployeeDetails(EId);
            ViewBag.SideBar        = _moduleService.AdminEmployeeDetailsMenu(EId);
            EmpTrainingDTO Record = _employeeTrainingService.GetEmployeeTrainingById(Id);

            ListOfDatas(EId);
            Record.LetterDateNP             = !String.IsNullOrEmpty(Convert.ToString(Record.LetterDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(Record.LetterDate)) : null;
            Record.TrainingStartDateNP      = !String.IsNullOrEmpty(Convert.ToString(Record.TrainingStartDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(Record.TrainingStartDate)) : null;
            Record.TrainingEndDateNP        = !String.IsNullOrEmpty(Convert.ToString(Record.TrainingEndDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(Record.TrainingEndDate)) : null;
            Record.TrainingVisitStartDateNP = !String.IsNullOrEmpty(Convert.ToString(Record.TrainingVisitStartDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(Record.TrainingVisitStartDate)) : null;
            Record.TrainingVisitEndDateNP   = !String.IsNullOrEmpty(Convert.ToString(Record.TrainingVisitEndDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(Record.TrainingVisitEndDate)) : null;

            Record.OfficeList                = OfficeList;
            Record.DesignationList           = DesignationList;
            Record.RankList                  = RankList;
            Record.AssignedByList            = _employeeService.GetEmployeeSelectList();
            Record.SponsorshipList           = _employeeService.GetSponsorshipList();
            Record.CountryList               = _countryService.GetCountryList();
            Record.AssignedByList            = _employeeService.GetEmployeeSelectList();
            Record.NationalInternationalList = _employeeService.GetNationInternationalList();
            return(View(Record));
        }
コード例 #19
0
        public ActionResult HistoryEdit(int empCode, int id)
        {
            if (!ViewBag.AllowEdit)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }
            ListOfDatas(empCode);
            EmployeeJobHistoryDTO res  = _jobHistoryService.GetJobHistoryById(id);
            JobHistoryViewModel   data = new JobHistoryViewModel();

            data.EmployeeDetails                    = _employeeService.GetEmployeeDetails(empCode);
            data.JobHistories                       = _jobHistoryService.GetJobHistoryById(id);
            data.JobHistories.DecisionDateNP        = !String.IsNullOrEmpty(Convert.ToString(data.JobHistories.DecisionDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(data.JobHistories.DecisionDate)) : null;
            data.JobHistories.LetterIssueDateNP     = !String.IsNullOrEmpty(Convert.ToString(data.JobHistories.LetterIssueDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(data.JobHistories.LetterIssueDate)) : null;
            data.JobHistories.EffectiveDateNP       = !String.IsNullOrEmpty(Convert.ToString(data.JobHistories.EffectiveDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(data.JobHistories.EffectiveDate)) : null;
            data.JobHistories.EffectiveTillDateNP   = !String.IsNullOrEmpty(Convert.ToString(data.JobHistories.EffectiveTillDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(data.JobHistories.EffectiveTillDate)) : null;
            data.JobHistories.ServiceHolidingDateNP = !String.IsNullOrEmpty(Convert.ToString(data.JobHistories.ServiceHolidingDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(data.JobHistories.ServiceHolidingDate)) : null;
            data.JobHistories.OfficeJoinDateNP      = !String.IsNullOrEmpty(Convert.ToString(data.JobHistories.OfficeJoinDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(data.JobHistories.OfficeJoinDate)) : null;
            data.JobHistories.SadarDateNP           = !String.IsNullOrEmpty(Convert.ToString(data.JobHistories.SadarDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(data.JobHistories.SadarDate)) : null;

            List <SelectListItem> SubGroupList = new List <SelectListItem>();

            foreach (var row in _serviceEventSubGroupService.GetSubGroupById((int)res.ServiceEventGroupId))
            {
                SubGroupList.Add(new SelectListItem
                {
                    Text  = row.ServiceEventSubGroupName,
                    Value = row.ServiceEventSubGroupId.ToString()
                });
            }
            ViewBag.SubGroupList = SubGroupList;
            ViewBag.remoteList   = StaticSelectList.RemoteAreaTypeList();

            switch (res.ServiceEventGroupId)
            {
            case 2: return(View("../Employee/Transfer/Edit", data));

            case 3: return(View("../Employee/Kajmakhataune/Edit", data));

            case 7: return(View("../Employee/Badhuwa/Edit", data));

            case 5: return(View("../Employee/Punishment/Edit", data));

            case 6:

                return(View("../Employee/Abakas/Edit", data));
            }
            return(RedirectToAction("EmployeeDetailsAdmin", new { id = empCode }));
        }