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()); }
public ActionResult GetLeftPayment(BiddingHotelsUpgrade objUpgrade) { try { var obj = new BiddingHotelsUpgrade(); if (TempData["BIdUpgradeHotels"] != null) { TempData.Keep(); obj = TempData["BIdUpgradeHotels"] as BiddingHotelsUpgrade; } var prop = obj.lstRoomsData.Where(u => u.iRoomId == objUpgrade.iRoomId).SingleOrDefault(); var obj1 = new eBiddingHotelsUpgradeRoomsList(); obj1 = prop as eBiddingHotelsUpgradeRoomsList; var result = BL_Bidding.UpdateUpgradeBidBookingUnfinished(Convert.ToInt64(objUpgrade.iBookingId), obj.iPropId, objUpgrade.iRoomId, obj1.TotalDifference, obj1.TaxDifference, objUpgrade.sAuthCode); if (result.Status == "Success") { var bookingModel = BL_Booking.GetBooking(Convert.ToInt64(objUpgrade.iBookingId)); 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")); }
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")); }
public ActionResult GetLeftPayment(BiddingHotelsUpgrade objUpgrade) { var obj = new BiddingHotelsUpgrade(); if (Session[objUpgrade.BIdUpgradeHotels] != null) //TempData.Keep(); { obj = Session[objUpgrade.BIdUpgradeHotels] as BiddingHotelsUpgrade; } var prop = obj.lstRoomsData.Where(u => u.iRoomId == objUpgrade.iRoomId).SingleOrDefault(); Session[objUpgrade.BIdUpgradeHotels] = prop; return(RedirectToAction("PayNow", "Payment", new { bookingId = objUpgrade.iBookingId, propDetailsGUID = objUpgrade.BIdUpgradeHotels, cType = "UpgradeAmt" })); }
/// <summary> /// After Final Selection of the bid property after making payment /// </summary> /// <param name="bookingid"></param> /// <param name="propid"></param> /// <param name="bidSearchHotels"></param> /// <returns></returns> public ActionResult GetUpgradeHotelDetails(int bookingid, int propid, string bidSearchHotels) { var obj = new eBidding(); if (Session[bidSearchHotels] != null) //TempData.Keep(); { obj = Session[bidSearchHotels] as eBidding; } var prop = obj.lstBidRoomsData.Where(u => u.iPropId == propid).SingleOrDefault(); BiddingHotelsUpgrade objUpgrade = BL_Bidding.GetHotelUpgradeResult(propid, bookingid); objUpgrade.objBidRoomsData = prop; objUpgrade.iBookingId = bookingid; objUpgrade.iPropId = propid; objUpgrade.BIdUpgradeHotels = "BIdUpgradeHotels" + Guid.NewGuid().ToString(); Session[objUpgrade.BIdUpgradeHotels] = objUpgrade; return(PartialView("BidInfo", objUpgrade)); }
public ActionResult GetUpgradeHotelDetails(int bookingid, int propid) { var obj = new eBidding(); if (TempData["BidSearchHotels"] != null) { TempData.Keep(); obj = TempData["BidSearchHotels"] as eBidding; } var prop = obj.lstBidRoomsData.Where(u => u.iPropId == propid).SingleOrDefault(); BiddingHotelsUpgrade objUpgrade = BL_Bidding.GetHotelUpgradeResult(propid, bookingid); objUpgrade.objBidRoomsData = prop; objUpgrade.iBookingId = bookingid; objUpgrade.iPropId = propid; TempData["BIdUpgradeHotels"] = objUpgrade; return(PartialView("BidInfo", objUpgrade)); }
public static BiddingHotelsUpgrade GetHotelUpgradeResult(int PropId, int BookingId) { SqlConnection objConn = default(SqlConnection); DataSet ds = new DataSet(); objConn = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"].ToString()); objConn.Open(); BiddingHotelsUpgrade obj = new BiddingHotelsUpgrade(); SqlParameter[] MyParam = new SqlParameter[2]; MyParam[0] = new SqlParameter("@iBookingId", BookingId); MyParam[1] = new SqlParameter("@propid", PropId); ds = SqlHelper.ExecuteDataset(objConn, CommandType.StoredProcedure, "uspGetUpgradeList", MyParam); if (ds.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { List <eBiddingHotelsUpgradeRoomsList> lstRooms = new List <eBiddingHotelsUpgradeRoomsList>(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { List <eBiddingHotelsUpgradeImages> lstImages = new List <eBiddingHotelsUpgradeImages>(); for (int j = 0; j < ds.Tables[1].Rows.Count; j++) { if (Convert.ToInt32(ds.Tables[0].Rows[i]["iRoomId"]) == Convert.ToInt32(ds.Tables[1].Rows[j]["RoomId"].ToString())) { lstImages.Add(new eBiddingHotelsUpgradeImages() { iPropId = Convert.ToInt32(ds.Tables[1].Rows[j]["iPropId"]), RoomId = Convert.ToInt32(ds.Tables[1].Rows[j]["RoomId"]), bIsPrimaryR = Convert.ToBoolean(ds.Tables[1].Rows[j]["bIsPrimaryR"]), Image = ds.Tables[1].Rows[j]["Image"].ToString() }); } } List <eBiddingHotelsUpgradeViews> lstViews = new List <eBiddingHotelsUpgradeViews>(); for (int k = 0; k < ds.Tables[2].Rows.Count; k++) { if (Convert.ToInt32(ds.Tables[0].Rows[i]["iRoomId"]) == Convert.ToInt32(ds.Tables[2].Rows[k]["iRoomId"].ToString())) { lstViews.Add(new eBiddingHotelsUpgradeViews() { iPropId = Convert.ToInt32(ds.Tables[2].Rows[k]["iPropId"]), iRoomId = Convert.ToInt32(ds.Tables[2].Rows[k]["iRoomId"]), sView = ds.Tables[2].Rows[k]["sView"].ToString() }); } } List <eBiddingHotelsUpgradeFacilities> lstFacilities = new List <eBiddingHotelsUpgradeFacilities>(); for (int l = 0; l < ds.Tables[3].Rows.Count; l++) { if (Convert.ToInt32(ds.Tables[0].Rows[i]["iRoomId"]) == Convert.ToInt32(ds.Tables[3].Rows[l]["iRoomId"].ToString())) { lstFacilities.Add(new eBiddingHotelsUpgradeFacilities() { iPropId = Convert.ToInt32(ds.Tables[3].Rows[l]["iPropId"]), iRoomId = Convert.ToInt32(ds.Tables[3].Rows[l]["iRoomId"]), sFacility = ds.Tables[3].Rows[l]["sFacility"].ToString() }); } } var roomData = new eBiddingHotelsUpgradeRoomsList() { sRoomName = Convert.ToString(ds.Tables[0].Rows[i]["sRoomName"]), dSizeMtr = Convert.ToDecimal(ds.Tables[0].Rows[i]["dSizeMtr"]), dSizeSqft = Convert.ToDecimal(ds.Tables[0].Rows[i]["dSizeSqft"]), IsUpgradedRoom = Convert.ToBoolean(ds.Tables[0].Rows[i]["IsUpgradedRoom"]), iPropId = Convert.ToInt32(ds.Tables[0].Rows[i]["iPropId"]), dPrice = Convert.ToDecimal(ds.Tables[0].Rows[i]["dPrice"]), dDiscPrice = Convert.ToDecimal(ds.Tables[0].Rows[i]["dDiscPrice"]), iRoomId = Convert.ToInt32(ds.Tables[0].Rows[i]["iRoomId"]), iRPId = Convert.ToInt32(ds.Tables[0].Rows[i]["iRPId"]), dPriceWithTax = Convert.ToDecimal(ds.Tables[0].Rows[i]["dPriceWithTax"]), dTax = Convert.ToDecimal(ds.Tables[0].Rows[i]["dTax"]), sImgUrl = Convert.ToString(ds.Tables[0].Rows[i]["sImgUrl"]), TotalDifference = Convert.ToDecimal(ds.Tables[0].Rows[i]["Total Difference"]), TotalDifferenceConverted = Convert.ToDecimal(ds.Tables[0].Rows[i]["Total Difference Converted"]), TaxDifference = Convert.ToDecimal(ds.Tables[0].Rows[i]["Tax Difference"]), Amenity1 = Convert.ToString(ds.Tables[0].Rows[i]["Amenity1"]), Amenity2 = Convert.ToString(ds.Tables[0].Rows[i]["Amenity2"]), Amenity3 = Convert.ToString(ds.Tables[0].Rows[i]["Amenity3"]), Amenity4 = Convert.ToString(ds.Tables[0].Rows[i]["Amenity4"]), Amenity5 = Convert.ToString(ds.Tables[0].Rows[i]["Amenity5"]), Amenity6 = Convert.ToString(ds.Tables[0].Rows[i]["Amenity6"]), Amenity7 = Convert.ToString(ds.Tables[0].Rows[i]["Amenity7"]), Amenity8 = Convert.ToString(ds.Tables[0].Rows[i]["Amenity8"]), Symbol = Convert.ToString(ds.Tables[0].Rows[i]["Symbol"]), lstImages = lstImages, lstViews = lstViews, lstfacilities = lstFacilities }; lstRooms.Add(roomData); } obj.lstRoomsData = lstRooms; } } objConn.Close(); return(obj); }