..
This commit is contained in:
@@ -15,6 +15,8 @@ namespace FCM0000
|
||||
{
|
||||
public partial class fSendMail : FCOMMON.fBase
|
||||
{
|
||||
|
||||
|
||||
public fSendMail()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -53,62 +55,32 @@ namespace FCM0000
|
||||
|
||||
private void mailFormBindingNavigatorSaveItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
this.Validate();
|
||||
|
||||
var drv = this.bs.Current as DataRowView;
|
||||
drv["body"] = this.tbBody.Html;
|
||||
drv.EndEdit();
|
||||
|
||||
this.bs.EndEdit();
|
||||
|
||||
this.tam.UpdateAll(this.dsMSSQL);
|
||||
}
|
||||
|
||||
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
dsMSSQL.MailFormRow dr = null;
|
||||
private void bs_CurrentChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void richTextBox2_Validated(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void htmlEditor1_Validated(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void mailFormDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void toolStripButton1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
var tolist = dr.tolist.Split(',');
|
||||
var drv = this.bs.Current as DataRowView;
|
||||
if (drv == null) return;
|
||||
|
||||
var dr = drv.Row as dsMSSQL.MailFormRow;
|
||||
var tolist = new string[] { "Chikyun.kim@amkor.co.kr" }; //dr.tolist.Split(',');
|
||||
Outlook.Application outlookApplication = new Outlook.Application();
|
||||
foreach (var to in tolist)
|
||||
{
|
||||
if (to.isEmpty()) continue;
|
||||
var newMail = outlookApplication.CreateItem(OlItemType.olMailItem) as Outlook.MailItem;
|
||||
newMail.Display();
|
||||
newMail.Subject = this.tbSubject.Text.Trim(); // dr.title;
|
||||
newMail.To = to;
|
||||
newMail.CC = tbCC.Text.Trim();
|
||||
newMail.BCC = tbBCC.Text.Trim();
|
||||
// newMail.BodyFormat = OlBodyFormat.olFormatHTML;
|
||||
newMail.HTMLBody = this.tbBody.Html
|
||||
.Replace("{USER}", FCOMMON.info.Login.nameK)
|
||||
.Replace("{EUSER}", FCOMMON.info.Login.nameE)
|
||||
@@ -116,10 +88,10 @@ namespace FCM0000
|
||||
.Replace("%7BEMAIL%7D", FCOMMON.info.Login.email)
|
||||
.Replace("{HP}", FCOMMON.info.Login.hp)
|
||||
.Replace("{TEL}", FCOMMON.info.Login.tel)
|
||||
.Replace("{ITEM}", dr.title);
|
||||
.Replace("{ITEM}", tbSubject.Text) + newMail.HTMLBody;
|
||||
|
||||
newMail.BodyFormat = OlBodyFormat.olFormatHTML;
|
||||
newMail.Display();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user