public control GetControls(int orderType_id) { OrderQuery OrderQuery = new OrderQuery(language); System.Data.DataTable dataTable = conn_db.ReadTable(OrderQuery.GetControls(orderType_id)); control control = new control(); if (dataTable.Rows.Count == 0) { throw new EmptyViewException(language); } foreach (System.Data.DataRow row in dataTable.Rows) { control = new control(); control.PHOTO = Convert.ToBoolean(row["PHOTO"]); control.LOCATION = Convert.ToBoolean(row["LOCATION"]); control.CITY = Convert.ToBoolean(row["CITY"]); control.CAR = Convert.ToBoolean(row["CAR"]); control.INFOWINDOW = Convert.ToBoolean(row["INFOWINDOW"]); } return(control); }