public SqlDataReader Binderemployee_no(string Org_no)
{
string sql="";
if (Org_no!=""&&Org_no!=null)
{
sql="select employee_no from employee1 where Org_no={0}";
sql=string.Format(sql,Org_no);
}
else
{
sql="select distinct employee_no from employee1";
}
SqlCommand cmd=new SqlCommand(sql,MyConn);
MyConn.Open();
try
{
cmd.ExecuteReader(CommandBehavior.CloseConnection);
}
catch(Exception ex)
{
Response.Write(ex.ToString());
}
finally
{
MyConn.Close();
}
}
C:\Inetpub\wwwroot\ItemBound\WebForm1.aspx.cs(144): “ItemBound.WebForm1.Binderemployee_no(string)” : 并非所有的代码路径都返回值