Exemplo n.º 1
0
 public async Task GetAppointments(int id)
 {
     getApps = new GetAppointmentsUseCase(id);
     apps    = new ObservableCollection <AppointmentDetails>();
     getApps.SetCallBack(this);
     await getApps.Execute();
 }
Exemplo n.º 2
0
 public async Task GetLocalities(string s)
 {
     localities      = new ObservableCollection <string>();
     getLocalityList = new GetLocationsUseCase(s);
     getLocalityList.SetCallBack <IGetLocationPresenterCallback>(this);
     await getLocalityList.Execute();
 }
Exemplo n.º 3
0
 public void UpcomingTasks()
 {
     taskView = TaskView.Upcoming;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
     //Ztasks.Clear();
     //ConvertListData(Upcoming);
 }
Exemplo n.º 4
0
 public void DelayedTasks()
 {
     taskView = TaskView.Delayed;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
     //Ztasks.Clear();
     //ConvertListData(Delayed);
 }
Exemplo n.º 5
0
 public void TasksAssignedToOthers()
 {
     taskView = TaskView.AssignedToOthers;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
     //Ztasks.Clear();
     //ConvertListData(AssignedToOthers);
 }
Exemplo n.º 6
0
 public void TasksForToday()
 {
     taskView = TaskView.Today;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
     //Ztasks.Clear();
     //ConvertListData(Today);
 }
Exemplo n.º 7
0
 public async Task UpdateDoctor(int id, double rating)
 {
     updateDoc = new UpdateDoctorRatingUseCase(id, rating);
     updateDoc.SetCallBack(this);
     try
     {
         await updateDoc.Execute();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine("UPDATE VIEWMODEL EXCEPTION=" + e.Message);
     }
 }
Exemplo n.º 8
0
 public async Task BookAppointment(int p_id, int doc_id, int hosp_id, string app_date, string start)
 {
     bookApp = new BookAppointmentUseCase(p_id, doc_id, hosp_id, app_date, start);
     bookApp.SetCallBack(this);
     try
     {
         await bookApp.Execute();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine("Appointment EXCEPTION=" + e.Message);
     }
 }
Exemplo n.º 9
0
        public async Task GetHospital(int id)
        {
            Doctors             = new ObservableCollection <DoctorInHospitalDetails>();
            getHospital         = new GetHospitalUseCase(id);
            getDoctorByHospital = new GetDoctorByHospitalUseCase(id);
            getHospital.SetCallBack <IHospitalDetailViewCallBack>(this);
            getDoctorByHospital.SetCallBack <IDoctorHospitalDetailViewCallback>(this);
            try
            {
                await getHospital.Execute();

                await getDoctorByHospital.Execute();
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("EXCEPTION=" + e.Message);
            }
        }
Exemplo n.º 10
0
        public async Task GetDoctor(int id)
        {
            hospitals = new ObservableCollection <HospitalInDoctorDetails>();
            getDoc    = new GetDoctorUseCase(id);
            getHosp   = new GetHospitalByDoctorUseCase(id);

            getDoc.SetCallBack <IDoctorDetailViewCallBack>(this);
            getHosp.SetCallBack <IHospitalDoctorViewCallBack>(this);
            try
            {
                await getDoc.Execute();

                await getHosp.Execute();
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("EXCEPTION=" + e.Message);
            }
        }
Exemplo n.º 11
0
        public async Task GetCurrentAddress()
        {
            //var temp = await GetPosition();
            //latitude = temp.Coordinate.Latitude;
            //longitude = temp.Coordinate.Longitude;

            getAddress = new GetAddressUseCase();


            //getDoctor.SetCallBack<DoctorViewCallback>(this);

            getAddress.SetCallBack <IGetAddressPresenterCallback>(this);

            try
            {
                await getAddress.Execute();
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("EXCEPTION=" + e.Message);
            }
        }
Exemplo n.º 12
0
 public void MyTasks()
 {
     taskView = TaskView.Home;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
 }
Exemplo n.º 13
0
 public async Task GetDoctor(int id)
 {
     getDoctor = new GetDoctorUseCase(id);
     getDoctor.SetCallBack(this);
     await getDoctor.Execute();
 }
Exemplo n.º 14
0
 public async Task GetHospitals(int id)
 {
     getHosps = new GetHospitalByDoctorUseCase(id);
     getHosps.SetCallBack(this);
     await getHosps.Execute();
 }
Exemplo n.º 15
0
 public async Task GetTimeSlots(int doc_id, int hosp_id, string app)
 {
     getTimeSlots = new GetRosterUseCase(doc_id, hosp_id, app);
     getTimeSlots.SetCallBack(this);
     await getTimeSlots.Execute();
 }
Exemplo n.º 16
0
 public async Task GetHospitalByLocation(string loc)
 {
     getHosps = new GetHospitalByLocationUseCase(loc.ToUpper());
     getHosps.SetCallBack <IHospitalLocationPresenterCallBack>(this);
     await getHosps.Execute();
 }
Exemplo n.º 17
0
 public async Task GetKeyWords()
 {
     getKeyWords = new GetKeyWordUseCase();
     getKeyWords.SetCallBack <IKeywordViewCallback>(this);
     await getKeyWords.Execute();
 }
Exemplo n.º 18
0
 public async Task GetDoctorByLocation(string loc)
 {
     getDocs = new GetDoctorByLocationUseCase(loc.ToUpper());
     getDocs.SetCallBack <IDoctorLocationPresenterCallBack>(this);
     await getDocs.Execute();
 }
Exemplo n.º 19
0
 public async Task GetHospitalByName(string name, string location)
 {
     getHosps = new GetHospitalByNameUseCase(name.ToUpper(), location);
     getHosps.SetCallBack <IHospitalViewCallback>(this);
     await getHosps.Execute();
 }
Exemplo n.º 20
0
 public async Task GetDoctorsByDept(string location, int dept)
 {
     getDocs = new GetDoctorByDeptLocationUseCase(location, dept);
     getDocs.SetCallBack <IDoctorDeptLocationViewCallback>(this);
     await getDocs.Execute();
 }
Exemplo n.º 21
0
 public async Task GetHospitalByDept(string location, int dept, int rating = -1)
 {
     getHosps = new GetHospitalByDeptUseCase(location.ToUpper(), dept, rating);
     getHosps.SetCallBack <IHospitalByDeptViewCallback>(this);
     await getHosps.Execute();
 }
Exemplo n.º 22
0
 public async Task UpdateHospitalRating(int id, double rating)
 {
     updateHospital = new UpdateHospitalRatingUseCase(id, rating);
     updateHospital.SetCallBack(this);
     await updateHospital.Execute();
 }
Exemplo n.º 23
0
 public async Task GetDoctorsByName(string name, string location)
 {
     getDocs = new GetDoctorByNameUseCase(name.ToUpper(), location);
     getDocs.SetCallBack <IDoctorViewCallBack>(this);
     await getDocs.Execute();
 }
Exemplo n.º 24
0
 public async Task GetDepartments()
 {
     getDepts = new GetDeptsUseCase();
     getDepts.SetCallBack <IDepartmentViewCallback>(this);
     await getDepts.Execute();
 }
 public void AddOrModifyTask(ZTask parentZtask, TaskOperation taskOperation)
 {
     RemoveEmptyListElements();
     usecase = new CreateOrModifyTaskUseCase(Ztasks.ToList <ZTask>(), parentZtask, this, taskOperation);
     usecase.Execute();
 }
Exemplo n.º 26
0
 public void RefreshTasks()
 {
     usecase = new GetTaskUseCase(this, taskView);
     usecase.Execute();
 }
Exemplo n.º 27
0
 public async Task GetHospitals(string location)
 {
     getHosp = new GetHospitalByLocationUseCase(location);
     getHosp.SetCallBack <IHospitalLocationPresenterCallBack>(this);
     await getHosp.Execute();
 }