예제 #1
0
        public FPAttLog VHasUser(FPAttLog fpAttLog, IFPUserService _fpUserService)
        {
            FPUser fpUser = _fpUserService.GetObjectById(fpAttLog.FPUserId);

            if (fpUser == null)
            {
                fpAttLog.Errors.Add("Generic", "FPUser Tidak ada");
            }
            return(fpAttLog);
        }
예제 #2
0
        public FPTemplate VHasUser(FPTemplate fpTemplate, IFPUserService _fpUserService)
        {
            FPUser fpUser = _fpUserService.GetObjectById(fpTemplate.FPUserId);

            if (fpUser == null)
            {
                fpTemplate.Errors.Add("FPUser", "Tidak ada");
            }
            return(fpTemplate);
        }
예제 #3
0
        public dynamic GetInfo(int Id)
        {
            FPUser model = new FPUser();

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

                model.Errors.Add("Generic", "Error " + ex);

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

            return(Json(new
            {
                model.Id,
                model.EmployeeId,
                EmployeeNIK = model.Employee != null ? model.Employee.NIK : "",
                EmployeeName = model.Employee != null ? model.Employee.Name : "",
                model.PIN,
                model.PIN2,
                model.Privilege,
                model.Name,
                model.Password,
                model.Card,
                model.Group,
                model.TimeZones,
                model.VerifyMode,
                model.IsEnabled,
                model.Remark,
                model.Errors
            }, JsonRequestBehavior.AllowGet));
        }