示例#1
0
        private void dgvEmailHeaders_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgvEmailHeaders.Columns["ColumnCommand"].Index)
            {
                txtPONumber.Text    = "";
                txtQuantity.Text    = "";
                txtInvoiceDate.Text = "";
                txtPrice.Text       = "";
                txtShipTo.Text      = "";
                txtItemNumber.Text  = "";
                txtCompany.Text     = "";

                mSelectedMailPreview = (MailPreview)dgvEmailHeaders.Rows[e.RowIndex].DataBoundItem;
                txtInvoiceDate.Text  = mSelectedMailPreview.ReceivedDateTime.ToShortDateString();

                MailInfo        mailInfoSelected = mSelectedMailPreview.MailInfo;
                EmailRepository repo             = new EmailRepository(txtEmail.Text, txtPassword.Text);
                Mail            mailDetail       = repo.GetMailDetail(mailInfoSelected);

                webBrowserEmailBody.DocumentText = mailDetail.HtmlBody;
                btnScrap.Enabled  = true;
                btnExport.Enabled = false;

                MessageBox.Show(mSelectedMailPreview.Processed ? "Processed" : "New");
            }
        }
示例#2
0
        private void DataGridRow_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            DataGridRow row         = sender as DataGridRow;
            MailPreview mailPreview = row.Item as MailPreview;
            Mail        mail        = account.getEmailById(mailPreview.getUniqueID());
            MailWindow  mailWindow  = new MailWindow(mail);

            mailWindow.Show();
        }