protected void BtnSave_Click(object sender, EventArgs e)
    {
        try
        {
            BookingCateenLogicLayer BCL = new BookingCateenLogicLayer();
            BCL.BookingId = hfBookingId.Value.ToString();
            BCL.ProductId = DrpFoodName.SelectedValue.ToString();
            BCL.Qty       = TextBox1.Text;
            BCL.Rate      = LblRs.Text;
            BCL.UserId    = Session["UserId"].ToString();
            BCL.EntryBy   = Session["UserId"].ToString();
            if (Rdbtn1.Checked == true)
            {
                BCL.Type = "1";
            }
            else if (RdBtn2.Checked == true)
            {
                BCL.Type = "2";
            }

            BookingCateenLogicLayer.InsertBookingCateenDetials(BCL);
            GridFill(hfBookingId.Value.ToString());
        }
        catch (Exception)
        {
        }
    }
示例#2
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        bookingLogicLayer BL = new bookingLogicLayer();

        BL.PayamentStatus = "0";
        BL.UserId         = Session["UserId"].ToString();
        BL.EntryBy        = Session["UserId"].ToString();
        string BID = bookingLogicLayer.InsertbookingDetials(BL);

        DataTable dtCurrentTable = (DataTable)ViewState["dtTable"];

        for (int i = 0; i < dtCurrentTable.Rows.Count; i++)
        {
            if (dtCurrentTable.Rows[i]["type"].ToString() == "0")
            {
                dtCurrentTable.Rows[i]["type"] = "2";
                BookingSeatLogicLayer BLS = new BookingSeatLogicLayer();
                if (rdobtnD1.Checked == true)
                {
                    BLS.BookingDate = rdobtnD1.Text;
                }
                else if (rdobtnD2.Checked == true)
                {
                    BLS.BookingDate = rdobtnD2.Text;
                }
                else if (rdobtnD3.Checked == true)
                {
                    BLS.BookingDate = rdobtnD3.Text;
                }

                if (RadioButton1.Checked == true)
                {
                    BLS.BookingTime = "1";
                }
                else if (RadioButton2.Checked == true)
                {
                    BLS.BookingTime = "2";
                }
                else if (RadioButton3.Checked == true)
                {
                    BLS.BookingTime = "3";
                }
                else if (RadioButton4.Checked == true)
                {
                    BLS.BookingTime = "4";
                }

                BLS.BookingId   = BID;
                BLS.BookingType = TypeId;
                BLS.SeatNo      = (i + 1).ToString();
                BLS.Rate        = lblRate.Text.Trim();
                BLS.UserId      = Session["UserId"].ToString();
                BLS.MovieId     = hfMoviesId.Value;
                BookingSeatLogicLayer.InsertBookingSeatDetials(BLS);
                DataTable Dt = BookingSeatLogicLayer.GetAllIDWiseBookedSeatDetials(BID);
                if (Dt.Rows.Count > 0)
                {
                    string Message = "";
                    Message = "MovieName :" + Dt.Rows[0]["MoviesName"].ToString() + " ScreenName : " + Dt.Rows[0]["ScreenName"].ToString() + " Seat No : " + Dt.Rows[0]["SeatNo"].ToString();
                    MessageCenter.SendMsg(Dt.Rows[0]["MobileNumber"].ToString(), Message);
                }
            }
        }
        ViewState["dtTable"] = dtCurrentTable;
        DataTable DtBooking1 = (DataTable)ViewState["DtBooking"];

        for (int i = 0; i < DtBooking1.Rows.Count; i++)
        {
            BookingCateenLogicLayer BCL = new BookingCateenLogicLayer();
            BCL.BookingId = BID;
            BCL.ProductId = DtBooking1.Rows[i]["ProductId"].ToString();
            BCL.Qty       = DtBooking1.Rows[i]["Qty"].ToString();
            BCL.Rate      = DtBooking1.Rows[i]["Rate"].ToString();
            BCL.UserId    = Session["UserId"].ToString();
            BCL.EntryBy   = Session["UserId"].ToString();
            BookingCateenLogicLayer.InsertBookingCateenDetials(BCL);
        }
        rpt.DataSource = ViewState["dtTable"];
        rpt.DataBind();

        int CheckCount = 0;

        if (string.IsNullOrWhiteSpace(Request.QueryString["Count"]))
        {
            CheckCount = 100;
        }
        else
        {
            CheckCount = Convert.ToInt32(Request.QueryString["Count"]);
        }
        if (CheckCount != 0 || CheckCount != 100)
        {
            string AAAA = bookingLogicLayer.ReSudulewithBookingId(Convert.ToString(Request.QueryString["OldBookingId"]));
        }
        // Response.Redirect("Recipt.aspx?Id=" + BID);
        Response.Redirect("BookCanteen.aspx?Bookingid=" + BID);
    }