Exemplo n.º 1
0
        public dynamic GetInfo(int Id)
        {
            SalaryEmployee model = new SalaryEmployee();

            try
            {
                model = _salaryEmployeeService.GetObjectById(Id);
            }
            catch (Exception ex)
            {
                LOG.Error("GetInfo", ex);
                Dictionary <string, string> Errors = new Dictionary <string, string>();
                Errors.Add("Generic", "Error " + ex);

                return(Json(new
                {
                    Errors
                }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new
            {
                model.Id,
                model.EmployeeId,
                EmployeeNIK = model.Employee.NIK,
                EmployeeName = model.Employee.Name,
                model.EffectiveDate,
                model.Description,
                model.Errors
            }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public SalaryEmployeeDetail VHasSalaryEmployee(SalaryEmployeeDetail salaryEmployeeDetail, ISalaryEmployeeService _salaryEmployeeService)
        {
            SalaryEmployee salaryEmployee = _salaryEmployeeService.GetObjectById(salaryEmployeeDetail.SalaryEmployeeId);

            if (salaryEmployee == null)
            {
                salaryEmployeeDetail.Errors.Add("SalaryEmployee", "Tidak ada");
            }
            return(salaryEmployeeDetail);
        }