public ArrayList getTables(string storeID, string sectionName) { ArrayList mangButton = new ArrayList(); DataTable tbl = getGui.GetAllTablesBySectionID(storeID, sectionName); for (int i = 0; i < tbl.Rows.Count; i++) { if ((int)tbl.Rows[i][10] == 0) { int x = (int)tbl.Rows[i][4]; int y = (int)tbl.Rows[i][5]; int height = (int)tbl.Rows[i][6]; int width = (int)tbl.Rows[i][7]; int shapeType = (int)tbl.Rows[i][3]; TransButton.Shape shape; if (shapeType == 0) { shape = TransButton.Shape.Rec; } else if (shapeType == 1) { shape = TransButton.Shape.Square; } else { shape = TransButton.Shape.Elip; } var tmpBut = new TransButton(x, y, width, height); tmpBut.ForeColor = Color.FromArgb((int)tbl.Rows[i][13]); tmpBut.BorderColor = Color.FromArgb((int)tbl.Rows[i][13]); if (tbl.Rows[i][17].ToString() != "") { tmpBut.cashierId = tbl.Rows[i][16].ToString(); if (tbl.Rows[i][16].ToString() == StaticClass.cashierId) { tmpBut.BackColor = Color.Green; } else { tmpBut.BackColor = Color.Orange; } if (Convert.ToBoolean(tbl.Rows[i][15])) { tmpBut.BackColor = Color.Red; tmpBut.ForeColor = Color.Gray; tmpBut.Enabled = false; } tmpBut.invoiceNum = tbl.Rows[i][17].ToString(); } tmpBut.ButtonShape = shape; tmpBut.tableName = tbl.Rows[i][2].ToString(); tmpBut.ButtonText = tbl.Rows[i][2].ToString(); mangButton.Add(tmpBut); } } return(mangButton); }