Ejemplo n.º 1
0
        public ActionResult DesignationEdit(int DesgId)
        {
            ViewBag.designationList = _designationServices.GetDesignationList();
            ViewBag.levelList       = _levelService.GetLevellist();
            DesignationDTO DesignationListById = _designationServices.GetDesignationById(DesgId);

            return(View(DesignationListById));
        }
Ejemplo n.º 2
0
 public HttpResponseMessage GetById(int id)
 {
     try
     {
         var Designation = _designation.GetDesignationById(id);
         return(Request.CreateResponse(HttpStatusCode.OK, Designation));
     }
     catch (Exception ex)
     {
         throw new ApiDataException(1000, "Designation not found", HttpStatusCode.NotFound);
     }
 }
Ejemplo n.º 3
0
        public object Get(int id)
        {
            var output = new ResponseDetail();

            try
            {
                if (id > 0)
                {
                    var designationDetail = _designationService.GetDesignationById(id);
                    output.Data    = designationDetail;
                    output.Success = true;
                    return(output);
                }
                //output.Message = "Enter proper id";
                output.Success = false;
                return(output);
            }
            catch (Exception ex)
            {
                output.Success = false;
                output.Message = ex.Message;
                return(output);
            }
        }
Ejemplo n.º 4
0
        public ActionResult UpdateDesignation(Guid DesignationId)
        {
            DesignationModel designation = null;

            try
            {
                designation = _DesignationServices.GetDesignationById(DesignationId);
                return(PartialView("~/Areas/Admin/Views/Designation/_UpdateDesignation.cshtml", designation));
            }
            catch (Exception ex)
            {
            }

            return(PartialView("~/Areas/Admin/Views/Designation/_UpdateDesignation.cshtml", designation));
        }
Ejemplo n.º 5
0
        public ActionResult Create(int?id)
        {
            DesignationModel exModel = new Models.DesignationModel();

            if (id != null)
            {
                var designationModel = designationService.GetDesignationById(Convert.ToInt32(id));

                if (designationModel != null)
                {
                    exModel = designationModel.MapServerToClient();
                }
            }

            ViewBag.MessageVM = TempData["message"] as MessageViewModel;
            return(View(exModel));
        }
Ejemplo n.º 6
0
        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));
        }
Ejemplo n.º 7
0
        public ActionResult Index(int OfficeId, int?DesgId, int LeaveYearId)
        {
            int EmpCode = Convert.ToInt32(Session["Empcode"]);

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

            ViewBag.dllLeaveYearList   = _LeaveApplicationService.GetLeaveYearSelectList();
            ViewBag.dllDesginationList = _designationService.GetDesignationList().ToList();
            ViewBag.OfficeId           = OfficeId;
            ViewBag.DesgId             = DesgId;
            ViewBag.LeaveYearId        = LeaveYearId;
            var emplist = _employeeService.EmployeeSearch(OfficeId, DesgId);
            List <MultipleLeaveYearlyReportViewModel> masterRecord = new List <MultipleLeaveYearlyReportViewModel>();

            foreach (var empdata in emplist)
            {
                var desgndata = _designationService.GetDesignationById(empdata.EmpDesgId);
                var empdbdata = _employeeService.GetEmployeeByID(empdata.EmpCode);
                LeaveYearlyReportViewModel homeleave = new LeaveYearlyReportViewModel();
                homeleave = _LeaveAddAdmin.YearlyOfficewiseLeaveReport(empdata.EmpCode, 1, LeaveYearId);

                LeaveYearlyReportViewModel sickleave = new LeaveYearlyReportViewModel();
                sickleave = _LeaveAddAdmin.YearlyOfficewiseLeaveReport(empdata.EmpCode, 2, LeaveYearId);

                LeaveYearlyReportViewModel casualleave = new LeaveYearlyReportViewModel();
                casualleave = _LeaveAddAdmin.YearlyOfficewiseLeaveReport(empdata.EmpCode, 3, LeaveYearId);

                LeaveYearlyReportViewModel compensationLeave = new LeaveYearlyReportViewModel();
                compensationLeave = _LeaveAddAdmin.YearlyOfficewiseLeaveReport(empdata.EmpCode, 9, LeaveYearId);

                MultipleLeaveYearlyReportViewModel single = new MultipleLeaveYearlyReportViewModel()
                {
                    EmpName             = empdbdata.Name,
                    DesgName            = desgndata.DsgName,
                    OfficeName          = _officeService.GetOfficeName(OfficeId),
                    EmpCode             = empdata.EmpCode,
                    H_BalanceDays       = homeleave.BalanceDays,
                    H_TotalLeaveDays    = homeleave.TotalLeaveDays,
                    H_TotalTaken        = homeleave.TotalTaken,
                    H_PrevYearLeaveDays = homeleave.PrevYearBalance,
                    H_ThisYearLeaveDays = homeleave.ThisYearEarned,

                    S_BalanceDays    = sickleave.BalanceDays,
                    S_TotalLeaveDays = sickleave.TotalLeaveDays,
                    S_TotalTaken     = sickleave.TotalTaken,

                    Ca_BalanceDays    = casualleave.BalanceDays,
                    Ca_TotalLeaveDays = casualleave.TotalLeaveDays,
                    Ca_TotalTaken     = casualleave.TotalTaken,

                    Co_BalanceDays    = compensationLeave.BalanceDays,
                    Co_TotalLeaveDays = compensationLeave.TotalLeaveDays,
                    Co_TotalTaken     = compensationLeave.TotalTaken,
                };
                masterRecord.Add(single);
            }



            return(View(masterRecord));
        }
 public ActionResult <Designation> GetDesignationById(int id)
 {
     return(_designationService.GetDesignationById(id));
 }