コード例 #1
0
 public IHttpActionResult SaveRateCard(RateCard rateCard)
 {
     try
     {
         var result = new RateCardBO().SaveRateCard(rateCard);
         if (result)
         {
             return(Ok(UTILITY.SUCCESSMSG));
         }
         else
         {
             return(BadRequest());
         }
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
コード例 #2
0
 public IHttpActionResult GetRateCardValues(Int16 VehicleType, Int16 VehicleCategory)
 {
     try
     {
         var rateCardList = new RateCardBO().GetList().Where(x => x.VehicleType == VehicleType && x.Category == VehicleCategory && x.RateType == 1350);
         if (rateCardList != null)
         {
             return(Ok(rateCardList));
         }
         else
         {
             return(NotFound());
         }
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
コード例 #3
0
        public IHttpActionResult GetRateCardList()
        {
            try
            {
                var rateCardList = new RateCardBO().GetList();

                if (rateCardList != null)
                {
                    return(Ok(rateCardList));
                }
                else
                {
                    return(NotFound());
                }
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }
コード例 #4
0
 public IHttpActionResult GetRateCard(Int16 category)
 {
     try
     {
         var rateCard = new RateCardBO().GetRateCard(new RateCard {
             Category = category
         });
         if (rateCard != null)
         {
             return(Ok(rateCard));
         }
         else
         {
             return(NotFound());
         }
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
コード例 #5
0
 public IHttpActionResult DeleteRateCard(Int16 category)
 {
     try
     {
         var result = new RateCardBO().DeleteRateCard(new RateCard {
             Category = category
         });
         if (result)
         {
             return(Ok(UTILITY.DELETEMSG));
         }
         else
         {
             return(NotFound());
         }
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
コード例 #6
0
        public ActionResult Ratecard()
        {
            var result = new RateCardBO().getRateCardList();

            return(View(result));
        }
コード例 #7
0
        public ActionResult pickCMobile()
        {
            var result = new RateCardBO().getRateCardList();

            return(View(result));
        }