public IHttpActionResult GetForm(int id)
        {
            string accessType = "IzinCutiStatus_ViewAll";

            if (id > 0)
            {
                ThrowIfUserHasNoRole(accessType);
            }
            using (IzinCutiStatusEntryDataProvider izinCutiStatusEntryDataProvider = new IzinCutiStatusEntryDataProvider(Db, ActiveUser, AccessControl, new IzinCutiStatusQuery(Db)))
            {
                var data = izinCutiStatusEntryDataProvider.Get(id);
                SaveLog("IzinCutiStatus", "GetForm", JsonConvert.SerializeObject(new { primaryKey = id }));
                return(Ok(new SuccessResponse(data)));
            }
        }
        public SaveResult <IzinCutiStatusEntryModel> Save(IzinCutiStatusDTO izinCutiStatusDTO, DateTime dateStamp)
        {
            ModelValidationResult validationResult = izinCutiStatusValidator.Validate(izinCutiStatusDTO);
            bool success = false;
            IzinCutiStatusEntryModel model = null;

            if (validationResult.IsValid)
            {
                success = true;
                Update(izinCutiStatusDTO, dateStamp);
                Db.SaveChanges();
                model = izinCutiStatusEntryDataProvider.Get(izinCutiStatusDTO.IzinCutiStatus_PK);
            }

            return(new SaveResult <IzinCutiStatusEntryModel>
            {
                Success = success,
                Message = validationResult.IsValid ? "Data successfully updated." : "Validation error occured.",
                Model = model,
                ValidationResult = validationResult
            });
        }