private SOWIssueEntryModel GetCreateStateModel()
        {
            SOWIssueEntryFormData formData     = new SOWIssueEntryFormData();
            List <Control>        formControls = CreateFormControls(0);
            SOWIssueDTO           sowIssueDTO  = new SOWIssueDTO();

            return(new SOWIssueEntryModel()
            {
                FormData = formData,
                FormControls = formControls,
                Model = sowIssueDTO,
            });
        }
        private SOWIssueEntryModel GetUpdateStateModel(int sowIssuePK)
        {
            SOWIssueEntryFormData formData     = new SOWIssueEntryFormData();
            List <Control>        formControls = CreateFormControls(sowIssuePK);
            SOWIssueDTO           sowIssueDTO  = sowIssueQuery.GetByPrimaryKey(sowIssuePK);

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

            return(new SOWIssueEntryModel()
            {
                FormData = formData,
                FormControls = formControls,
                Model = sowIssueDTO,
            });
        }