Hi,
I am using a SfPopup for confirmation.
When user is trying to delete an appontment a confirmation popup shows
with a two botton footer.When User choose 'Yes' the CancelAppointment(string appointmentId) function should be executed
to delete the appointment.
My cs file
...
public AppointmentEditor()
{
.....
InitializeComponent();
ConfimDeletePopup.PopupView.AcceptCommand = new AcceptButtonCustomCommand();
//ConfimDeletePopup.PopupView.DeclineCommand = new DeclineButtonCustomCommand();
_appointment = appointment;
......
}
private void OnDeleteClicked(object sender, EventArgs e)
{
ConfimDeletePopup.Show();
//CancelAppointment(_appointment.Id.ToString());
}
protected async void CancelAppointment(string appointmentId)
{
//Code for Cancel Appointment
}
public class AcceptButtonCustomCommand : ICommand
{
public event EventHandler CanExecuteChanged;
public bool CanExecute(object parameter)
{
return true;
}
public void Execute(object parameter)
{
//Here i need to execute CancelAppointment(string appointmentId)
}
}
I can not figure out how to execute the CancelAppointment() function from the Execute method.
Thank you