protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_make_appointment); presenter = new MakeAppointmentPresenter(new NavigationService(this.Application)); presenter.SetView(this); presenter.GetPreOrderList(); recyclerView = FindViewById <RecyclerView>(Resource.Id.servicesList); preOrders = new List <Data.Model.PreOrder.PreOrder>() { new Data.Model.PreOrder.PreOrder("123", "11"), new Data.Model.PreOrder.PreOrder("456", "11") }; adapter = new ServiceAdapter(preOrders, presenter, therapists); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); recyclerView.SetLayoutManager(linearLayoutManager); recyclerView.SetAdapter(adapter); backBtn = FindViewById <ImageButton>(Resource.Id.backBtn); backBtn.Click += delegate { OnBackPressed(); Finish(); }; locationTxtView = FindViewById <TextView>(Resource.Id.locationTxtView); dateTxtView = FindViewById <TextView>(Resource.Id.dateTxtView); selectDateBtn = FindViewById <LinearLayout>(Resource.Id.selectDateBtn); startingTimeTxtView = FindViewById <TextView>(Resource.Id.startingTimeTxtView); timeSelectButton = FindViewById <LinearLayout>(Resource.Id.selectStartingTimeBtn); serviceChangeBtn = FindViewById <LinearLayout>(Resource.Id.serviceChangeBtn); createBtn = FindViewById <Button>(Resource.Id.createBtn); locationTxtView.Text = DataManager.GetInstance().GetOutletAddress(); selectDateBtn.Click += DateSelect_OnClick; timeSelectButton.Click += TimeSelectOnClick; serviceChangeBtn.Click += delegate { presenter.GoToAddService(); }; createBtn.Click += delegate { CreateAppointment(); }; }
public ServiceAdapter(List<Data.Model.PreOrder.PreOrder> preOrders, MakeAppointmentPresenter presenter, List<Therapist> therapists) { this.preOrders = preOrders; this.presenter = presenter; this.therapists = therapists; }