コード例 #1
0
ファイル: BiddingController.cs プロジェクト: DivakerSIngh/ofr
        public ActionResult UpdateBookingOnUpgrade(BiddingHotelsUpgrade obj)
        {
            try
            {
                // TempData.Peek("BIdUpgradeHotels");
                //TempData.Peek("BidSearchHotels");
                //  TempData.Peek("BidSearchData");
                int bookingId, PropId;
                PropId    = obj.iPropId;
                bookingId = obj.iBookingId;

                eBidBookingResult Robj = BL_Bidding.UpdateBidBooking(bookingId, PropId);
                if (Robj.Status == "Success")
                {
                    //var bookingModel = BL_Booking.GetBooking(bookingId);

                    //string Status = "Thanks " + bookingModel.sFirstNameOFR + "! We have recieved your final payment.";
                    //Task.Run(() => MailComponent.SendEmailAsync(bookingModel.sEmailOFR, "", "", "Hotel Selected", Status, null, null, false));
                    //Task.Run(() => clsUtils.sendSMS(bookingModel.sMobileOFR, Status));
                    return(RedirectToRoute("GuestInformation", new { bookingId = OneFineRateAppUtil.clsUtils.Encode(Convert.ToString(Robj.ID)) }));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(View());
        }
コード例 #2
0
        public ActionResult UpdateBookingOnUpgrade(BiddingHotelsUpgrade obj)
        {
            try
            {
                TempData.Peek("BIdUpgradeHotels");
                TempData.Peek("BidSearchHotels");
                TempData.Peek("BidSearchData");
                int bookingId, PropId;
                PropId    = obj.iPropId;
                bookingId = obj.iBookingId;

                eBidBookingResult Robj = BL_Bidding.UpdateBidBooking(bookingId, PropId);
                if (Robj.Status == "Success")
                {
                    var bookingModel = BL_Booking.GetBooking(bookingId);

                    string Status = "Thank you " + bookingModel.sTitleOFR + " " + bookingModel.sFirstNameOFR + "! We have recieved your final payment.";
                    Task.Run(() => MailComponent.SendEmail(bookingModel.sEmailOFR, "", "", "Hotel Selected", Status, null, null, false, null, null));
                    Task.Run(() => clsUtils.sendSMS(bookingModel.sMobileOFR, Status));
                    Session["Result"] = "Hotel selected successfully!";
                    return(RedirectToAction("Index"));
                }
            }
            catch (Exception E)
            {
                Session["Result"] = "There was an error selecting the hotel. Please try again.";
            }
            return(RedirectToAction("Index"));
        }
コード例 #3
0
 public static eBidBookingResult UpdateUpgradeBidBooking(long bookingId, int PropId, int roomid, decimal extrapaid, decimal extrataxpaid)
 {
     try
     {
         eBidBookingResult model = new eBidBookingResult();
         using (OneFineRateEntities db = new OneFineRateEntities())
         {
             SqlParameter[] MyParam = new SqlParameter[5];
             MyParam[0] = new SqlParameter("@iBookingId", bookingId);
             MyParam[1] = new SqlParameter("@iSelectedPropId", PropId);
             MyParam[2] = new SqlParameter("@iRoomId", roomid);
             MyParam[3] = new SqlParameter("@dExtraPaid", extrapaid);
             MyParam[4] = new SqlParameter("@dExtraTaxPaid", extrataxpaid);
             model      = db.Database.SqlQuery <eBidBookingResult>("uspSaveBidHotelUpgrade @iBookingId,@iSelectedPropId,@iRoomId,@dExtraPaid,@dExtraTaxPaid", MyParam).FirstOrDefault();
             return(model);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }