public void ChangeTableStatus(Table tab, Table_Status status) //"UPDATE tables SET [Status] = @status WHERE Table_ID = @id"
        {
            string query = "UPDATE tables SET [Status] = @status WHERE Table_ID = @id";

            SqlParameter[] sqlParameters = new SqlParameter[2];
            sqlParameters[0] = new SqlParameter("@status", (int)status);
            sqlParameters[1] = new SqlParameter("@id", tab.Table_ID);
            ExecuteEditQuery(query, sqlParameters);
        }
Example #2
0
 public void ChangeTableStatus(Table table, Table_Status status)
 {
     try
     {
         DB.ChangeTableStatus(table, status);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 private void ChangeTableStatus(Table_Status status, string successMessage)
 {
     try
     {
         tableService.ChangeTableStatus(this.CurrentTable, status);
         MessageBox.Show(successMessage);
     }
     catch (Exception ex)
     {
         MessageBox.Show("Failed - " + ex.Message);
     }
 }