Esempio n. 1
0
        public async Task <JsonResult> CheckProgramTimeAvailability(int programId,
                                                                    DateTime dateTime,
                                                                    bool backToBack)
        {
            try
            {
                var result = await _performerSchedulingService
                             .ValidateScheduleTimeAsync(programId, dateTime, backToBack);

                if (!string.IsNullOrWhiteSpace(result))
                {
                    return(Json(new
                    {
                        success = true,
                        message = result
                    }));
                }
            }
            catch (GraException gex)
            {
                return(Json(new
                {
                    success = false,
                    message = gex.Message
                }));
            }

            return(Json(new
            {
                success = true
            }));
        }