DataSet ds = myAdmin.getPassCodeAMIN(OID);
in above line if
getPassCodeAMIN
not returning any DataTable, when you call
ds.Tables[0].Rows
it will give you exception, you better check table count before checking row count
if (ds.Tables.Count>0 && ds.Tables[0].Rows.Count > 0)