コード例 #1
0
        public HttpResponseMessage GetBusReportDateRangeRouteWise(int UserId, DateTime FromDate, DateTime ToDate, int CarId, string Type)
        {
            try

            {
                using (CarSystemEntities db = new CarSystemEntities())
                {
                    var returnresult = db.prGetMonthlyBusReportRouteWise(UserId, FromDate, ToDate, CarId, Type).ToList();;
                    return(Request.CreateResponse(HttpStatusCode.OK, returnresult));
                }
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "System has failed to show information. Please try agian."));
            }
        }