-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged waiter and admin to master finally
- Loading branch information
Showing
23 changed files
with
1,068 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Data; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Forms; | ||
using MetroFramework.Forms; | ||
using EnigmaX; | ||
using EnigmaX.Classes; | ||
using Enigma.StationsGUI; | ||
using MySql.Data.MySqlClient; | ||
|
||
namespace Enigma.Popups | ||
{ | ||
public partial class checkoutTablePopup : MetroForm | ||
{ | ||
WaiterStationView wsv = new WaiterStationView(); | ||
public checkoutTablePopup(WaiterStationView waiterStation) | ||
{ | ||
InitializeComponent(); | ||
wsv = waiterStation; | ||
} | ||
|
||
private void checkoutTablePopup_Load(object sender, EventArgs e) | ||
{ | ||
|
||
} | ||
|
||
private void confirm_Click(object sender, EventArgs e) | ||
{ | ||
DBConnect db = new DBConnect(); | ||
db.getConnection().Open(); | ||
MySqlCommand cmd = new MySqlCommand("UPDATE Seating SET status = @status WHERE tableNumber = @tableNumber", db.getConnection()); | ||
//parametrize the variables | ||
cmd.Parameters.AddWithValue("@status", 1); | ||
cmd.Parameters.AddWithValue("@tableNumber", wsv._tableNumber); | ||
cmd.ExecuteNonQuery(); | ||
|
||
cmd = new MySqlCommand("UPDATE Seating SET tableOrder = @tableOrder WHERE tableNumber = @tableNumber", db.getConnection()); | ||
cmd.Parameters.AddWithValue("@tableOrder", null); | ||
cmd.Parameters.AddWithValue("@tableNumber", wsv._tableNumber); | ||
cmd.ExecuteNonQuery(); | ||
|
||
db.getConnection().Close(); | ||
} | ||
} | ||
} |
Oops, something went wrong.