예제 #1
0
        internal override async Task Action()
        {
            IAppointmentDetails appointmentDetails = new AppointmentDetailsDAO();

            //var temp1 = DateTime.Parse(DateTime.Now.ToString("HH:mm:ss"));
            //var temp2 = DateTime.Parse(DateTime.Now.AddMinutes(1).ToString("HH:mm") + ":00");
            //var diff = temp1.Subtract(temp2).Milliseconds;
            //await Task.Delay(diff);


            while (true)
            {
                if (DateTime.Now.Second == 0)
                {
                    await appointmentDetails.ReminderForApps(p_id, DateTime.Now.ToString("yyyy-MM-dd"), DateTime.Now.ToString("HH:mm"), this);

                    await Task.Delay(60 * 1000);
                }
                if (result != null)
                {
                    viewCallback.ReminderViewSuccess(result);
                    //await Task.Delay()
                }

                result = null;
                //await Task.Delay(60 * 1000);
            }
        }
        internal override async Task Action()
        {
            IAppointmentDetails applist = new AppointmentDetailsDAO();
            await applist.GetAppointmentByID(app_date, time, this);

            if (app != null)
            {
                viewCallback.AppByIDViewSuccess(app);
            }
            viewCallback.AppByIDViewFail();
        }
예제 #3
0
        internal override async Task Action()
        {
            IAppointmentDetails applist = new AppointmentDetailsDAO();
            await applist.GetAppointment(id, this);

            if (apps != null)
            {
                viewCallback.GetAppsReadViewSuccess(apps);
            }
            else
            {
                viewCallback.GetAppsReadViewFail();
            }
        }
예제 #4
0
        internal override async Task Action()
        {
            IAppointmentDetails appointmentDetails = new AppointmentDetailsDAO();
            await appointmentDetails.GetAppointmentByDoc(p_id, doc_id, this);

            if (appointments != null)
            {
                viewCallback.AppByDocViewSuccess(appointments);
            }
            else
            {
                viewCallback.AppByDocViewFail();
            }
        }
예제 #5
0
        internal override async Task Action()
        {
            try
            {
                IAppointmentDetails appointmentDetails = new AppointmentDetailsDAO();
                await appointmentDetails.GetUpcomingApps(p_id, this);

                if (details != null)
                {
                    viewCallback.UpcomingAppViewSuccess(details);
                }
                else
                {
                    viewCallback.UpcomingAppViewFail();
                }
            }
            catch (Exception)
            {
            }
        }