SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question navigate on tableAdapter

    Hi, i am new o .net programing i am using TypedDataSet now i need to navigate on this i have a TableAdapterMethod that return a list of employes mails, i want to for each mail employe found send a email i have a function that recive a email address and send mail. i know i can use a foreach but i want know how and what kind of object i will use for do this

    how i can do this


    dsvidal_mailTableAdapters.clientesTableAdapter myda = new clientesTableAdapter();
    dsvidal_mail.clientesDataTable mydt = new dsvidal_mail.clientesDataTable();


    protected void Page_Load(object sender, EventArgs e)
    {
    //what i can do here.. ?
    foreach (object var in collection_to_loop)
    {

    }
    }

    protected void Sender(String Email)
    {
    //Mi code for send
    }

  2. #2
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dsvidal_mail.clientesDataTable mydt;
    dsvidal_mailTableAdapters.clientesTableAdapter myda;

    protected void Page_Load(object sender, EventArgs e)
    {
    //start my DataTable
    mydt = new dsvidal_mail.clientesDataTable();
    //start my Tableadapter
    myda = new clientesTableAdapter();
    //Check if firstime
    if (!IsPostBack)
    {
    //fill my dt
    mydt = myda.GetMails();
    //Recorremos los rows que tiene ese Datatable
    foreach (DataRow row in mydt.Rows)
    {
    //Get value "correo" and sent to function envia that recive string

    Envia(row["Correo"].ToString());
    }
    }
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •