insert then delete-delete won't fire

5 posts, 0 answers
  1. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 26 Sep 2010 Link to this post

    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

  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 29 Sep 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 30 Sep 2010 Link to this post

    Veronica,
    I attached the stored procs to ticket 346039

    Thanks,
    Susan
  5. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 05 Oct 2010 Link to this post

    Any luck looking into this?

    Thanks,
    Susan
  6. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 05 Oct 2010 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017