private async void Create_Clicked(object sender, EventArgs e) { if (UserName.Text == null || Password.Text == null || FirstName.Text == null || LastName.Text == null || Email.Text == null) { Error.Text = "All fields are mandatory"; return; } else { try { Error.Text = ""; var db = SQLLiteType.GetDb(); db.CreateTable <UserDB>(); var rec = InsertData(UserName.Text, FirstName.Text, LastName.Text, Email.Text, Password.Text); if (rec >= 1) { await DisplayAlert("Successfully", "Created", "OK"); await Navigation.PopAsync(); } else { await DisplayAlert("Failed", "Created", "OK"); } } catch (Exception ex) { } } }
public UserQuery() { s = SQLLiteType.GetDb(); }