private void btnclick(object sender, EventArgs e) { Rc = new RegistrationClass(); Rc.CreateDatabaseBook(); String t = C_id.ToString(); List <CLocation> res = Rc.SelectBookedLocation(t); List <CLocation> k = Rc.SelectTableLocation(); int o = k.Count; if (res != null) { int i = res.Count; CLocation Loc = res.Last(); CLocation Loc1 = res[0]; Mssage = Loc.Message; Addrss = Loc.address; } RM = new Book(); RM.Message = Mssage; RM.C_id = C_id.Text; RM.D_id = D_id.Text; RM.Address = Addrss; bool r = Rc.InsertBook(RM); if (r) { FindViewById <TextView>(Resource.Id.textView1).Text = "Booked Successfully ! Enjoy Your Ride"; } }
private void showData() { progressBar.Visibility = ViewStates.Visible; // List<listItem> mylist = db.abc(); progressBar.Visibility = ViewStates.Gone; myadapter = new CustomerRideAdaptor(this, RC.SelectTableLocation()); mylist.Adapter = myadapter; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.CustomerRideOption); RC = new RegistrationClass(); List <CLocation> V = RC.SelectTableLocation(); mylist = FindViewById <ListView>(Resource.Id.listView1); progressBar = FindViewById <ProgressBar>(Resource.Id.progressBar1); showData(); }