Guest User

Untitled

a guest
May 26th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. protected IEnumerable RenderAutoOrderList()
  2. {
  3.  
  4. DataCommand cmd = new DataCommand();
  5. IDataReader rd = null;
  6.  
  7. rd = cmd.GetReader(@"Select AutoOrderID, Total, LastRunDate, NextRunDate From AutoOrder Where CustomerID={0}", WebIdentity.Current.CustomerID);
  8.  
  9.  
  10. while(rd.Read())
  11. {
  12. yield return rd[0].ToString();
  13. }
  14.  
  15. }
  16.  
  17. and i call it using <%=RenderAutoOrderList() %> from within the Default.aspx
Add Comment
Please, Sign In to add comment