Esempio n. 1
0
 public TicketHistory(CustomerLogin cl)
 {
     InitializeComponent();
     this.Da = new DataAccess();
     this.PopulateGridView();
     this.cl = cl;
 }
Esempio n. 2
0
 public PreviousTicketHistory(CustomerLogin cl, string id)
 {
     InitializeComponent();
     this.id = id;
     this.cl = cl;
     this.Da = new DataAccess();
     this.PopulateGridView();
 }
Esempio n. 3
0
 public BuyTicket(CustomerLogin cl, string id)
 {
     InitializeComponent();
     this.Da = new DataAccess();
     this.PopulateGridView();
     this.cl = cl;
     this.id = id;
 }
Esempio n. 4
0
        private void BtnLogin_Click(object sender, EventArgs e)
        {
            string un = "select * from Login where id = '" + this.txtUserName.Text.ToString() + "' and password = '******';";

            this.Ds = this.Da.ExecuteQuery(un);

            status = this.Ds.Tables[0].Rows[0]["status"].ToString();
            string id = txtUserName.Text;
            string pw = txtPassword.Text;


            if (this.Ds.Tables[0].Rows.Count == 1)
            {
                if (status == "1")

                {
                    this.Visible = false;
                    HomeOfAdmin a = new HomeOfAdmin(this, id, pw);
                    a.Visible = true;
                }
                else if (status == "2")
                {
                    this.Visible = false;
                    ManagerHome m = new ManagerHome(this);
                    m.Visible = true;
                }
                else if (status == "3")
                {
                    this.Visible = false;
                    CustomerLogin u = new CustomerLogin(this, id, pw);
                    u.Visible = true;
                }
            }
            else
            {
                MessageBox.Show("Invalid Credentials");
            }
        }