Esempio n. 1
0
        public IActionResult SaveCalendarData(AppointmentViewModel data)
        {
            CommonResponse <int> commonResponse = new CommonResponse <int>();

            try
            {
                commonResponse.status = _calendarService.AddUpdate(data).Result;
                if (commonResponse.status == 1)
                {
                    commonResponse.message = Helper.appointmentUpdated;
                }
                if (commonResponse.status == 2)
                {
                    commonResponse.message = Helper.appointmentAdded;
                }
            }
            catch (Exception e)
            {
                commonResponse.message = e.Message;
                commonResponse.status  = Helper.failure_code;
            }

            return(Ok(commonResponse));
        }