예제 #1
0
 public async Task GetAppointments(int id)
 {
     getApps = new GetAppointmentsUseCase(id);
     apps    = new ObservableCollection <AppointmentDetails>();
     getApps.SetCallBack(this);
     await getApps.Execute();
 }
예제 #2
0
 public async Task GetLocalities(string s)
 {
     localities      = new ObservableCollection <string>();
     getLocalityList = new GetLocationsUseCase(s);
     getLocalityList.SetCallBack <IGetLocationPresenterCallback>(this);
     await getLocalityList.Execute();
 }
예제 #3
0
 public void UpcomingTasks()
 {
     taskView = TaskView.Upcoming;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
     //Ztasks.Clear();
     //ConvertListData(Upcoming);
 }
예제 #4
0
 public void DelayedTasks()
 {
     taskView = TaskView.Delayed;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
     //Ztasks.Clear();
     //ConvertListData(Delayed);
 }
예제 #5
0
 public void TasksAssignedToOthers()
 {
     taskView = TaskView.AssignedToOthers;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
     //Ztasks.Clear();
     //ConvertListData(AssignedToOthers);
 }
예제 #6
0
 public void TasksForToday()
 {
     taskView = TaskView.Today;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
     //Ztasks.Clear();
     //ConvertListData(Today);
 }
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #12
0
 public void MyTasks()
 {
     taskView = TaskView.Home;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
 }
예제 #13
0
 public async Task GetDoctor(int id)
 {
     getDoctor = new GetDoctorUseCase(id);
     getDoctor.SetCallBack(this);
     await getDoctor.Execute();
 }
예제 #14
0
 public async Task GetHospitals(int id)
 {
     getHosps = new GetHospitalByDoctorUseCase(id);
     getHosps.SetCallBack(this);
     await getHosps.Execute();
 }
예제 #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();
 }
예제 #16
0
 public async Task GetHospitalByLocation(string loc)
 {
     getHosps = new GetHospitalByLocationUseCase(loc.ToUpper());
     getHosps.SetCallBack <IHospitalLocationPresenterCallBack>(this);
     await getHosps.Execute();
 }
예제 #17
0
 public async Task GetKeyWords()
 {
     getKeyWords = new GetKeyWordUseCase();
     getKeyWords.SetCallBack <IKeywordViewCallback>(this);
     await getKeyWords.Execute();
 }
예제 #18
0
 public async Task GetDoctorByLocation(string loc)
 {
     getDocs = new GetDoctorByLocationUseCase(loc.ToUpper());
     getDocs.SetCallBack <IDoctorLocationPresenterCallBack>(this);
     await getDocs.Execute();
 }
예제 #19
0
 public async Task GetHospitalByName(string name, string location)
 {
     getHosps = new GetHospitalByNameUseCase(name.ToUpper(), location);
     getHosps.SetCallBack <IHospitalViewCallback>(this);
     await getHosps.Execute();
 }
예제 #20
0
 public async Task GetDoctorsByDept(string location, int dept)
 {
     getDocs = new GetDoctorByDeptLocationUseCase(location, dept);
     getDocs.SetCallBack <IDoctorDeptLocationViewCallback>(this);
     await getDocs.Execute();
 }
예제 #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();
 }
예제 #22
0
 public async Task UpdateHospitalRating(int id, double rating)
 {
     updateHospital = new UpdateHospitalRatingUseCase(id, rating);
     updateHospital.SetCallBack(this);
     await updateHospital.Execute();
 }
예제 #23
0
 public async Task GetDoctorsByName(string name, string location)
 {
     getDocs = new GetDoctorByNameUseCase(name.ToUpper(), location);
     getDocs.SetCallBack <IDoctorViewCallBack>(this);
     await getDocs.Execute();
 }
예제 #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();
 }
예제 #26
0
 public void RefreshTasks()
 {
     usecase = new GetTaskUseCase(this, taskView);
     usecase.Execute();
 }
예제 #27
0
 public async Task GetHospitals(string location)
 {
     getHosp = new GetHospitalByLocationUseCase(location);
     getHosp.SetCallBack <IHospitalLocationPresenterCallBack>(this);
     await getHosp.Execute();
 }