Exemplo n.º 1
0
        public GetCourseBookingDetailResponse GetCourseBookingDetail(GetCourseBookingDetailRequest request)
        {
            var result = new GetCourseBookingDetailResponse()
            {
                ResultMessage = "获取课程预订明细成功",
                Result        = ResultCode.Success
            };

            try
            {
                using (var con = new DbConnectionProvider(dbName).GetOpenConnection())
                {
                    var parms = new DynamicParameters();
                    parms.Add("P_CourseBookingID", request.CourseBookingID, DbType.Int32);
                    result.BookingInfo = con.Query <CourseBookingDTO>("sp_GetCourseBookingDetail"
                                                                      , parms
                                                                      , CommandType.StoredProcedure).FirstOrDefault();
                }
            }
            catch (Exception ex)
            {
                result.ResultMessage = "获取课程预订明细异常";
                result.Result        = ResultCode.Error;
                result.Errors        = new List <string>();
                result.Errors.Add(ex.Message);
                LogHelper.WriteErrorLog(ex);
            }
            return(result);
        }
 public GetCourseBookingDetailResponse GetCourseBookingDetail(GetCourseBookingDetailRequest request)
 {
     return(CourseBookingManager.GetInstance().GetCourseBookingDetail(request));
 }