private BTSTechnologyEntryModel GetCreateStateModel() { BTSTechnologyEntryFormData formData = new BTSTechnologyEntryFormData(); List <Control> formControls = CreateFormControls(0); BTSTechnologyDTO btsTechnologyDTO = new BTSTechnologyDTO(); return(new BTSTechnologyEntryModel() { FormData = formData, FormControls = formControls, Model = btsTechnologyDTO, }); }
private BTSTechnologyEntryModel GetUpdateStateModel(int btsTechnologyPK) { BTSTechnologyEntryFormData formData = new BTSTechnologyEntryFormData(); List <Control> formControls = CreateFormControls(btsTechnologyPK); BTSTechnologyDTO btsTechnologyDTO = btsTechnologyQuery.GetByPrimaryKey(btsTechnologyPK); if (btsTechnologyDTO == null) { throw new KairosException($"Record with primary key '{btsTechnologyDTO.BTSTechnology_PK}' is not found."); } return(new BTSTechnologyEntryModel() { FormData = formData, FormControls = formControls, Model = btsTechnologyDTO, }); }