예제 #1
0
        public string[] GetMail(int index)
        {
            DataMail temp = listDataMail.ElementAt(index);

            string[] str = new string[4];

            str[0] = temp.mail;
            str[1] = temp.tema;
            str[2] = temp.soder;
            str[3] = temp.path;

            return(str);
        }
예제 #2
0
        public void Exec(string vcode, SqlConnection connection)
        {
            string         sqlExpress = "select * from plm_sentMessForSZclr" + "(" + vcode + ")"; //команда для получения данных ждя отправки
            SqlCommand     exportData = new SqlCommand(sqlExpress, connection);
            SqlDataAdapter adapter    = new SqlDataAdapter(exportData);
            DataTable      dt         = new DataTable();

            adapter.Fill(dt);

            foreach (DataRow row in dt.Rows)
            {
                var      temp = row.ItemArray;
                DataMail dm   = new DataMail(temp[0].ToString().Trim(), temp[1].ToString().Trim(), temp[2].ToString().Trim(), temp[3].ToString().Trim());
                listDataMail.Add(dm);
            }
        }