Exemplo n.º 1
0
        private void metroButtonAddTable_Click(object sender, EventArgs e)
        {
            String Name     = textName.Text;
            String Location = RestuarantPositions[metroComboBoxLocation.SelectedIndex];

            Con.Open();
            SqlDataAdapter ada = new SqlDataAdapter("SELECT* FROM OrderTables", Con);
            DataTable      dt  = new DataTable();

            ada.Fill(dt);
            int    counts      = dt.Rows.Count;
            int    id          = counts + 1;
            string timeCreated = DateTime.Now.ToString();

            cmd = new SqlCommand(@"INSERT INTO OrderTables
                         ([ID]
                          ,[TableName]
                          ,[TimeCreated]
                          ,[TableLocation])
                          VALUES('" + id + "','" + Name + "','" + timeCreated + "','"
                                 + Location + "')", Con);
            cmd.ExecuteNonQuery();
            Con.Close();
            TablesManagment _tableForm = new TablesManagment();

            _tableForm.Show();

            this.Dispose();
        }
Exemplo n.º 2
0
        private void metroTile5_Click(object sender, EventArgs e)
        {
            TablesManagment tables = new TablesManagment();

            tables.Show();
        }