void setExistingTableRowNumber()
        {
            for (int row = 0; row < getData.dataTable.Rows.Count; row++)
            {
                tableOperation         = new cTableOperations();
                tableOperation.tableId = Convert.ToInt32(getData.dataTable.Rows[row]["tableID"]).ToString();
                tableOperation.rowNumb = (row + 1);

                tableOperation.updateTableRowNumber();
            }
        }
 void addTable()
 {
     for (int i = 0; i < Convert.ToInt32(TBoxTableAmount.Text); i++)
     {
         tableOperation          = new cTableOperations();
         tableOperation.sqlQuery = "insert into tables (tableCapacity,tableStatus, serviceStatus) "
                                   + "values (@capacity, @tableStatus, @serviceStatus)";
         tableOperation.capacity      = CBoxTableCapacity.Text;
         tableOperation.tableStatus   = true;
         tableOperation.serviceStatus = false;
         tableOperation.addNewTable();
     }
 }
        void removeTable()
        {
            string       message = "Are you sure you want to delete table " + PBoxClicked.Tag.ToString();
            DialogResult result  = MessageBox.Show(message, "Delete Table", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes && PBoxClicked.BackColor == closeTableColor)
            {
                tableOperation         = new cTableOperations();
                tableOperation.tableId = PBoxClicked.Tag.ToString();
                tableOperation.deleteTable();

                refreshForm();
                isRemoveTableClicked = false;
            }
        }
 void closeTableAccount()
 {
     table = new cTableOperations();
     table.tableId = dGridView.CurrentRow.Cells["tableID"].Value.ToString();
     table.closeAccount();
 }
 void openTableToService()
 {
     tableOperation         = new cTableOperations();
     tableOperation.tableId = PBoxClicked.Tag.ToString();
     tableOperation.openNewAccount();
 }