我有2个datagridview我需要将数据从一个带到另一个带有rowindex和查询的问题我有一个问题,查询没有显示其写入的数据为空
void dataGridViewDoses_CellClick(object sender, DataGridViewCellEventArgs e)
{
RowIndex = int.Parse(e.RowIndex.ToString());
int categoryId = (int)this.comboBoxCategoryOrders.SelectedValue;
dataGridViewDoseOrders.DataSource = Dose.GetDoseOrder(categoryId, RowIndex);
}
public static DataTable GetDoseOrder(int CategoryID, int RowIndex)
{
string strSql = string.Format("SELECT DoseName, Price, CategoryID, ImageUrl FROM TblDose WHERE(CategoryID = {0})AND(RowIndex = {1})", CategoryID, RowIndex);
return DAL.GetDataTable(strSql);
}
CategoryID和RowIndex显示true值但不显示数据