Ejemplo n.º 1
0
        private CheckInEntryModel GetCreateStateModel()
        {
            CheckInEntryFormData formData     = new CheckInEntryFormData();
            List <Control>       formControls = CreateFormControls(0);
            CheckInDTO           checkInDTO   = new CheckInDTO();

            return(new CheckInEntryModel()
            {
                FormData = formData,
                FormControls = formControls,
                Model = checkInDTO,
            });
        }
Ejemplo n.º 2
0
        private CheckInEntryModel GetUpdateStateModel(int checkInPK)
        {
            CheckInEntryFormData formData     = new CheckInEntryFormData();
            List <Control>       formControls = CreateFormControls(checkInPK);
            CheckInDTO           checkInDTO   = checkInQuery.GetByPrimaryKey(checkInPK);

            if (checkInDTO == null)
            {
                throw new KairosException($"Record with primary key '{checkInDTO.CheckIn_PK}' is not found.");
            }

            return(new CheckInEntryModel()
            {
                FormData = formData,
                FormControls = formControls,
                Model = checkInDTO,
            });
        }