This is a migrated thread and some comments may be shown as answers.

insert then delete-delete won't fire

4 Answers 56 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Susan
Top achievements
Rank 1
Susan asked on 26 Sep 2010, 05:56 PM
If I insert an appointment it works fine. If I then try to immediately delete, the confirmation popup appears, but the delete event is not firing. If I leave the page and come back and delete, it works fine. If is only if they occur one after the other. I'm using an advanced edit form as well.

 

 

' ========================================================

 

 

' RadScheduler1_AppointmentDelete

 

 

' Delete an appointment

 

 

' ========================================================

 

 

Protected Sub RadScheduler1_AppointmentDelete(ByVal sender As Object, ByVal e As SchedulerCancelEventArgs) Handles RadScheduler1.AppointmentDelete

 

 

Dim ProspectToolDAL As New ProspectToolDAL

 

ProspectToolDAL.Delete(e.Appointment.ID)

 

End Sub

 

 

 

' ========================================================

 

 

' RadScheduler1_AppointmentInsert

 

 

' Add a new appointment

 

 

' ========================================================

 

 

Private Sub RadScheduler1_AppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) Handles RadScheduler1.AppointmentInsert

 

 

Dim AppointmentBE as New AppointmentBE

 

 

Dim ProspectToolDAL As New ProspectToolDAL

 

AppointmentBE.Subject = e.Appointment.Subject

AppointmentBE.StartTime = e.Appointment.Start

AppointmentBE.EndTime = e.Appointment.End

AppointmentBE.SalesUserID = ViewState(

"SalesUser")

 

AppointmentBE.ContactInformation = e.Appointment.Attributes(

"Contact")

 

AppointmentBE.ApptComments = e.Appointment.Attributes(

"Description")

 

 

Dim appointmentKey as Int32 = ProspectToolDAL.SaveAppointment(AppointmentBE, "I")

 

 

End Sub

 


Thanks,
Susan

4 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 29 Sep 2010, 01:37 PM
Hi Susan,

I'll use the code from TicketID: #346039. However in the ProspectToolDAL I see you are using stored procedures for Insert and Delete. Can you attach me the latest version of your database with the stored procedures as the one I have is with no sp-s?

Thank you!

All the best,
Veronica Milcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Susan
Top achievements
Rank 1
answered on 30 Sep 2010, 01:52 PM
Veronica,
I attached the stored procs to ticket 346039

Thanks,
Susan
0
Susan
Top achievements
Rank 1
answered on 05 Oct 2010, 12:35 PM
Any luck looking into this?

Thanks,
Susan
0
Veronica
Telerik team
answered on 05 Oct 2010, 04:44 PM
Hi Susan,

Also in the stored procedure "sls_deleteappointment" you are using a table called "SalesProspectOutcome". However there is no such table in the attached files. After I commented the useless lines - now I am able to delete appointment but only after postback after creating new appointment. Here's the change:

ALTER Procedure [dbo].[sls_deleteappointment]
   @AppointmentKey  int
  
    AS
  
    DECLARE @SalesProspectKey int
    DECLARE @SalesProspectOutcomeKey int
  
    -- Get the SalesProspectKey from the record with the appointment
    --SELECT @SalesProspectKey = SalesProspectKey
    --FROM SalesProspectOutcome
    --WHERE AppointmentKey = @AppointmentKey
  
  
    -- Delete the appointment record from the salesprospectoutcome table
    --DELETE FROM SalesProspectOutcome
    --WHERE AppointmentKey = @AppointmentKey
  
    -- Delete the appointment
    DELETE FROM SalesAppointment
    WHERE AppointmentKey = @AppointmentKey

Actually the problem osccurs not only with "delete" but "move" and "edit" of newly created appointment. I think that you should cause a refresh on your database on each command - edit/insert. I'll investigate the issue further and inform you as soon as I find how to solve the case.

Thank you for your patience.

Regards,
Veronica Milcheva
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Susan
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Susan
Top achievements
Rank 1
Share this question
or