示例#1
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);
            }
        }
        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);
            }
        }
        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);
            }
        }
示例#4
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();
 }
 public async Task GetKeyWords()
 {
     getKeyWords = new GetKeyWordUseCase();
     getKeyWords.SetCallBack <IKeywordViewCallback>(this);
     await getKeyWords.Execute();
 }
 public async Task GetDepartments()
 {
     getDepts = new GetDeptsUseCase();
     getDepts.SetCallBack <IDepartmentViewCallback>(this);
     await getDepts.Execute();
 }
示例#7
0
 public async Task UpdateHospitalRating(int id, double rating)
 {
     updateHospital = new UpdateHospitalRatingUseCase(id, rating);
     updateHospital.SetCallBack(this);
     await updateHospital.Execute();
 }
示例#8
0
 public void MyTasks()
 {
     taskView = TaskView.Home;
     usecase  = new GetTaskUseCase(this, taskView);
     usecase.Execute();
 }
示例#9
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();
 }
示例#10
0
 public async Task GetDoctorsByDept(string location, int dept)
 {
     getDocs = new GetDoctorByDeptLocationUseCase(location, dept);
     getDocs.SetCallBack <IDoctorDeptLocationViewCallback>(this);
     await getDocs.Execute();
 }
示例#11
0
 public async Task GetDoctorByLocation(string loc)
 {
     getDocs = new GetDoctorByLocationUseCase(loc.ToUpper());
     getDocs.SetCallBack <IDoctorLocationPresenterCallBack>(this);
     await getDocs.Execute();
 }
示例#12
0
 public async Task GetHospitalByLocation(string loc)
 {
     getHosps = new GetHospitalByLocationUseCase(loc.ToUpper());
     getHosps.SetCallBack <IHospitalLocationPresenterCallBack>(this);
     await getHosps.Execute();
 }
示例#13
0
 public async Task GetHospitalByName(string name, string location)
 {
     getHosps = new GetHospitalByNameUseCase(name.ToUpper(), location);
     getHosps.SetCallBack <IHospitalViewCallback>(this);
     await getHosps.Execute();
 }
 public void AddOrModifyTask(ZTask parentZtask, TaskOperation taskOperation)
 {
     RemoveEmptyListElements();
     usecase = new CreateOrModifyTaskUseCase(Ztasks.ToList <ZTask>(), parentZtask, this, taskOperation);
     usecase.Execute();
 }
示例#15
0
 public async Task GetDoctor(int id)
 {
     getDoctor = new GetDoctorUseCase(id);
     getDoctor.SetCallBack(this);
     await getDoctor.Execute();
 }
示例#16
0
 public async Task GetHospitals(int id)
 {
     getHosps = new GetHospitalByDoctorUseCase(id);
     getHosps.SetCallBack(this);
     await getHosps.Execute();
 }
示例#17
0
 public async Task GetDoctorsByName(string name, string location)
 {
     getDocs = new GetDoctorByNameUseCase(name.ToUpper(), location);
     getDocs.SetCallBack <IDoctorViewCallBack>(this);
     await getDocs.Execute();
 }
示例#18
0
 public void RefreshTasks()
 {
     usecase = new GetTaskUseCase(this, taskView);
     usecase.Execute();
 }
示例#19
0
 public async Task GetHospitals(string location)
 {
     getHosp = new GetHospitalByLocationUseCase(location);
     getHosp.SetCallBack <IHospitalLocationPresenterCallBack>(this);
     await getHosp.Execute();
 }