0

Hi my current project is calendar schedule. If i move time slot box in calendar, then called DayPilotCalendarWeek_EventMove and Time slate is moved successfully without Email functionality. But If i called Email Process it take some mints for mail. How to handle this Jobs???. I refer threading concept But I cannot Understand.Click Here for Screen shot

Requirement is

  1. Job 1 : DayPilotCalendarWeek.Update(); // must done before sending Email.

  2. After Update calender, Email functionality must work.

MY Code is :

Same Function two action
1.DayPilotCalendarWeek.Update();
2.SendEmail();

protected void DayPilotCalendarWeek_EventMove(object sender, DayPilot.Web.Ui.Events.EventMoveEventArgs e)
{
    try
    {
        CommonCls com = new CommonCls();
        //**Job 1:**
        DayPilotCalendarWeek.DataSource = Moving(e.Id, e.OldStart.ToString(), e.NewStart.ToString());
        DayPilotCalendarWeek.DataBind();
        DayPilotCalendarWeek.Update();
        //**Job 2** 
        SendEmail();
    }
    catch (Exception ex)
    {
        logger.Error(ex.ToString());
    }
}
IkeRoyle
  • 457
  • 4
  • 13
  • Possible duplicate of [How to Asynchronous two job in asp.net](http://stackoverflow.com/questions/33016236/how-to-asynchronous-two-job-in-asp-net) – hvaughan3 Oct 11 '15 at 17:52

1 Answers1

0

I dont know ASP.NET very well but i found this:

Response.AddHeader("REFRESH","10;URL=test.aspx");.

This should refresh the code after 10 secons. Maybe that will work.

IkeRoyle
  • 457
  • 4
  • 13
  • And what language are you useing or whith what are your working. We need information! – IkeRoyle Oct 08 '15 at 09:20
  • No must run both on same time. but terminate code when DayPilotCalendarWeek.Update(); is done.. After that background process going to achieve email functionality. – Victor Ebe Oct 08 '15 at 09:23
  • ASP.net with C# Lanuage – Victor Ebe Oct 08 '15 at 09:24
  • Hi your understood wrongly.. This function is doing 2 jobs... first job is Update moved slot to calender that is DayPilotCalendarWeek.Update();. And second job is Email. My problem is 2 job took long time. I need to done first job quickly. Second job sending Email must do later. – Victor Ebe Oct 08 '15 at 09:37