Ejemplo n.º 1
0
 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)//双击某一行对该联系人发送信息
 {
     try
     {
         sendmail sendab = new sendmail();
         sendab.txtTo.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
         sendab.Show();
     }
     catch
     {
     }
 }
Ejemplo n.º 2
0
 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         sendmail sendab = new sendmail();
         sendab.txtTo.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
         sendab.Show();
     }
     catch
     {
         MessageBox.Show("操作失败", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 3
0
        private void resendbutton_Click(object sender, EventArgs e)//点击转发按钮,自动填充转发的文本格式并调用发送窗体
        {
            sendmail resend = new sendmail();

            resend.Text            = "Fw:" + txtSubject.Text + " - 写邮件";
            resend.txtSubject.Text = "Fw:" + txtSubject.Text;
            if (frmMain.mailMessage.HTMLBody == null)
            {
                resend.webbody.Document.Write("<br><br><br>---------原始邮件---------<br>发件人:" + txtFrom.Text + "<br>发送时间:" + txtDate.Text + "<br>收件人:" + login.User + "<br>主题:" + txtSubject.Text + "<br>--------------------------" + "<br>" + frmMain.mailMessage.Body);
            }
            else
            {
                resend.webbody.Document.Write("<br><br><br>---------原始邮件---------<br>发件人:" + txtFrom.Text + "<br>发送时间:" + txtDate.Text + "<br>收件人:" + login.User + "<br>主题:" + txtSubject.Text + "<br>--------------------------" + frmMain.mailMessage.HTMLBody);
            }
            resend.Show();
        }
Ejemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            sendmail remail = new sendmail();

            remail.Text            = "Re:" + txtSubject.Text + " - 写邮件";
            remail.txtTo.Text      = txtFrom.Text;
            remail.txtSubject.Text = "Re:" + txtSubject.Text;
            if (frmMain.mailMessage.HTMLBody == null)
            {
                remail.webbody.Document.Write("<br><br><br>---------原始邮件---------<br>发件人:" + txtFrom.Text + "<br>发送时间:" + txtDate.Text + "<br>收件人:" + login.User + "<br>主题:" + txtSubject.Text + "<br>--------------------------" + "<br>" + frmMain.mailMessage.Body);
            }
            else
            {
                remail.webbody.Document.Write("<br><br><br>---------原始邮件---------<br>发件人:" + txtFrom.Text + "<br>发送时间:" + txtDate.Text + "<br>收件人:" + login.User + "<br>主题:" + txtSubject.Text + "<br>--------------------------" + frmMain.mailMessage.HTMLBody);
            }
            remail.Show();
        }
Ejemplo n.º 5
0
        private void button2_Click(object sender, EventArgs e)
        {
            sendmail resend = new sendmail();

            resend.Text            = "Fw:" + txtSubject.Text + " - 写邮件";
            resend.txtSubject.Text = "Fw:" + txtSubject.Text;
            if (frmMain.mailMessage.HTMLBody == null)
            {
                resend.webbody.Document.Write("<br><br><br>---------原始邮件---------<br>发件人:" + txtFrom.Text + "<br>发送时间:" + txtDate.Text + "<br>收件人:" + login.User + "<br>主题:" + txtSubject.Text + "<br>--------------------------" + "<br>" + frmMain.mailMessage.Body);
            }
            else
            {
                resend.webbody.Document.Write("<br><br><br>---------原始邮件---------<br>发件人:" + txtFrom.Text + "<br>发送时间:" + txtDate.Text + "<br>收件人:" + login.User + "<br>主题:" + txtSubject.Text + "<br>--------------------------" + frmMain.mailMessage.HTMLBody);
            }

            /*string[] attname=frmMain .strAttachment .Split (';');
             * resend.listBox1.Items.AddRange(attname );*/
            resend.Show();
        }
Ejemplo n.º 6
0
 private void sentdataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)//双击单元格触发函数
 {
     try
     {
         string   body;
         sendmail sent = new sendmail();
         sent.Text            = "发件箱信息";
         sent.txtTo.Text      = sentdataGridView.Rows[e.RowIndex].Cells[0].Value.ToString();
         sent.txtSubject.Text = sentdataGridView.Rows[e.RowIndex].Cells[1].Value.ToString();
         DBConnect();
         OleDbDataAdapter da = new OleDbDataAdapter("select 内容 from send where 时间='" + sentdataGridView.Rows[e.RowIndex].Cells[2].Value.ToString() + "'", sqlCon);//("select username as 用户名," + "password as 密码,realname as 真实姓名 from emailuser", sqlCon);
         DataSet          ds = new DataSet();
         da.Fill(ds, "tablename");
         body = ds.Tables["tablename"].Rows[0]["内容"].ToString();
         sent.webbody.Document.Write(body);
         sent.Show();
     }
     catch
     {
     }
 }
Ejemplo n.º 7
0
        /*listBox1.Items.Add(ds.Tables["tablename"].Rows[1]["password"].ToString());
         * dataGridView1.Rows[0 ].Cells[0].Value = ds.Tables["tablename"].Rows[0]["username"].ToString();
         * dataGridView1.Rows[0].Cells[1].Value = ds.Tables["tablename"].Rows[0]["password"].ToString();
         * dataGridView1.Rows[0].Cells[2].Value = ds.Tables["tablename"].Rows[0]["realname"].ToString();*/

        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                string   body;
                sendmail senddraft = new sendmail();
                senddraft.Text            = "草稿信息";
                senddraft.txtTo.Text      = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
                senddraft.txtSubject.Text = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
                DBConnect();
                OleDbDataAdapter da = new OleDbDataAdapter("select 内容 from draft where 时间='" + dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString() + "'", sqlCon);//("select username as 用户名," + "password as 密码,realname as 真实姓名 from emailuser", sqlCon);
                DataSet          ds = new DataSet();
                da.Fill(ds, "tablename");
                body = ds.Tables["tablename"].Rows[0]["内容"].ToString();
                senddraft.webbody.Document.Write(body);
                senddraft.Show();
            }
            catch
            {
                MessageBox.Show("操作失败", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 8
0
        private void sendmailtoolStripMenuItem1_Click(object sender, EventArgs e)
        {
            sendmail send = new sendmail();

            send.Show();
        }