public ActionResult addReservationinfo(ReservationInfoViewModel formValues)
        {
            if (TempData.ContainsKey("adminId"))
            {
                if (ModelState.IsValid)
                {
                    try
                    {
                        ReservationInfoViewModel ReservationInfoTuple = new ReservationInfoViewModel();
                        ViewBag.timeSlot = ReservationInfoTuple.timeSlots;
                        reservationInfo reservationInfoTuple = formValues.getReservationInfoValues();
                        dbContext.reservationInfoes.Add(reservationInfoTuple);
                        dbContext.SaveChanges();

                        return(RedirectToAction("index"));
                    }
                    catch (Exception ex)
                    {
                        ViewBag.exception = ex.Message;
                        return(View());
                    }
                }
                else
                {
                    return(View());
                }
            }
            else
            {
                TempData.Clear();
                return(RedirectToAction("LogIn", "LogIn"));
            }
        }
 public ActionResult Res_Info_popup(int iBooking_id)
 {
     try
     {
         List <reservationInfo> ls_res_info      = hbl.ls_Reservation_Info(iBooking_id).ToList();
         reservationInfo        _reservationInfo = ls_res_info.Single(x => x.reservationId == iBooking_id);
         return(PartialView("Res_Info_popup", _reservationInfo));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
        public ActionResult view_info(int iBooking_id)
        {
            try
            {
                List <reservationInfo> ls_res_info      = hbl.ls_Reservation_Info(iBooking_id).ToList();
                reservationInfo        _reservationInfo = ls_res_info.Single(x => x.reservationId == iBooking_id);

                List <string> strArray = new List <string>()
                {
                    "Booking ID : " + ls_res_info[0].reservationId.ToString(),
                    "Reservation Type : " + ls_res_info[0].res_type.ToString(),
                    "Faculty : " + ls_res_info[0].facultyName.ToString() + "(" + ls_res_info[0].dd_deptName.ToString() + ")",
                    ls_res_info[0].fac_mobile_no.ToString() + " / " + ls_res_info[0].fac_tele_no.ToString() + " / " + ls_res_info[0].fac_emailId.ToString(),
                    "Event Manager : " + ls_res_info[0].event_manager_name.ToString(),
                    ls_res_info[0].EM_mobile_no.ToString() + " / " + ls_res_info[0].EM_emailId.ToString()
                };

                if (ls_res_info[0].collaborative_faculty != null)
                {
                    strArray.Add(
                        "Collaborative Faculty : " + ls_res_info[0].collaborative_faculty.ToString()
                        );
                    strArray.Add(ls_res_info[0].CFac_mobile_no.ToString() + " / " + ls_res_info[0].CFac_tele_no.ToString() + " / " + ls_res_info[0].CFac_emailId.ToString());
                }

                strArray.Add("Booking Amount : " + ls_res_info[0].reservation_amount.ToString());

                //List<string> ls = ls_res_info.Cast<string>().ToList();
                string output = string.Join(", ", strArray);
                return(Json(new { success = true, data = output }));
            }
            catch (Exception ex)
            {
                return(null);
            }
        }