Exemplo n.º 1
0
        protected void BtnUpdate_Click(object sender, EventArgs e)
        {
            Customer cust = new Customer
            {
                Name  = TxtName.Text,
                Phone = TxtPhone.Text,
                Email = TxtEmail.Text
            };

            Receipt RecNo        = (Receipt)Session["Rec"];
            int     ReturnStatus = LaneStatusAccessLayer.updateCustomer(cust, RecNo.ReceiptNo);

            if (ReturnStatus != 0) // 0 is unsuccessful
            {
                LblReceiptNo.Text = "Information Update Success!";
                LblTimeSlot.Text  = "";
                LblTotal.Text     = "";
            }
            else
            {
                LblReceiptNo.Text = "Information Update Unuccessful";
                LblTimeSlot.Text  = "";
                LblTotal.Text     = "";
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Lanes lanes = new Lanes();

            lanes.BowlingLanes = LaneStatusAccessLayer.getAllStatuses(lanes.BowlingLanes);
            Session["Lanes"]   = lanes;
        }
Exemplo n.º 3
0
        protected void BtnDelete_Click(object sender, EventArgs e)
        {
            Receipt Recpt = (Receipt)Session["Rec"];

            int ReturnStatus = LaneStatusAccessLayer.deleteRecord(Recpt.ReceiptNo);

            if (ReturnStatus != 0) // 0 is unsuccessful
            {
                LblReceiptNo.Text = "Booking has been cancelled!";
                LblTimeSlot.Text  = "";
                LblTotal.Text     = "";
            }
            else
            {
                LblReceiptNo.Text = "Booking Cancellation was unsuccessful.";
                LblTimeSlot.Text  = "";
                LblTotal.Text     = "";
            }
        }
Exemplo n.º 4
0
 protected void BtnCheck_Click(object sender, EventArgs e)
 {
     Rec            = LaneStatusAccessLayer.getReceipt(TxtName.Text, TxtPhone.Text, TxtEmail.Text);
     Session["Rec"] = Rec;
     if (Rec != null)
     {
         BtnUpdate.Enabled  = true;
         BtnUpdate.CssClass = "btn";
         LblReceiptNo.Text  = Rec.ReceiptNo;
         LblTimeSlot.Text   = Rec.TimeBooked.ToString();
         LblTotal.Text      = Rec.Total.ToString();
     }
     else
     {
         LblReceiptNo.Text = "Booking Not Found!";
         LblTimeSlot.Text  = "";
         LblTotal.Text     = "";
     }
 }
Exemplo n.º 5
0
        protected void Pay_Click(object sender, EventArgs e)
        {
            Customer   Cust           = (Customer)Session["Customer"];
            Receipt    PendingBooking = (Receipt)Session["PendingBooking"];
            LaneTicket LaneTick       = (LaneTicket)Session["LaneTick"];

            String      ExpDate = DropDownListExpMon.SelectedValue + "/" + DropDownListExpYear.SelectedValue;
            PaymentMake obj     = new PaymentMake
            {
                cardName   = txtCardName.Text,
                cardNumber = txtCardNum.Text,
                date       = ExpDate,
                secCode    = txtSecCode.Text
            };

            LaneStatusAccessLayer.addPaymentRecord(obj);
            LaneStatusAccessLayer.addRecord(Cust, PendingBooking, LaneTick);

            Response.Redirect("~/ConfirmForm.aspx");
        }