示例#1
0
		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);
			SetContentView(Resource.Layout.home_dashboard);

			LocalActivityManager localActMgr = new LocalActivityManager (this, false);
			localActMgr.DispatchCreate (bundle);
			tabHost = FindViewById<TabHost> (Resource.Id.tabhost);
			tabHost.Setup (localActMgr);

			MApplication.getInstance().userDashboardType = (int)Constants.LISTTYPE.ALERTS;
			CreateTab(typeof(AlertActivity), "alerts", GetString(Resource.String.alerts_title), Resource.Drawable.ic_tab_alerts, 0);
			CreateTab(typeof(BookingRequestsActivity), "bookingrequests", GetString(Resource.String.booking_requests_title), Resource.Drawable.ic_tab_bookingrequests, 1);
			CreateTab(typeof(ConfirmedRequestsActivity), "confirmedbookings", GetString(Resource.String.confirmed_booking_title), Resource.Drawable.ic_tab_confirmedbookings, 2);
			CreateTab(typeof(PastBookingActivity), "pastbookings", GetString(Resource.String.past_booking_title), Resource.Drawable.ic_tab_pasthistory, 3);

			getNumBooking = new GetNumberBooking (this);
			getNumBooking.actionGetNumBooking = this;
			getNumBooking.getNumBookingRequest ();

			homeDashBoardActivity = this;
			popupNoticeAlert = new PopupNoticeInfomation (this);
			popupNoticeAlert.noticeDelegate = this;

			popupNoticeRequest = new PopupNoticeInfomation (this);
			popupNoticeRequest.noticeDelegate = this;

			popupNoticeConfirm = new PopupNoticeInfomation (this);
			popupNoticeConfirm.noticeDelegate = this;

			popupNoticePast = new PopupNoticeInfomation (this);
			popupNoticePast.noticeDelegate = this;

			TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostNotifyAlertChange, new TCSelector (reloadDashBoard));
		}
示例#2
0
		protected override void OnResume ()
		{
			base.OnResume ();
			if (constants.isLoginByAnother) {
				constants.isLoginByAnother = false;
				PopupNoticeInfomation popup = new PopupNoticeInfomation (this);
				popup.noticeDelegate = this;
				popup.showNoticeDialog (GetString(Resource.String.title_notice), GetString(Resource.String.expired_session));
			}

			if (constants.network == null) {
				constants.network = new NetworkStatusMonitor ();
				constants.network.Start ();
			}

			//Reset value
			PastBookingActivity.pastBookingActivity = null;
			MApplication.getInstance ().sEmailAddress = "";
			MApplication.getInstance ().isLogedIn = false;
			MApplication.getInstance ().isLoginAfterSearch = false;
			MApplication.getInstance ().isConsultant = false;
			constants.currentActivity = null;
			constants.currentActivityNotLogIn = this;
			constants.specialistInfo = null;
			constants.bookingInfo = null;
			constants.eventInfo = null;
			constants.durationInfo = null;
			constants.deferInfo = null;
			constants.isSearchHome = false;
			Utils.keepAccessToken ("");
		}			
示例#3
0
		public ChangeStatusPopup (Activity _activity) : base (_activity)
		{
			this._activity = _activity;
			progress = ProgressDialog.Show (_activity, "", "", true);
			progress.SetContentView(new ProgressBar(_activity));
			progress.Hide ();
			popupNotice = new PopupNoticeInfomation (_activity);
		}
示例#4
0
		public static void onSelectImageOk(Context context, UploadPhoto uploadPhoto, PopupNoticeInfomation popupNotice,  int requestCode, Result resultCode, Intent data, Guid bookingId, bool isInConference){				
			if (data == null) {
				try{
					Intent mediaScanIntent = new Intent (Intent.ActionMediaScannerScanFile);
					Uri contentUri = Uri.FromFile (App._file);
					mediaScanIntent.SetData (contentUri);
					//SendBroadcast (mediaScanIntent);
					uploadPhoto.onResultChoosed (contentUri, isInConference, bookingId);
				} catch(Exception e){
					Console.Write (e.Message);
					popupNotice.showNoticeDialog (context.GetString(Resource.String.title_notice), context.GetString(Resource.String.get_img_from_lib));
				}
			} else {
				uploadPhoto.onResultChoosed (data, isInConference, bookingId);
			}
		}
示例#5
0
		public void onNetworkDisConnect(object obj){
			if (constants.currentActivity != null) {
				constants.currentActivity.RunOnUiThread (() => {
					onShowPopUpNotice (GetString(Resource.String.network_title), GetString(Resource.String.network_disconnect));
				});
			} else {
				if (constants.currentActivityNotLogIn != null) {
					constants.currentActivityNotLogIn.RunOnUiThread (() => {
						PopupNoticeInfomation popup = new PopupNoticeInfomation (constants.currentActivityNotLogIn);
						popup.noticeDelegate = this;
						popup.showNoticeDialog (GetString (Resource.String.network_title), GetString (Resource.String.network_disconnect));
					});
				} else {
					Toast.MakeText (Application.Context, GetString (Resource.String.network_disconnect), ToastLength.Long).Show ();
				}
			}
		}
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			SetContentView (Resource.Layout.customer_calling_layout);

			bloaded = false;

			ActionBar.NavigationMode = ActionBarNavigationMode.Standard;
			ActionBar.SetTitle(Resource.String.calling_title);
			ActionBar.SetDisplayShowTitleEnabled (false);
			ActionBar.SetDisplayHomeAsUpEnabled(true);
			ActionBar.SetDisplayShowHomeEnabled (true);

			setHeadingTitle (Resource.String.calling_title);

			callingActivity = this;

			llProgress = FindViewById<LinearLayout> (Resource.Id.llProgressBar);
			llProgress.Visibility = ViewStates.Gone;

			tvName = FindViewById<TextView> (Resource.Id.tv_name_spec_calling);
			tvTimeDuration = FindViewById<TextView> (Resource.Id.tv_time_customer_calling);
			tvCostDuration = FindViewById<TextView> (Resource.Id.tv_cost_customer_calling);
			img_upfile = FindViewById<ImageView> (Resource.Id.img_upfile_calling);
			var avatar = FindViewById<ImageView> (Resource.Id.img_avatar_customer_calling);
			llFileAttach = FindViewById<LinearLayout> (Resource.Id.ll_file_attach_customer_calling);

			// Follow up action
			llGrFollowUpAction = FindViewById<LinearLayout> (Resource.Id.llGrFollowUpAction);
			imgRatingFollowUp = FindViewById<ImageView> (Resource.Id.imgRatingFolowUp);
			imgFavoriteFollowUp = FindViewById<ImageView> (Resource.Id.imgFavoriteFolowUp);
			imgEmailFollowUp = FindViewById<ImageView> (Resource.Id.imgEmailFollowUp);
			imgWaiveFeeFollowUp = FindViewById<ImageView> (Resource.Id.imgWaiveFeeFollowUp);
			imgTranscribeFollowUp = FindViewById<ImageView> (Resource.Id.imgTranscribeFollowUp);
			imgUpPhotoFollowUp = FindViewById<ImageView> (Resource.Id.imgUpPhotoFollowUp);
			imgReplayFollowUp = FindViewById<ImageView> (Resource.Id.imgReplayFollowUp);
			llRatingFollowUp = FindViewById<LinearLayout> (Resource.Id.llRatingFollowUp);
			llFavoriteFollowUp = FindViewById<LinearLayout> (Resource.Id.llFavoriteFollowUp);
			llEmailFollowUp = FindViewById<LinearLayout> (Resource.Id.llEmailFollowUp);
			llWaiveFollowUp = FindViewById<LinearLayout> (Resource.Id.llWaiveFeeFollowUp);
			llTransribeFollowUp = FindViewById<LinearLayout> (Resource.Id.llTranscribeFollowUp);
			llUpphotoFollowUp = FindViewById<LinearLayout> (Resource.Id.llUploadPhotoFollowUp);
			llReplayFollowUp = FindViewById<LinearLayout> (Resource.Id.llReplayFollowUp);
			tvWaiveFeeNotice = FindViewById<TextView> (Resource.Id.tv_notice_waived_calling);

			UrlImageViewHelper.UrlImageViewHelper.SetUrlDrawable (avatar, HttpConstants.BASE_URL + constants.durationInfo.AvatarPath, Resource.Drawable.special_home, constants.iTimeLoading, this);

			tvName.Text = constants.durationInfo.UserFullName;

			llGrFollowUpAction.Visibility = ViewStates.Gone;

			uploadPhoto = new UploadPhoto(this);
			uploadPhoto.actionUploadPhotoDelegate = this;

			deleteFile = new Teleconsult.Android.DeleteFile (this);
			deleteFile.deleteFileAction = this;

			// Action
			Background bgUpfile = new Background (this, Resource.Drawable.camera, Resource.Drawable.camera_pressed);
			img_upfile.SetBackgroundDrawable (bgUpfile);
			img_upfile.Click += (sender, e) => {
				if(uploadPhoto == null){
					uploadPhoto = new UploadPhoto(this);
					uploadPhoto.actionUploadPhotoDelegate = this;
				}
				uploadPhoto.selectActionUpload();
			};

			Background bgRating = new Background (this, Resource.Drawable.icon_feedback, Resource.Drawable.icon_feedback_pressed);
			imgRatingFollowUp.SetBackgroundDrawable (bgRating);
			imgRatingFollowUp.Click += (sender, e) => {
				if(isFeeback) {
					if(dialogFeedbackReview == null){
						dialogFeedbackReview = new RatingFeedbackReview(this);
					}
					dialogFeedbackReview.showFeedbackReview(iRatingNumber, sFeedBackContent);
				} else {
					if(dialogFeedback == null){
						dialogFeedback = new RatingFeedbackUI(this, callId);
						dialogFeedback.actionRatingDelegate = this;
					}
					dialogFeedback.showRatingFeedback();
				}
			};

			imgFavoriteFollowUp.Click += (sender, e) => {
				if (isFavorite) {
					if(dialogFavorite == null){
						dialogFavorite = new FavoriteUI(this);
						dialogFavorite.actionFavoriteDelegate = this;
					}
					dialogFavorite.removeFavoriteRequest(specId);
				} else {
					if(dialogFavorite == null){
						dialogFavorite = new FavoriteUI(this);
						dialogFavorite.actionFavoriteDelegate = this;
					}
					dialogFavorite.addToFavouriteRequest(specId);
				}
			};

			Background bgEmail = new Background (this, Resource.Drawable.ic_emailprofile, Resource.Drawable.ic_emailprofile_pressed);
			imgEmailFollowUp.SetBackgroundDrawable (bgEmail);
			imgEmailFollowUp.Click += (sender, e) => {
				SendEmailUI dialog = new SendEmailUI(this);
				dialog.actionDelegate = this;
				dialog.showEmailDialog(specId);
			};

			Background bgWaivefee = new Background (this, Resource.Drawable.ic_waive, Resource.Drawable.ic_waive_pressed);
			imgWaiveFeeFollowUp.SetBackgroundDrawable (bgWaivefee);
			imgWaiveFeeFollowUp.Click += (sender, e) => {
				if(dtEndWaiveFee != null && dtEndWaiveFee.AddMinutes (Constants.pTimeWaiveFee) >= Utils.getDateTimeNow (MApplication.getInstance ().timezoneName)){
					if (popupConfirm == null) {
						popupConfirm = new PopUpConfirm (this);
						popupConfirm.actionConfirmDelegate = this;
					}
					popupConfirm.showConfirmDialog (GetString(Resource.String.waive_fee_title), GetString(Resource.String.waive_fee_content), "Yes", "No");
				} else {
					popupNotice.showNoticeDialog(GetString(Resource.String.waive_fee_expired_title), GetString(Resource.String.waive_fee_expired));
					imgWaiveFeeFollowUp.Enabled = false;
					imgWaiveFeeFollowUp.SetBackgroundResource(Resource.Drawable.ic_waive_disable);
					imgWaiveFeeFollowUp.SetImageResource(Resource.Drawable.ic_waive_disable);
				}
			};

			Background bgTranscribe = new Background (this, Resource.Drawable.ic_transcribe, Resource.Drawable.ic_transcribe_pressed);
			imgTranscribeFollowUp.SetBackgroundDrawable (bgTranscribe);
			imgTranscribeFollowUp.Click += (sender, e) => {
				TranscribeRequest transcribe = new TranscribeRequest(this);
				transcribe.transcribeDelegate = this;
				transcribe.getTranscribe(callId, recordUrl);
			};

			Background bgUpphoto = new Background (this, Resource.Drawable.camera, Resource.Drawable.camera_pressed);
			imgUpPhotoFollowUp.SetBackgroundDrawable (bgUpphoto);
			imgUpPhotoFollowUp.Click += (sender, e) => {
				if(uploadPhoto == null){
					uploadPhoto = new UploadPhoto(this);
					uploadPhoto.actionUploadPhotoDelegate = this;
				}
				uploadPhoto.selectActionUpload();
			};

			Background bgReplay = new Background (this, Resource.Drawable.ic_replay, Resource.Drawable.ic_replay_pressed);
			imgReplayFollowUp.SetBackgroundDrawable (bgReplay);
			imgReplayFollowUp.Click += (sender, e) => {
				if(recordUrl != null){
					if(!recordUrl.Equals("")){
						Intent intent = new Intent(this, typeof(PlayAudioManager));
						intent.PutExtra(constants.pPathAudioFile, recordUrl);
						StartActivity(intent);
					} else {
						popupNotice.showNoticeDialog(GetString(Resource.String.title_notice), GetString(Resource.String.replay_not_exist_notice));
					}
				} else {
					popupNotice.showNoticeDialog(GetString(Resource.String.title_notice), GetString(Resource.String.replay_not_exist_notice));
				}
			};

			popupNotice = new PopupNoticeInfomation (this);
			popupNotice.noticeDelegate = this;

			updateCallStart (constants.durationInfo);
			TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostStopCall, new TCSelector (updateCallStop));
			TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostFolloUp, new TCSelector (onFollowUpAction));
			TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostUploadFileSuccess, new TCSelector (onUploadFileSuccess));
			TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostDeleteFileSuccess, new TCSelector (onDeleteFileSuccess));
		}
示例#7
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			RequestWindowFeature (WindowFeatures.ActionBar);
			SetContentView (Resource.Layout.popup_reschedule_booking);

			ActionBar.NavigationMode = ActionBarNavigationMode.Standard;
			ActionBar.Title = GetString(Resource.String.consultation_titile) + constants.bookingInfo.ReferenceNo;
			ActionBar.SetDisplayShowTitleEnabled (false);
			ActionBar.SetDisplayHomeAsUpEnabled(true);
			ActionBar.SetDisplayShowHomeEnabled (true);

			setHeadingTitle (GetString(Resource.String.consultation_titile) + constants.bookingInfo.ReferenceNo);

			bookPreTimeDialog = new BookPreTimeUI (this, false);
			bookPreTimeDialog.actionDelegate = this;

			popupNotice = new PopupNoticeInfomation(this);
			popupNotice.noticeDelegate = this;

			llProgress = FindViewById<LinearLayout> (Resource.Id.llProgressBar);
			llProgress.Visibility = ViewStates.Gone;

			var avatar = FindViewById<ImageView> (Resource.Id.avatar_request_booking);
			var tvName = FindViewById<TextView> (Resource.Id.tv_name_request_booking);
			var tvProposedTime = FindViewById<TextView> (Resource.Id.tv_time_request_booking);
			var tvFee = FindViewById<TextView> (Resource.Id.tv_fee_request_booking);
			var tvEnquiry = FindViewById<TextView> (Resource.Id.tv_enquiry_request_booking);
			var llStartTime = FindViewById<LinearLayout> (Resource.Id.llStartTimeReschedule);
			var llEndTime = FindViewById<LinearLayout> (Resource.Id.llEndTimeReschedule);
			var tvTimeError = FindViewById<TextView> (Resource.Id.tv_time_error_reschedule);
			tvStartTime = FindViewById<TextView> (Resource.Id.tv_start_reschedule);
			tvEndTime = FindViewById<TextView> (Resource.Id.tv_end_reschedule);
			var tvFeeTitle = FindViewById<TextView> (Resource.Id.tv_title_cost_reschedule);
			var tvExpired = FindViewById<TextView> (Resource.Id.tv_expried_time_reschedule);

			var btnReschedule = FindViewById<Button> (Resource.Id.btn_reschedule_booking);
			var btnConfirm = FindViewById<Button> (Resource.Id.btn_confirm_booking);
			var btnDecline = FindViewById<Button> (Resource.Id.btn_decline_booking);

			var btnOk = FindViewById<Button> (Resource.Id.btn_ok_reschedule);
			var btnCancel = FindViewById<Button> (Resource.Id.btn_cancel_reschedule);

			var llGrSelectTimeReschedule = FindViewById<LinearLayout> (Resource.Id.llGrSelectTimeReschedule);
			var llGrButtonDetailReschedule = FindViewById<LinearLayout> (Resource.Id.llGrButtonDetailReschedule);
			var llGrButtonConfirmReschedule = FindViewById<LinearLayout> (Resource.Id.llGrButtonConfirmReschedule);

			tvExpired.Visibility = ViewStates.Gone;
			llGrSelectTimeReschedule.Visibility = ViewStates.Gone;
			llGrButtonConfirmReschedule.Visibility = ViewStates.Gone;
			tvTimeError.Visibility = ViewStates.Gone;
			if (MApplication.getInstance ().isConsultant && constants.bookingInfo.Type == (int)Constants.TALKNOWTYPE.ASAP && constants.bookingInfo.Status == (int)Constants.STATUS.Requested) {
				datetimeStart = Utils.getDateTimeNow (MApplication.getInstance ().timezoneName);
				datetimeEnd = Utils.getDateTimeNow (MApplication.getInstance ().timezoneName);
			} else {
				datetimeStart = DateTime.Parse (constants.bookingInfo.StartTime);
				datetimeEnd = DateTime.Parse (constants.bookingInfo.EndTime);
				tvStartTime.Text = datetimeStart.ToString (constants.sDateFormat) + " " + datetimeStart.ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper ();
				tvEndTime.Text = datetimeEnd.ToString (constants.sDateFormat) + " " + datetimeEnd.ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper ();
			}
				
			tvEnquiry.Text = constants.bookingInfo.Enquiry;
			if (datetimeStart.Date == datetimeEnd.Date) {
				tvProposedTime.Text = datetimeStart.ToString (constants.sDateFormat) + " " + datetimeStart.ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper () + " - " + datetimeEnd.ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper ();
			} else {
				tvProposedTime.Text = datetimeStart.ToString (constants.sDateFormat) + " " + datetimeStart.ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper () + " - " + datetimeEnd.ToString (constants.sDateFormat) + " " + datetimeEnd.ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper ();
			}
			if (constants.bookingInfo.Type == (int)Constants.TALKNOWTYPE.ASAP && constants.bookingInfo.Status == (int)Constants.STATUS.Requested) {
				tvProposedTime.Text = GetString (Resource.String.soonest_possible_time);
			}
			tvProposedTime.SetMinWidth (Utils.getScreenWidth ());
			string fee = "";
			if (MApplication.getInstance ().isConsultant) {
				fee = "$" + Utils.getCost (constants.bookingInfo.RatePerMinute) + " " + GetString (Resource.String.price_per_minute);
			} else {
				fee = "$" + Utils.getCost (constants.bookingInfo.CostPerMinute) + " " + GetString (Resource.String.price_per_minute);
			}
			if (!MApplication.getInstance ().isConsultant) {
				fee += " ($" + Utils.getCost(constants.bookingInfo.CustomerMinCharge) + " minimum)";
			} else if(!constants.bookingInfo.IsApplyNoMinimumCharge){
				fee += " ($" + Utils.getCost (constants.bookingInfo.SpecialistMinCharge) + " minimum)";
			}

			tvFee.Text = fee;

			if (MApplication.getInstance().isConsultant) {
				UrlImageViewHelper.UrlImageViewHelper.SetUrlDrawable(avatar, HttpConstants.BASE_URL + constants.bookingInfo.CustomerAvatar, Resource.Drawable.special_home, constants.iTimeLoading, this);
				tvName.Text = constants.bookingInfo.CustomerName;
				tvFeeTitle.Text = "CONSULTATION FEE";
				if (constants.bookingInfo.Type == (int)Constants.TALKNOWTYPE.ASAP && constants.bookingInfo.Status == (int)Constants.STATUS.Requested) {
					btnConfirm.Visibility = ViewStates.Gone;
					btnReschedule.Text = GetString (Resource.String.schedule_btn);
					isLoadConfig = true;
				} else {
					switch (constants.bookingInfo.Status) {
					case (int)Constants.STATUS.Requested:
						btnReschedule.Visibility = ViewStates.Visible;
						isLoadConfig = true;
						break;
					case (int)Constants.STATUS.CustomerRescheduled:
						btnReschedule.Visibility = ViewStates.Gone;
						isLoadConfig = false;
						break;
					case (int)Constants.STATUS.SpecialistRescheduled:
						btnConfirm.Visibility = ViewStates.Gone;
						btnDecline.Visibility = ViewStates.Gone;
						btnReschedule.Visibility = ViewStates.Gone;
						isLoadConfig = false;
						break;
					}
				}
			} else {
				UrlImageViewHelper.UrlImageViewHelper.SetUrlDrawable(avatar, HttpConstants.BASE_URL + constants.bookingInfo.SpecialistAvatar, Resource.Drawable.special_home, constants.iTimeLoading, this);
				tvName.Text = constants.bookingInfo.SpecialistName;
				tvFeeTitle.Text = "APPLICABLE COST";
				if (constants.bookingInfo.Status != (int)Constants.STATUS.SpecialistRescheduled) {
					btnConfirm.Visibility = ViewStates.Gone;
					btnDecline.Visibility = ViewStates.Gone;
					btnReschedule.Visibility = ViewStates.Gone;
					isLoadConfig = false;
				} else {
					isLoadConfig = true;
				}
			}

			// if start time < now ---> hide confirm
			if (DateTime.Compare (DateTime.Parse (constants.bookingInfo.StartTime), Utils.getDateTimeNow (MApplication.getInstance ().timezoneName)) < 0) { // Time now > start time
				btnConfirm.Visibility = ViewStates.Gone;
				if (constants.bookingInfo.Type != (int)Constants.TALKNOWTYPE.ASAP) {
					tvExpired.Visibility = ViewStates.Visible;
				}
			}

			btnConfirm.Click += (sender, e) => {
				if(updateBookingStatus == null){
					updateBookingStatus = new UpdateBookingStatus(this);
					updateBookingStatus.actionUpdateBookingStatus = this;
				}
				updateBookingStatus.updateBookingStatusRequest((int)Constants.STATUS.Confirmed);
			};

			btnReschedule.Click += (sender, e) => {
				llGrButtonDetailReschedule.Visibility = ViewStates.Gone;
				llGrButtonConfirmReschedule.Visibility = ViewStates.Visible;
				llGrSelectTimeReschedule.Visibility = ViewStates.Visible;
			};

			btnDecline.Click += (sender, e) => {
				if(updateBookingStatus == null){
					updateBookingStatus = new UpdateBookingStatus(this);
					updateBookingStatus.actionUpdateBookingStatus = this;
				}
				updateBookingStatus.updateBookingStatusRequest((int)Constants.STATUS.Cancel);
			};

			llStartTime.Click += (sender, e) => {
				tvTimeError.Visibility = ViewStates.Gone;
				isStart = true;
				bookPreTimeDialog.showSelectPreTime(isStart, datetimeStart);
			};
			llEndTime.Click += (sender, e) => {
				tvTimeError.Visibility = ViewStates.Gone;
				isStart = false;
				bookPreTimeDialog.showSelectPreTime(isStart, datetimeEnd);
			};

			btnOk.Click += (sender, e) => {
				if (utilsAndroid.checkValidateTimeBooking (this, Utils.getDateTimeNow (MApplication.getInstance ().timezoneName), datetimeStart, datetimeEnd, tvTimeError)) {
					rescheduleRequest ();
				} else {
					tvTimeError.Visibility = ViewStates.Visible;
				}
			};

			btnCancel.Click += (sender, e) => {
				llGrButtonDetailReschedule.Visibility = ViewStates.Visible;
				llGrButtonConfirmReschedule.Visibility = ViewStates.Gone;
				llGrSelectTimeReschedule.Visibility = ViewStates.Gone;
				tvTimeError.Visibility = ViewStates.Gone;
			};

			if (isLoadConfig) {
				GetSystemConfig getSysConfig = new GetSystemConfig (this);
				getSysConfig.actionGetConfigDelegate = this;
				getSysConfig.getSysConfig ();
			}
		}
示例#8
0
		private void rescheduleRequest ()
		{
			llProgress.Visibility = ViewStates.Visible;
			Action<string> successful = (response => {
				bool isSuccess = ParseDataHelper.parseDataRescheduleBooking(response);
				if (isSuccess) {
					this.RunOnUiThread (() => {
						this.Finish();
					});
				} else {
					this.RunOnUiThread (() => {
						llProgress.Visibility = ViewStates.Gone;
						if(popupNotice == null){
							popupNotice = new PopupNoticeInfomation(this);
							popupNotice.noticeDelegate = this;
						}
						popupNotice.showNoticeDialog(GetString(Resource.String.reschedule_btn), GetString(Resource.String.reschedule_notice));
					});
				}
			});

			Action<string> failure = (response => {
				this.RunOnUiThread (() => {
					llProgress.Visibility = ViewStates.Gone;
					if(popupNotice == null){
						popupNotice = new PopupNoticeInfomation(this);
						popupNotice.noticeDelegate = this;
					}
					popupNotice.showNoticeDialog(GetString(Resource.String.reschedule_btn), GetString(Resource.String.reschedule_notice));
				});
			});

			DataHelperRequest.getInstance ().sendResheduleBooking (constants.bookingInfo.Id,
				datetimeStart, datetimeEnd, MApplication.getInstance ().isConsultant, successful, failure);
		}
示例#9
0
		public void onTalkNowSucces ()
		{
			this.RunOnUiThread (() => {
				llProgress.Visibility = ViewStates.Gone;
				if(popupNotice == null){
					popupNotice = new PopupNoticeInfomation(this);
					popupNotice.noticeDelegate = this;
				}
				popupNotice.showNoticeDialogToDestroy(GetString(Resource.String.talknow_notice_title), GetString(Resource.String.expert_dial_title));
				ConfirmedRequestsActivity.setDataToListView();
			});
		}
示例#10
0
		public void onResultChoosed(Uri uri, bool isInconference, Guid bookingId){
			string path = uri.Path;
			if (path == null) {
				PopupNoticeInfomation popupNotice = new PopupNoticeInfomation (_activity);
				popupNotice.showNoticeDialog (_activity.GetString(Resource.String.title_notice), _activity.GetString(Resource.String.get_img_from_lib));
				return;
			}
			bImages = Utils.GetByteArrayFromFile (path);
			if (bImages != null) {
				sendUploadPhotoRequest (isInconference, bookingId, bImages, utilsAndroid.getNameImageFromPath(path));
			}
		}
示例#11
0
		private void onShowPopUpNotice(string title, string mess){
			PopupNoticeInfomation popup = new PopupNoticeInfomation (constants.currentActivity);
			popup.noticeDelegate = this;
			popup.showNoticeDialog (title, mess);
		}
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			RequestWindowFeature (WindowFeatures.ActionBar);
			SetContentView (Resource.Layout.specialist_profile_layout);

			ActionBar.NavigationMode = ActionBarNavigationMode.Standard;
			ActionBar.Title = constants.specialistInfo.Account.Name;
			ActionBar.SetDisplayShowTitleEnabled (false);
			ActionBar.SetDisplayHomeAsUpEnabled(true);
			ActionBar.SetDisplayShowHomeEnabled (true);

			specDetailActivity = this;

			llProgress = FindViewById<LinearLayout> (Resource.Id.llProgressBar);
			llProgress.Visibility = ViewStates.Gone;

			popupNotice = new PopupNoticeInfomation(this);
			popupNotice.noticeDelegate = this;

			tvProfession = FindViewById<TextView> (Resource.Id.tv_profession_spec_detail);
			tvSpecialisation = FindViewById<TextView> (Resource.Id.tv_specialisation_detail);
			tvGST = FindViewById<TextView> (Resource.Id.tv_gst_spec_detail);
			tvShortDes = FindViewById<TextView> (Resource.Id.tv_short_description_spec_detail);
			tvDetailBiography = FindViewById<TextView> (Resource.Id.tv_long_description_spec_detail);
			tvQualifications = FindViewById<TextView> (Resource.Id.tv_qualifications_spec_detail);
			tvLanguageSpoken = FindViewById<TextView> (Resource.Id.tv_language_spoken_spec_detail);
			tvKm = FindViewById<TextView> (Resource.Id.tv_km_spec_detail);
			ratingBar = FindViewById<ImageView> (Resource.Id.img_ic_rating_detail);
			avatar = FindViewById<ImageView> (Resource.Id.img_avatar_spec_detail);
			tvExpiredNotice = FindViewById<TextView> (Resource.Id.tv_expired_notice);
			//llSoonest = FindViewById<LinearLayout> (Resource.Id.llSoonestDetail);
			//llStandard = FindViewById<LinearLayout> (Resource.Id.llStandardDetail);
			//llAnotherTime = FindViewById<LinearLayout> (Resource.Id.llAnotherTimeDetail);
			llTalkNow = FindViewById<LinearLayout> (Resource.Id.llTalkNowDetail);
			btnAddFavorite = FindViewById<ImageView> (Resource.Id.img_add_favorite_detail);
			btnEmailProfile = FindViewById<ImageView> (Resource.Id.img_email_profile_detail);
			tvCostStandard = FindViewById<TextView> (Resource.Id.tvDolarStandard);
			//tvCostOutOf = FindViewById<TextView> (Resource.Id.tvDolarAnotherTime);
			tvCostTalkNow = FindViewById<TextView> (Resource.Id.tvDolarTalkNow);
			tvDay = FindViewById<TextView> (Resource.Id.tvDayStandards);
			tvStartTime = FindViewById<TextView> (Resource.Id.tvStartTimeStandard);
			tvEndTime = FindViewById<TextView> (Resource.Id.tvEndTimeStandard);
			tvStatus = FindViewById<TextView> (Resource.Id.tv_status_spec_detail);
			llStatus = FindViewById<LinearLayout> (Resource.Id.llGroupStatus);
			llBookTime = FindViewById<LinearLayout> (Resource.Id.llBookTime);
			llBookTime1 = FindViewById<LinearLayout> (Resource.Id.llBookTime1);
			llSpecDetail = FindViewById<LinearLayout> (Resource.Id.ll_spec_detail);
			imgIconStep2 = FindViewById<ImageView> (Resource.Id.imgIconCallingStep2);
			tvDeferInfo = FindViewById<TextView> (Resource.Id.tv_sub_waiting_call_1);
			tvDialStep2 = FindViewById<TextView> (Resource.Id.tvDialStep2);
			tvMinCharge = FindViewById<TextView> (Resource.Id.tv_min_charge_specialist_detail);
			tvLicenseStatus = FindViewById<TextView> (Resource.Id.tv_licence_status_detail);
			tvOnTime = FindViewById<TextView> (Resource.Id.tv_ontime_detail);
			ic_license = FindViewById<ImageView> (Resource.Id.ic_license_status_detail);

			tvDeferInfo.Visibility = ViewStates.Gone;
			llStatus.Visibility = ViewStates.Gone;
			tvExpiredNotice.Visibility = ViewStates.Gone;

			setDataToView ();
			this.SetEventForView ();
		}
		public void onFailGetSpecInfo ()
		{
			this.RunOnUiThread (() => {
				llProgress.Visibility = ViewStates.Gone;
				if(popupNotice == null) {
					popupNotice = new PopupNoticeInfomation(this);
					popupNotice.noticeDelegate = this;
				}
				popupNotice.showNoticeDialogToDestroy(GetString(Resource.String.title_notice),GetString(Resource.String.cannot_get_data));
			});
		}
		public void onSuccessGetSpecInfo (SpecialistProfileInfos specInfo)
		{
			this.RunOnUiThread (() => {
				llProgress.Visibility = ViewStates.Gone;
				if(specInfo != null) {
					constants.specialistInfo = specInfo;
					constants.specialistInfo.isLoaded = true;
					setDataToView();
				} else {
					if(popupNotice == null) {
						popupNotice = new PopupNoticeInfomation(this);
						popupNotice.noticeDelegate = this;
					}
					popupNotice.showNoticeDialogToDestroy(GetString(Resource.String.title_notice),GetString(Resource.String.cannot_get_data));
				}
			});
		}
		private void SetEventForView ()
		{
			llTalkNow.Click += delegate {
				if(MApplication.getInstance().isLogedIn){
					if(MApplication.getInstance ().isCompleteProfile) {
						if(constants.specialistInfo.Account.CurrentAvailabilityStatus == (int)Constants.STATUS_CONSULTANT.NotAvailable){
							if(popupNotice == null){
								popupNotice = new PopupNoticeInfomation(this);
								popupNotice.noticeDelegate = this;
							}
							popupNotice.showNoticeDialog(GetString(Resource.String.title_notice), constants.specialistInfo.Account.Name +" is not available. You can't use this feature");
						} else{
							if(talkNowDialog == null){
								talkNowDialog = new TalkNowUI(this);
								talkNowDialog.actionTalknowDelegate = this;
							}
							talkNowDialog.ShowTalkNowEnquiry();
						}
					} else {
						showNoticeUpdateProfile();
					}
				} else {
					callLogInActivity();
				}
			};
			//ltthuc/13/08
			/*llSoonest.Click += delegate {
				if(MApplication.getInstance().isLogedIn){
					if(MApplication.getInstance ().isCompleteProfile) {
						if(asapDialog == null){
							asapDialog = new BookASAPUI(this);
							asapDialog.actionDelegate = this;
						}
						asapDialog.showASAPEnquiry();
					} else {
						showNoticeUpdateProfile();
					}
				} else {
					callLogInActivity();
				}
			};

			llStandard.Click += delegate {
				isStandardHour = true;
				if(MApplication.getInstance().isLogedIn){
					if(MApplication.getInstance ().isCompleteProfile) {
						if(dialogBookPreTime == null) {
							dialogBookPreTime = new BookPreTimeUI(this, isStandardHour);
							dialogBookPreTime.actionDelegate = this;
						}
						dialogBookPreTime.showPreTimeEnquiry(isStandardHour);
					} else {
						showNoticeUpdateProfile();
					}
				} else {
					callLogInActivity();
				}
			};*

			llAnotherTime.Click += delegate {
				isStandardHour = false;
				if(MApplication.getInstance().isLogedIn){
					if(MApplication.getInstance ().isCompleteProfile) {
						if(dialogBookPreTime == null){
							dialogBookPreTime = new BookPreTimeUI(this, isStandardHour);
							dialogBookPreTime.actionDelegate = this;
						}
						dialogBookPreTime.showPreTimeEnquiry(isStandardHour);
					} else {
						showNoticeUpdateProfile();
					}
				} else {
					callLogInActivity();
				}
			};*/

			btnAddFavorite.Click += delegate {
				if(MApplication.getInstance().isLogedIn) {
					if(dialogFavorite == null){
						dialogFavorite = new FavoriteUI(this);
						dialogFavorite.actionFavoriteDelegate = this;
					}
					if (constants.specialistInfo.IsFavourite) {
						dialogFavorite.removeFavoriteRequest(MApplication.getInstance ().specialistID);
					} else {
						dialogFavorite.addToFavouriteRequest(MApplication.getInstance ().specialistID);
					}
				} else {
					callLogInActivity();
				}
			};

			Background bgEmailProfile = new Background (this, Resource.Drawable.ic_emailprofile, Resource.Drawable.ic_emailprofile_pressed);
			btnEmailProfile.SetBackgroundDrawable (bgEmailProfile);
			btnEmailProfile.Click += delegate {
				if(emailDialog == null){
					emailDialog = new SendEmailUI(this);
					emailDialog.actionDelegate = this;
				}
				emailDialog.showEmailDialog(MApplication.getInstance ().specialistID);				
			};
		}
示例#16
0
		private void sendChangePassRequeset(){
			PopupNoticeInfomation popupNotice = new PopupNoticeInfomation (this);
			popupNotice.noticeDelegate = this;
			llProgress.Visibility = ViewStates.Visible;
			Action<String> successful = (response => {
				this.RunOnUiThread (() => {
					try{
						JObject json = JObject.Parse (response.ToString ());
						bool status = (bool)json ["Success"];
						llProgress.Visibility = ViewStates.Gone;
						if(status){
							popupNotice.showNoticeDialog(this.GetString(Resource.String.change_pass_title), this.GetString(Resource.String.change_pass_success_notice));
						}
						else{
							string mess = (string)json["Error"];
							if(mess != null && !mess.Equals(""))
								popupNotice.showNoticeDialog(this.GetString(Resource.String.change_pass_title), mess);
							else
								popupNotice.showNoticeDialog(this.GetString(Resource.String.change_pass_title), this.GetString(Resource.String.connection_fail));
						}
					}catch(Exception e){
						popupNotice.showNoticeDialog(this.GetString(Resource.String.change_pass_title), this.GetString(Resource.String.connection_fail));
					}
				});
			});

			Action<String> failure = (response => {
				this.RunOnUiThread (() => {
					llProgress.Visibility = ViewStates.Gone;
					popupNotice.showNoticeDialog(this.GetString(Resource.String.change_pass_title), this.GetString(Resource.String.connection_fail));
				});
			});				
			DataHelperRequest.getInstance ().sendChangePassword(edOldPass.Text.Trim(), edNewPass.Text.Trim(), edNewPassConfirm.Text.Trim(), successful, failure);
		}
示例#17
0
		public void onResultChoosed(Intent data, bool isInconference, Guid bookingId){
			Uri uri = global::Android.Net.Uri.Parse(data.DataString);
			string path = GetPathToImage (uri);
			if (path == null) {
				Bitmap bitmap = null;
				try {
					bitmap = MediaStore.Images.Media.GetBitmap (_activity.ContentResolver, uri);
				} catch (FileNotFoundException e) {
					e.PrintStackTrace ();
				} catch (IOException e) {
					e.PrintStackTrace ();
				}
				bImages = Utils.getByteFromBitmap (bitmap);
				if (bImages == null) {
					PopupNoticeInfomation popupNotice = new PopupNoticeInfomation (_activity);
					popupNotice.showNoticeDialog (_activity.GetString (Resource.String.title_notice), _activity.GetString (Resource.String.get_img_from_lib));
					return;
				}
			} else {
				bImages = Utils.GetByteArrayFromFile (path);
			}
			if (bImages != null) {
				sendUploadPhotoRequest (isInconference, bookingId, bImages, utilsAndroid.getNameImageFromPath(path));
			} else {
				PopupNoticeInfomation popupNotice = new PopupNoticeInfomation (_activity);
				popupNotice.showNoticeDialog (_activity.GetString (Resource.String.title_notice), _activity.GetString (Resource.String.get_img_from_lib));
				return;
			}
		}
示例#18
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			RequestWindowFeature (WindowFeatures.ActionBar);
			SetContentView (Resource.Layout.pastbooking_detail);

			ActionBar.NavigationMode = ActionBarNavigationMode.Standard;
			ActionBar.Title = GetString(Resource.String.consultation_titile) + constants.bookingInfo.ReferenceNo;
			ActionBar.SetDisplayShowTitleEnabled (false);
			ActionBar.SetDisplayHomeAsUpEnabled(true);
			ActionBar.SetDisplayShowHomeEnabled (true);

			setHeadingTitle (GetString(Resource.String.consultation_titile) + constants.bookingInfo.ReferenceNo);

			var tvName = FindViewById<TextView> (Resource.Id.tv_name_past_detail);
			var avatar = FindViewById<ImageView> (Resource.Id.avatar_past_detail);
			numRating = FindViewById<ImageView> (Resource.Id.img_num_rating_pass);
			imgFavorite = FindViewById<ImageView> (Resource.Id.img_add_favorite_pass);
			imgEmailProfile = FindViewById<ImageView> (Resource.Id.img_email_profile_pass);
			imgRating = FindViewById<ImageView> (Resource.Id.img_rating_pass);

			tvExpiredNotice = FindViewById<TextView> (Resource.Id.tv_expired_notice);
			//llSoonest = FindViewById<LinearLayout> (Resource.Id.llSoonestDetail);
			//llStandard = FindViewById<LinearLayout> (Resource.Id.llStandardDetail);
			//llAnother = FindViewById<LinearLayout> (Resource.Id.llAnotherTimeDetail);
			llTalknow = FindViewById<LinearLayout> (Resource.Id.llTalkNowDetail);
			llActionBooking = FindViewById<LinearLayout> (Resource.Id.llActionBooking);

			tvDateStartCall = FindViewById<TextView> (Resource.Id.tv_start_date_past);
			tvTimeStartCall = FindViewById<TextView> (Resource.Id.tv_start_time_past);
			tvDateEndCall = FindViewById<TextView> (Resource.Id.tv_end_date_past);
			tvTimeEndCall = FindViewById<TextView> (Resource.Id.tv_end_time_past);
			tvDuration = FindViewById<TextView> (Resource.Id.tv_total_time_past);
			tvCost = FindViewById<TextView> (Resource.Id.tv_total_cost_past);
			tvFee = FindViewById<TextView> (Resource.Id.tv_total_fee_past);
			llFileAttachment = FindViewById<LinearLayout> (Resource.Id.llFileAtachment);
			llGroupFee = FindViewById<LinearLayout> (Resource.Id.llGroupFeePass);
			tvNoticeWaivedFee = FindViewById<TextView> (Resource.Id.tv_notice_waived_pass);
			tvStandardCost = FindViewById<TextView> (Resource.Id.tvDolarStandard);
			//tvAnotherCost = FindViewById<TextView> (Resource.Id.tvDolarAnotherTime);
			tvTalkNowCost = FindViewById<TextView> (Resource.Id.tvDolarTalkNow);
			llStatusPass = FindViewById<LinearLayout> (Resource.Id.llGroupStatus);
			llDetailPass = FindViewById<LinearLayout> (Resource.Id.llContentPass);
			imgIconStep2 = FindViewById<ImageView> (Resource.Id.imgIconCallingStep2);
			tvDeferInfo = FindViewById<TextView> (Resource.Id.tv_sub_waiting_call_1);
			tvDialStep2 = FindViewById<TextView> (Resource.Id.tvDialStep2);

			pastDetailActivity = this;

			popupNotice = new PopupNoticeInfomation(this);
			popupNotice.noticeDelegate = this;

			deleteFile = new DeleteFile (this);
			deleteFile.deleteFileAction = this;

			uploadPhoto = new UploadPhoto(this);
			uploadPhoto.actionUploadPhotoDelegate = this;

			transcribe = new TranscribeRequest (this);
			transcribe.transcribeDelegate = this;

			tvDeferInfo.Visibility = ViewStates.Gone;
			llStatusPass.Visibility = ViewStates.Gone;
			tvExpiredNotice.Visibility = ViewStates.Gone;

			numRating.SetImageResource(utilsAndroid.getIconRatingResource(0));
			if (MApplication.getInstance ().isConsultant) {
				progressDialogParent.Show ();
				GetBookingInfo getBookingInfo = new GetBookingInfo (this);
				getBookingInfo.actionDelegate = this;
				getBookingInfo.getBookingInfo (constants.bookingInfo.Id);
			} else {
				llActionBooking.Visibility = ViewStates.Gone;
				progressDialogParent.Show ();
				GetSpecialistProfile getSpecInfo = new GetSpecialistProfile (this);
				getSpecInfo.actionDelegate = this;
				getSpecInfo.getSpecProfile (MApplication.getInstance ().specialistID);
			}

			tvNoticeWaivedFee.Visibility = ViewStates.Gone;

			if (constants.bookingInfo.BookingDocuments != null && constants.bookingInfo.BookingDocuments.Count > 0) {
				int isize = constants.bookingInfo.BookingDocuments.Count;
				for (int i = 0; i < isize; i++) {
					bookingDocs.Add(constants.bookingInfo.BookingDocuments[i]);
				}
				utilsAndroid.addFileView (this, bookingDocs, true, addFiles, deleteFile, llFileAttachment);
			}

			if (MApplication.getInstance ().isConsultant) {
				tvName.Text = constants.bookingInfo.CustomerName;
				UrlImageViewHelper.UrlImageViewHelper.SetUrlDrawable(avatar, HttpConstants.BASE_URL + constants.bookingInfo.CustomerAvatar, Resource.Drawable.special_home, constants.iTimeLoading, this);

				imgFavorite.Visibility = ViewStates.Gone;
				imgEmailProfile.Visibility = ViewStates.Gone;
				llSoonest.Visibility = ViewStates.Gone;
				llStandard.Visibility = ViewStates.Gone;
				llAnother.Visibility = ViewStates.Gone;
				llTalknow.Visibility = ViewStates.Gone;
			} else {
				tvName.Text = constants.bookingInfo.SpecialistName;
				UrlImageViewHelper.UrlImageViewHelper.SetUrlDrawable(avatar, HttpConstants.BASE_URL + constants.bookingInfo.SpecialistAvatar, Resource.Drawable.special_home, constants.iTimeLoading, this);

				llGroupFee.Visibility = ViewStates.Gone;
			}

			tvDateStartCall.Text = Utils.getDateTimeNow (MApplication.getInstance ().timezoneName).ToString (constants.sDateFormat);
			tvTimeStartCall.Text = Utils.getDateTimeNow (MApplication.getInstance ().timezoneName).ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper();
			tvDateEndCall.Text = Utils.getDateTimeNow (MApplication.getInstance ().timezoneName).ToString (constants.sDateFormat);
			tvTimeEndCall.Text = Utils.getDateTimeNow (MApplication.getInstance ().timezoneName).ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper();

			setDataPastBookingToView ();

			setActionToView ();

			TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostUploadFileSuccess, new TCSelector (onUploadFileSuccess));
			TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostDeleteFileSuccess, new TCSelector (onDeleteFileSuccess));
		}
示例#19
0
		private void sendUploadPhotoRequest (bool isInconference, Guid bookingId, byte[] bImages, string fileName)
		{
			actionUploadPhotoDelegate.onSendingUpload ();
			Action<string> successful = (response => {
				PhotoDTO photoDTO = ParseDataHelper.parseResponseUploadPhoto(response);
				_activity.RunOnUiThread (()=>{
					if(photoDTO.status){
						actionUploadPhotoDelegate.onUploadSuccess(photoDTO);
					} else {
						actionUploadPhotoDelegate.onUploadFail();
						if(photoDTO.message != null && !photoDTO.message.Equals("")){
							PopupNoticeInfomation popup = new PopupNoticeInfomation(_activity);
							popup.showNoticeDialog(_activity.GetString(Resource.String.upfile_title), photoDTO.message);
						}
						else {
							PopupNoticeInfomation popup = new PopupNoticeInfomation(_activity);
							popup.showNoticeDialog(_activity.GetString(Resource.String.upfile_title), _activity.GetString(Resource.String.uploadPhotoFail));
						}
					}
				});
			});
			Action<string> failure = (response => {
				_activity.RunOnUiThread (()=>{
					actionUploadPhotoDelegate.onUploadFail();
					PopupNoticeInfomation popup = new PopupNoticeInfomation(_activity);
					popup.showNoticeDialog(_activity.GetString(Resource.String.title_notice), _activity.GetString(Resource.String.connection_fail));
				});
			});
			if (fileName == null || fileName.Equals("")) {
				fileName = Utils.RandomString (20) + ".png";
			}
			HttpRequestFileMetadata metaData = new HttpRequestFileMetadata (bImages, fileName);
			DataHelperRequest.getInstance ().sendUploadPhotoRequest (isInconference, bookingId, metaData, successful, failure);
		}
示例#20
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			RequestWindowFeature (WindowFeatures.ActionBar);
			SetContentView (Resource.Layout.popup_confirm_bookings);

			ActionBar.NavigationMode = ActionBarNavigationMode.Standard;
			ActionBar.Title = GetString(Resource.String.consultation_titile) + constants.bookingInfo.ReferenceNo;
			ActionBar.SetDisplayShowTitleEnabled (false);
			ActionBar.SetDisplayHomeAsUpEnabled(true);
			ActionBar.SetDisplayShowHomeEnabled (true);

			setHeadingTitle (GetString(Resource.String.consultation_titile) + constants.bookingInfo.ReferenceNo);

			llProgress = FindViewById<LinearLayout> (Resource.Id.llProgressBar);
			llProgress.Visibility = ViewStates.Gone;

			popupNotice = new PopupNoticeInfomation(this);
			popupNotice.noticeDelegate = this;

			deleteFile = new DeleteFile (this);
			deleteFile.deleteFileAction = this;

			var avatar = FindViewById<ImageView> (Resource.Id.avatar_popup_booking);
			var tvName = FindViewById<TextView> (Resource.Id.tv_name_popup_booking);
			var tvTitleTime = FindViewById<TextView> (Resource.Id.tv_title_proposed_time);
			var tvConfirmedTime = FindViewById<TextView> (Resource.Id.tv_time_popup_booking);
			var tvFee = FindViewById<TextView> (Resource.Id.tv_fee_popup_booking);
			var btnAddfile = FindViewById<Button> (Resource.Id.btn_addfile_confirm_booking);
			var btnTalkNowRequest = FindViewById<Button> (Resource.Id.btn_request_talknow_booking);
			var btnDecline = FindViewById<Button> (Resource.Id.btn_decline_confirm_booking);
			llFileAttachment = FindViewById<LinearLayout> (Resource.Id.llFileAttachConfirmed);
			var tvEnquiry = FindViewById<TextView> (Resource.Id.tv_enquiry_booking);
			var tvFeeTitle = FindViewById<TextView> (Resource.Id.tv_title_cost_confirm);

			btnTalkNowRequest.SetText(Resource.String.talkNow_title_button);
			btnAddfile.SetText(Resource.String.add_file_btn);
			tvTitleTime.SetText(Resource.String.confirmed_time_title);

			btnTalkNowRequest.Visibility = ViewStates.Gone;
			if (MApplication.getInstance ().isConsultant) {
				if (Utils.isShowTalkNowRequest (DateTime.Parse (constants.bookingInfo.StartTime), DateTime.Parse (constants.bookingInfo.EndTime), MApplication.getInstance ().timezoneName)){
					btnTalkNowRequest.Visibility = ViewStates.Visible;
				}
			}
			tvEnquiry.Text = constants.bookingInfo.Enquiry;
			datetimeStart = DateTime.Parse (constants.bookingInfo.StartTime);
			datetimeEnd = DateTime.Parse (constants.bookingInfo.EndTime);
			if (datetimeStart.Date == datetimeEnd.Date) {
				tvConfirmedTime.Text = datetimeStart.ToString (constants.sDateFormat) + " " + datetimeStart.ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper () + " - " + datetimeEnd.ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper ();
			} else {
				tvConfirmedTime.Text = datetimeStart.ToString (constants.sDateFormat) + " " + datetimeStart.ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper () + " - " + datetimeEnd.ToString (constants.sDateFormat) + " " + datetimeEnd.ToString (constants.sTimeFormat, new CultureInfo("en-us")).ToUpper ();
			}

			string fee = "";
			if (MApplication.getInstance ().isConsultant) {
				fee = "$" + Utils.getCost (constants.bookingInfo.RatePerMinute) + " " + GetString (Resource.String.price_per_minute);
			} else {
				fee = "$" + Utils.getCost (constants.bookingInfo.CostPerMinute) + " " + GetString (Resource.String.price_per_minute);
			}
			if (!MApplication.getInstance ().isConsultant) {
				fee += " ($" + Utils.getCost(constants.bookingInfo.CustomerMinCharge) + " minimum)";
			} else if(!constants.bookingInfo.IsApplyNoMinimumCharge){
				fee += " ($" + Utils.getCost (constants.bookingInfo.SpecialistMinCharge) + " minimum)";
			}
			tvFee.Text = fee;

			if (MApplication.getInstance().isConsultant) {
				UrlImageViewHelper.UrlImageViewHelper.SetUrlDrawable(avatar, HttpConstants.BASE_URL + constants.bookingInfo.CustomerAvatar, Resource.Drawable.special_home, constants.iTimeLoading, this);
				tvName.Text = constants.bookingInfo.CustomerName;
				tvFeeTitle.Text = "CONSULTATION FEE";
			} else {
				UrlImageViewHelper.UrlImageViewHelper.SetUrlDrawable(avatar, HttpConstants.BASE_URL + constants.bookingInfo.SpecialistAvatar, Resource.Drawable.special_home, constants.iTimeLoading, this);
				tvName.Text = constants.bookingInfo.SpecialistName;
				tvFeeTitle.Text = "APPLICABLE COST";
			}

			btnTalkNowRequest.Click += (sender, e) => {
				if (Utils.isShowTalkNowRequest (DateTime.Parse (constants.bookingInfo.StartTime), DateTime.Parse (constants.bookingInfo.EndTime), MApplication.getInstance ().timezoneName)){
					MApplication.getInstance().customerID = constants.bookingInfo.CustomerId;
					if(talkNowUI == null){
						talkNowUI = new TalkNowUI(this);
						talkNowUI.actionTalknowDelegate = this;
					}
					talkNowUI.talknowRequest(false, constants.bookingInfo.Id);
				} else {
					showExpiredNotice();
				}
			};
			uploadPhoto = new UploadPhoto(this);
			uploadPhoto.actionUploadPhotoDelegate = this;

			btnAddfile.Click += (sender, e) => {
				if (!utilsAndroid.checkIsExpired(DateTime.Parse (constants.bookingInfo.EndTime))){
					if(uploadPhoto == null){
						uploadPhoto = new UploadPhoto(this);
						uploadPhoto.actionUploadPhotoDelegate = this;
					}
					uploadPhoto.selectActionUpload();
				} else {
					showExpiredNotice();
				}
			};

			btnDecline.Text = GetString (Resource.String.cancel_consultation);
			btnDecline.Click += (sender, e) => {
				if (!utilsAndroid.checkIsExpired(DateTime.Parse (constants.bookingInfo.EndTime))){
					if(updateBookingStatus == null){
						updateBookingStatus = new UpdateBookingStatus(this);
						updateBookingStatus.actionUpdateBookingStatus = this;
					}
					updateBookingStatus.showDeclineBookingConfirm();
				} else {
					showExpiredNotice();
				}
			};	

			if (constants.bookingInfo.BookingDocuments != null && constants.bookingInfo.BookingDocuments.Count > 0) {
				int isize = constants.bookingInfo.BookingDocuments.Count;
				for (int i = 0; i < isize; i++) {
					bookingDocs.Add(constants.bookingInfo.BookingDocuments[i]);
				}
				utilsAndroid.addFileView (this, bookingDocs, true, addFiles, deleteFile, llFileAttachment);
			}

			TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostUploadFileSuccess, new TCSelector (onUploadFileSuccess));
			TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostDeleteFileSuccess, new TCSelector (onDeleteFileSuccess));
		}