/// <summary> /// Method which loads the gridview with all the Expired Products. /// </summary> protected void loadGridView() { Products product = new Products(); DataTable result = product.getExpiredProducts(); if (result != null && result.Rows.Count > 0) { GridView1.DataSource = result; GridView1.DataBind(); } else { this.setNotification("error", "¡No hay productos caducados!", "Excelente, no hay productos caducados al día de hoy..."); } }