..
This commit is contained in:
47
SubProject/FCM0000/Board/fSendMail.Designer.cs
generated
47
SubProject/FCM0000/Board/fSendMail.Designer.cs
generated
@@ -39,6 +39,7 @@
|
||||
this.bs = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.dsMSSQL = new FCM0000.dsMSSQL();
|
||||
this.mailFormBindingNavigatorSaveItem = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.tbBody = new YARTE.UI.HtmlEditor();
|
||||
this.tbTo = new System.Windows.Forms.TextBox();
|
||||
@@ -47,7 +48,6 @@
|
||||
this.tbSubject = new System.Windows.Forms.TextBox();
|
||||
this.tam = new FCM0000.dsMSSQLTableAdapters.TableAdapterManager();
|
||||
this.ta = new FCM0000.dsMSSQLTableAdapters.MailDataTableAdapter();
|
||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||
tolistLabel = new System.Windows.Forms.Label();
|
||||
bccLabel = new System.Windows.Forms.Label();
|
||||
ccLabel = new System.Windows.Forms.Label();
|
||||
@@ -74,7 +74,7 @@
|
||||
bccLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
bccLabel.AutoSize = true;
|
||||
bccLabel.Location = new System.Drawing.Point(35, 481);
|
||||
bccLabel.Location = new System.Drawing.Point(35, 467);
|
||||
bccLabel.Name = "bccLabel";
|
||||
bccLabel.Size = new System.Drawing.Size(30, 12);
|
||||
bccLabel.TabIndex = 8;
|
||||
@@ -117,14 +117,14 @@
|
||||
this.bn.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mailFormBindingNavigatorSaveItem,
|
||||
this.toolStripButton1});
|
||||
this.bn.Location = new System.Drawing.Point(0, 512);
|
||||
this.bn.Location = new System.Drawing.Point(0, 498);
|
||||
this.bn.MoveFirstItem = null;
|
||||
this.bn.MoveLastItem = null;
|
||||
this.bn.MoveNextItem = null;
|
||||
this.bn.MovePreviousItem = null;
|
||||
this.bn.Name = "bn";
|
||||
this.bn.PositionItem = null;
|
||||
this.bn.Size = new System.Drawing.Size(575, 25);
|
||||
this.bn.Size = new System.Drawing.Size(579, 25);
|
||||
this.bn.TabIndex = 0;
|
||||
this.bn.Text = "bindingNavigator1";
|
||||
//
|
||||
@@ -132,7 +132,6 @@
|
||||
//
|
||||
this.bs.DataMember = "MailData";
|
||||
this.bs.DataSource = this.dsMSSQL;
|
||||
this.bs.CurrentChanged += new System.EventHandler(this.bs_CurrentChanged);
|
||||
//
|
||||
// dsMSSQL
|
||||
//
|
||||
@@ -148,6 +147,15 @@
|
||||
this.mailFormBindingNavigatorSaveItem.Text = "Send(&S)";
|
||||
this.mailFormBindingNavigatorSaveItem.Click += new System.EventHandler(this.mailFormBindingNavigatorSaveItem_Click);
|
||||
//
|
||||
// toolStripButton1
|
||||
//
|
||||
this.toolStripButton1.Image = global::FCM0000.Properties.Resources.action_refresh;
|
||||
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButton1.Name = "toolStripButton1";
|
||||
this.toolStripButton1.Size = new System.Drawing.Size(90, 22);
|
||||
this.toolStripButton1.Text = "To OutLook";
|
||||
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click_1);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.tbBody);
|
||||
@@ -163,7 +171,7 @@
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(575, 512);
|
||||
this.panel1.Size = new System.Drawing.Size(579, 498);
|
||||
this.panel1.TabIndex = 1;
|
||||
//
|
||||
// tbBody
|
||||
@@ -177,9 +185,8 @@
|
||||
this.tbBody.Name = "tbBody";
|
||||
this.tbBody.ReadOnly = false;
|
||||
this.tbBody.ShowToolbar = true;
|
||||
this.tbBody.Size = new System.Drawing.Size(489, 375);
|
||||
this.tbBody.Size = new System.Drawing.Size(493, 361);
|
||||
this.tbBody.TabIndex = 7;
|
||||
this.tbBody.Validated += new System.EventHandler(this.htmlEditor1_Validated);
|
||||
//
|
||||
// tbTo
|
||||
//
|
||||
@@ -188,7 +195,7 @@
|
||||
this.tbTo.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "tolist", true));
|
||||
this.tbTo.Location = new System.Drawing.Point(74, 12);
|
||||
this.tbTo.Name = "tbTo";
|
||||
this.tbTo.Size = new System.Drawing.Size(489, 21);
|
||||
this.tbTo.Size = new System.Drawing.Size(493, 21);
|
||||
this.tbTo.TabIndex = 1;
|
||||
//
|
||||
// tbBCC
|
||||
@@ -197,9 +204,9 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tbBCC.BackColor = System.Drawing.Color.SkyBlue;
|
||||
this.tbBCC.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "bcc", true));
|
||||
this.tbBCC.Location = new System.Drawing.Point(74, 478);
|
||||
this.tbBCC.Location = new System.Drawing.Point(74, 464);
|
||||
this.tbBCC.Name = "tbBCC";
|
||||
this.tbBCC.Size = new System.Drawing.Size(489, 21);
|
||||
this.tbBCC.Size = new System.Drawing.Size(493, 21);
|
||||
this.tbBCC.TabIndex = 9;
|
||||
//
|
||||
// tbCC
|
||||
@@ -209,7 +216,7 @@
|
||||
this.tbCC.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "cc", true));
|
||||
this.tbCC.Location = new System.Drawing.Point(74, 40);
|
||||
this.tbCC.Name = "tbCC";
|
||||
this.tbCC.Size = new System.Drawing.Size(489, 21);
|
||||
this.tbCC.Size = new System.Drawing.Size(493, 21);
|
||||
this.tbCC.TabIndex = 3;
|
||||
//
|
||||
// tbSubject
|
||||
@@ -219,7 +226,7 @@
|
||||
this.tbSubject.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "subject", true));
|
||||
this.tbSubject.Location = new System.Drawing.Point(74, 68);
|
||||
this.tbSubject.Name = "tbSubject";
|
||||
this.tbSubject.Size = new System.Drawing.Size(489, 21);
|
||||
this.tbSubject.Size = new System.Drawing.Size(493, 21);
|
||||
this.tbSubject.TabIndex = 5;
|
||||
//
|
||||
// tam
|
||||
@@ -227,32 +234,26 @@
|
||||
this.tam.BackupDataSetBeforeUpdate = false;
|
||||
this.tam.BoardTableAdapter = null;
|
||||
this.tam.CommonTableAdapter = null;
|
||||
this.tam.CustomsTableAdapter = null;
|
||||
this.tam.InventoryTableAdapter = null;
|
||||
this.tam.ItemsTableAdapter = null;
|
||||
this.tam.MailDataTableAdapter = this.ta;
|
||||
this.tam.MailFormTableAdapter = null;
|
||||
this.tam.ProjectsTableAdapter = null;
|
||||
this.tam.PurchaseTableAdapter = null;
|
||||
this.tam.RequestItemTableAdapter = null;
|
||||
this.tam.StaffTableAdapter = null;
|
||||
this.tam.UpdateOrder = FCM0000.dsMSSQLTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete;
|
||||
//
|
||||
// ta
|
||||
//
|
||||
this.ta.ClearBeforeFill = true;
|
||||
//
|
||||
// toolStripButton1
|
||||
//
|
||||
this.toolStripButton1.Image = global::FCM0000.Properties.Resources.action_refresh;
|
||||
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButton1.Name = "toolStripButton1";
|
||||
this.toolStripButton1.Size = new System.Drawing.Size(90, 22);
|
||||
this.toolStripButton1.Text = "To OutLook";
|
||||
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click_1);
|
||||
//
|
||||
// fSendMail
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(575, 537);
|
||||
this.ClientSize = new System.Drawing.Size(579, 523);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.bn);
|
||||
this.Name = "fSendMail";
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,9 +149,6 @@
|
||||
dtINAGGiDUDGyGpoawAxeNSAQWkAORiqnRLAwAAA9EMMU8Daa3MAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="dsMSSQL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="tbBody.Html" xml:space="preserve">
|
||||
<value><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML><HEAD>
|
||||
|
||||
Reference in New Issue
Block a user