Esempio n. 1
0
        public ActionResult KajMaKhateuneEdit(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/Edit", res));
        }
Esempio n. 2
0
        public ActionResult HistoryDetail(int empCode, int id)
        {
            if (!ViewBag.AllowView)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }
            ListOfDatas(empCode);
            EmployeeJobHistoryDTO res = _jobHistoryService.GetJobHistoryById(id);

            return(View("History/Details", res));
        }
        public ActionResult HistoryDetail(string id)
        {
            int empCode = Convert.ToInt32(Session["EmpCode"]);

            ListOfDatas(empCode);
            EmployeeJobHistoryDTO res = _jobHistoryService.GetJobHistoryById(Convert.ToInt32(id));

            return(View(res));
        }
        public ActionResult Index(int Empcode)
        {
            int LoginEmpCode = Convert.ToInt32(Session["EmpCode"]);

            int isAccessAllow = _employeeService.GetIsProfileViewable(Empcode, LoginEmpCode);

            if (isAccessAllow == 0)
            {
                ViewBag.Error = "You do not have permission to view profile of employee code : " + Empcode;
                return(PartialView("_partialviewNotFound"));
            }
            try
            {
                ViewBag.SideBar = _moduleService.AdminEmployeeDetailsMenu(Empcode);
                EmployeeDetailsViewModel reEmp   = _employeeService.GetEmployeeDetails(Empcode);
                EmployeeEditViewModel    Details = _employeeService.GetEmployeeByID(Empcode);
                IEnumerable <EmployeeFamilyViewModel>   Familydetails = _employeeService.GetEmployeeFamilyByID(Empcode);
                IEnumerable <EmployeePrizeDTO>          res           = _empPrizeService.GetAllPrizeOfEmployee(Empcode);
                IEnumerable <EmployeeSkillViewModel>    skill         = _employeeService.GetEmployeeSkillsByID(Empcode);
                IEnumerable <EmployeeDocumentViewModel> document      = _employeeService.GetEmployeeDocumentsByID(Empcode);
                EmployeeDetailAdminViewModel            EmpDetails    = new EmployeeDetailAdminViewModel();


                EmpDetails.EmpDetails    = reEmp;
                EmpDetails.OtherDetails  = Details;
                EmpDetails.Familydetails = Familydetails;
                EmpDetails.Prize         = res;
                EmpDetails.Skill         = skill;
                EmpDetails.Documents     = document;

                //get current history id
                EmployeeJobHistoryDTO jobhistoryCurrent = new EmployeeJobHistoryDTO();
                EmployeeJobHistoryDTO jobhistoryAppoint = new EmployeeJobHistoryDTO();
                int currentHistoryId = _jobhistory.GetJobHistoryOfEmployeeWIthCondition(Empcode, "current");
                if (currentHistoryId > 0)
                {
                    jobhistoryCurrent = _jobhistory.GetJobHistoryById(currentHistoryId);
                }
                else
                {
                    jobhistoryCurrent = null;
                }
                //get appointment history id
                int appointHistoryId = _jobhistory.GetJobHistoryOfEmployeeWIthCondition(Empcode, "appoint");;
                if (appointHistoryId > 0)
                {
                    jobhistoryAppoint = _jobhistory.GetJobHistoryById(appointHistoryId);
                }
                else
                {
                    jobhistoryAppoint = null;
                }

                EmpDetails.EmployeeCurrentJobHistory = jobhistoryCurrent;
                EmpDetails.EmployeeAppointJobHistory = jobhistoryAppoint;


                return(View(EmpDetails));
            }
            catch (Exception Exception)
            {
                throw new Exception(Exception.ToString());
            }
        }