After payment success how to store payment success page in sqlite

66 Views Asked by At

How to store payment success page in SQLite so that I can link login page to SQLite

1

There are 1 best solutions below

1
L Prathyusha On

Below are the steps we will perform:

  1. Create a UI design for 3 pages - SignUp.axml (for User Registration), Main.axml (for Login User) & Welcome.axml (for screen after login).
  2. UserDetails.cs (Strongly Typed DTO)
  3. Helper.cs (Helper Class - for DB Operation)
  4. Activities w.r.t. UI Pages - SignUp.cs (for User Registration activity), MainActivity.cs (for User Login activity) & Welcome.cs (for welcome screen activity after login).

For registration and Log-In, we will require User information, so we will create a strongly-typed class called UserDetails. We'll use the same for storing the details in the SQLite database.

public class UserDetails    
    {    
        public string ID { get; set; }    
        public string Username { get; set; }    
        public string FirstName { get; set; }    
        public string LastName { get; set; }    
        public string Address { get; set; }    
        public string Country { get; set; }    
        public string Email { get; set; }    
        public string Password { get; set; }    
        public string Mobile { get; set; }    
        public UserDetails() { }    
        public UserDetails(string Id, string username, string fname,string lname,string address,string country, string email, string password, string mobile) //Constructor with all parameters    
        {    
            ID = Id;    
            Username = username;    
            FirstName = fname;    
            LastName = lname;    
            Address = address;    
            Country = country;    
            Email = email;    
            Password = password;    
            Mobile = mobile;    
        }    
        public UserDetails(string Password) //Constructor with one parameter    
        {    
            this.Password = Password;    
        }    
           
    }     

Check this: - https://developer.android.com/training/data-storage