int cnt;
string strText = "";
string s1, s2;
try
{
OpenCon();
//ds = ((Getrows("Employee", "EmployeeNo", "", ""))(DataSet));
//ds = Getrows("Employee", "EmployeeNo", "", "");
//string str;
//str=(string)dset.Tables["Employee"].Row[0].["EmployeeNo"];
DataSet ds = new DataSet();
ds = ((DataSet)(Getrows("Employee", "EmployeeNo", out s1, out s2)));
//ds = Getrows("Employee", "EmployeeNo", out s1, out s2);
cnt = ds.Tables["Employee"].Rows.Count;
if (cnt == 0)
{
}
else
{
ddlempid.Items.Clear();
if (strText == "")
{
ddlempid.Items.Add(new ListItem("..Select Item ...", "-1"));
}
else
{
ddlempid.Items.Add(new ListItem("...." + strText + "...", ""));
}
}
for (int j = 0;j <= cnt - 1; j++)
{
ddlempid.Items.Add(new ListItem(ds.Tables["Employee"].Rows[j][""].ToString()));
}
ddlempid.SelectedIndex = 0;
}
catch (Exception ex)
{
}
finally
{
CloseCon();
if (!(ds == null))
{
while (ds.Tables.Count > 0)
{
ds.Tables.RemoveAt(0);
}
}
}
The error is:
Cannot assign to 'Getrows' because it is a 'method group'
No overload for method 'Getrows' takes '3' arguments