예제 #1
0
        public HttpResponseMessage FetchDoctorTime(FetchTimingsModel searchModel)
        {
            try
            {
                //var dateTime = DateTime.Parse(searchModel.appDate);
                string[] formats  = { "dd/MM/yyyy" };
                var      dateTime = DateTime.ParseExact(searchModel.appDate.Trim(), formats, new CultureInfo("en-US"), DateTimeStyles.None);
                string   appday   = dateTime.ToString("dddd");
                var      result   = db.SP_FetchDoctorTimings(searchModel.doctorID, dateTime).ToList();
                response = Request.CreateResponse(HttpStatusCode.OK, result);

                return(response);
            }
            catch (Exception ex)
            {
                return(ThrowError(ex, "FetchDoctorTime in SearchDoctorController"));
            }
        }