Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToDo: Attached multiple courses to a single term #3

Open
yax51 opened this issue Feb 12, 2020 · 1 comment
Open

ToDo: Attached multiple courses to a single term #3

yax51 opened this issue Feb 12, 2020 · 1 comment

Comments

@yax51
Copy link
Owner

yax51 commented Feb 12, 2020

Need to set int Term property on Courses table and update to Terms.Id on when termName is selected on picker.
Should be able to use a raw query assigned to a variable.

@yax51
Copy link
Owner Author

yax51 commented Feb 12, 2020

Added int TermId to Courses.
Successfully set Courses.TermId to Term.Id of selected Term.
Will look for "cleaner" option, but it works.
Code:

var selectedTerm = (Terms)termPicker.SelectedItem;
                    var courses = conn.Table<Courses>().FirstOrDefault();
                    courses.TermId = selectedTerm.Id;
               
                    var termId = courses.TermId;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant