private POEntryModel GetCreateStateModel() { POEntryFormData formData = new POEntryFormData(); PODTO pODTO = new PODTO(); return(new POEntryModel() { FormData = formData, Model = new PODTO(), }); }
private POEntryModel GetUpdateStateModel(int po_PK) { POEntryFormData formData = new POEntryFormData(); PODTO pODTO = POQuery.GetByPrimaryKey(po_PK); if (pODTO == null) { throw new KairosException($"Record with primary key '{po_PK}' is not found."); } return(new POEntryModel() { FormData = formData, Model = pODTO }); }