Ejemplo n.º 1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string aID;
            int    iD = 1;

            iD  = iD + 1;
            aID = iD.ToString();
            int    pNum      = Convert.ToInt32(txPH.Text);
            string firstName = txFname.Text;
            string lastName  = txLname.Text;
            string email     = txMail.Text;
            string passWord  = txPw.Text;
            //string adminID = Convert.ToString(aID);
            BusLayer busLayer = new BusLayer();

            try
            {
                busLayer.InsertAdminDet(aID, firstName, lastName, email, pNum, passWord);
                GridTest.DataSource = busLayer.SelectAdminDet();
                GridTest.DataBind();

                if (Page.IsValid)
                {
                    Response.Redirect("AdminLogIn.aspx");
                }
            }
            catch
            {
                Response.Redirect("ErrorPage.aspx");
            }
        }
Ejemplo n.º 2
0
 public DirectionLeftState(Bus bus, CalculateAvarage avarage)
 {
     _bus                 = bus;
     _avarage             = avarage;
     _layer               = new BusLayer(_bus);
     _locatedStationIndex = _bus.BusStations.First(s => s.IsLastLocateStation).StationIndex;
 }
Ejemplo n.º 3
0
        protected void btnCheckout_Click(object sender, EventArgs e)
        {
            DateTime currentDate = new DateTime();
            string   userN       = txtUN.Text;
            string   firstN      = txtFN.Text;
            string   lastN       = txtLN.Text;
            string   phoneNo     = txtPhone.Text;
            int      phone       = Convert.ToInt32(phoneNo);
            BusLayer busLayer    = new BusLayer();

            try
            {
                if (Page.IsValid)
                {
                    Response.Redirect("PaymentPage.aspx");
                }
            }
            catch
            {
                Response.Redirect("ErrorPage.aspx");
            }
        }