* unimarc

a. 팩스전송 완료.
 b. 마크목록 폼 작성중
  1. 엑셀반출 기능 추가중 사용 작업중
  2. 마크편집 폼 수정 중 (마크 반출 test프로젝트 진행완료, 본 프로젝트에 적용중. / 저장기능활성화 작업완료)
   2-1. 기존의 칸채우기에서 예상되지 못한 버그가 발생하여 칸채우기 숨김.
   2-2. 008태크 재배치 => TextBox에 적용완료. 변경사항 메모장으로 넘기는 작업 진행해야함.
   2-3. 현재 TODO : 저장기능

* ISBN 체크 프로그램 - ★작업완료★
 a. 현재 마크팀 배포완료. - 추후 수정사항발생시 수정할 것.

TODOLIST
1. 주문관리 팩스연동 완료
2. 전송된 팩스 확인 작업개시, 이메일 전송모듈 수정할것.
This commit is contained in:
SeungHo Yang
2021-04-09 19:11:43 +09:00
parent 2106b47104
commit 4cd3f53197
24 changed files with 88 additions and 46 deletions

View File

@@ -29,7 +29,7 @@ namespace ISBN_Check_test
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.tb_book_name = new System.Windows.Forms.TextBox(); this.tb_book_name = new System.Windows.Forms.TextBox();
this.tb_author = new System.Windows.Forms.TextBox(); this.tb_author = new System.Windows.Forms.TextBox();
@@ -93,14 +93,14 @@ namespace ISBN_Check_test
// //
// dataGridView1 // dataGridView1
// //
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1, this.Column1,
@@ -160,6 +160,7 @@ namespace ISBN_Check_test
this.label1.Size = new System.Drawing.Size(46, 13); this.label1.Size = new System.Drawing.Size(46, 13);
this.label1.TabIndex = 6; this.label1.TabIndex = 6;
this.label1.Text = "도서명"; this.label1.Text = "도서명";
this.label1.Click += new System.EventHandler(this.label1_Click);
// //
// label2 // label2
// //

View File

@@ -69,5 +69,17 @@ namespace ISBN_Check_test
button1_Click(null, null); button1_Click(null, null);
} }
} }
private void label1_Click(object sender, EventArgs e)
{
// yyyyMMddhhmmss
string tmp = "yyyyMMddhhmmss";
string msg = string.Empty;
msg += tmp.Substring(0, 4) + "\n" + tmp.Substring(4, 2) + "\n" + tmp.Substring(6, 2) + "\n" + tmp.Substring(8,2) + "\n" + tmp.Substring(10,2) + "\n" + tmp.Substring(12,2);
MessageBox.Show(msg);
}
} }
} }

View File

@@ -21,7 +21,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>AaoHzLkwZWtFm8QYK27OUKe4na5NBW/Zw7Qrlpq5Dkg=</dsig:DigestValue> <dsig:DigestValue>a4jOxsmi+bTIiwhb3SPbmb6L1xcjoBg1z9x1JZ6GTKQ=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>

View File

@@ -3,7 +3,7 @@
<asmv1:assemblyIdentity name="ISBN_Check_test.exe" version="1.0.0.2" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" /> <asmv1:assemblyIdentity name="ISBN_Check_test.exe" version="1.0.0.2" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<application /> <application />
<entryPoint> <entryPoint>
<assemblyIdentity name="ISBN_Check_test" version="1.0.7768.28513" language="neutral" processorArchitecture="msil" /> <assemblyIdentity name="ISBN_Check_test" version="1.0.7769.19175" language="neutral" processorArchitecture="msil" />
<commandLine file="ISBN_Check_test.exe" parameters="" /> <commandLine file="ISBN_Check_test.exe" parameters="" />
</entryPoint> </entryPoint>
<trustInfo> <trustInfo>
@@ -43,13 +43,13 @@
</dependency> </dependency>
<dependency> <dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ISBN_Check_test.exe" size="43008"> <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ISBN_Check_test.exe" size="43008">
<assemblyIdentity name="ISBN_Check_test" version="1.0.7768.28513" language="neutral" processorArchitecture="msil" /> <assemblyIdentity name="ISBN_Check_test" version="1.0.7769.19175" language="neutral" processorArchitecture="msil" />
<hash> <hash>
<dsig:Transforms> <dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>DRCM1xsajjzBfDtTQaRfXXxAUM0gBoJpUTj+frt24N4=</dsig:DigestValue> <dsig:DigestValue>sJtRJUuCXQIaz6twsCpewElVltlc6NpvIbx0LSSzeLg=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>
@@ -80,7 +80,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>eRUddpuV+QaOy4tSMp2pGEYHFiG+3CWNCzorNeq1ZTk=</dsig:DigestValue> <dsig:DigestValue>VMPQHKSieXevI1Q5Ythv36A/XEljFScABlMsffq4u4Y=</dsig:DigestValue>
</hash> </hash>
</file> </file>
</asmv1:assembly> </asmv1:assembly>

View File

@@ -21,7 +21,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>AaoHzLkwZWtFm8QYK27OUKe4na5NBW/Zw7Qrlpq5Dkg=</dsig:DigestValue> <dsig:DigestValue>a4jOxsmi+bTIiwhb3SPbmb6L1xcjoBg1z9x1JZ6GTKQ=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>

View File

@@ -3,7 +3,7 @@
<asmv1:assemblyIdentity name="ISBN_Check_test.exe" version="1.0.0.2" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" /> <asmv1:assemblyIdentity name="ISBN_Check_test.exe" version="1.0.0.2" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<application /> <application />
<entryPoint> <entryPoint>
<assemblyIdentity name="ISBN_Check_test" version="1.0.7768.28513" language="neutral" processorArchitecture="msil" /> <assemblyIdentity name="ISBN_Check_test" version="1.0.7769.19175" language="neutral" processorArchitecture="msil" />
<commandLine file="ISBN_Check_test.exe" parameters="" /> <commandLine file="ISBN_Check_test.exe" parameters="" />
</entryPoint> </entryPoint>
<trustInfo> <trustInfo>
@@ -43,13 +43,13 @@
</dependency> </dependency>
<dependency> <dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ISBN_Check_test.exe" size="43008"> <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ISBN_Check_test.exe" size="43008">
<assemblyIdentity name="ISBN_Check_test" version="1.0.7768.28513" language="neutral" processorArchitecture="msil" /> <assemblyIdentity name="ISBN_Check_test" version="1.0.7769.19175" language="neutral" processorArchitecture="msil" />
<hash> <hash>
<dsig:Transforms> <dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>DRCM1xsajjzBfDtTQaRfXXxAUM0gBoJpUTj+frt24N4=</dsig:DigestValue> <dsig:DigestValue>sJtRJUuCXQIaz6twsCpewElVltlc6NpvIbx0LSSzeLg=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>
@@ -80,7 +80,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>eRUddpuV+QaOy4tSMp2pGEYHFiG+3CWNCzorNeq1ZTk=</dsig:DigestValue> <dsig:DigestValue>VMPQHKSieXevI1Q5Ythv36A/XEljFScABlMsffq4u4Y=</dsig:DigestValue>
</hash> </hash>
</file> </file>
</asmv1:assembly> </asmv1:assembly>

View File

@@ -13,28 +13,50 @@ namespace WindowsFormsApp1
class Email class Email
{ {
Helper_DB db = new Helper_DB(); Helper_DB db = new Helper_DB();
public void Send_mail() public void Send_mail(string compidx, string pur, string filePath)
{ {
db.DBcon();
#region Setup
// 보내는 이 : 메일ID, 메일PW, smtp주소, 포트번호
string sender_Area = "`comp_name`, `email_ID`, `email_PW`, `smtp`, `port`";
string tmp_db = db.DB_Select_Search(sender_Area, "Comp", "idx", compidx);
string[] arr_db = tmp_db.Split('|');
// 받는 이 : 메일
string taker_Area = "`email`";
tmp_db = db.DB_Select_Search(taker_Area, "Purchase", "sangho", pur);
string[] arr_pur = tmp_db.Split('|');
#endregion
MailMessage mail = new MailMessage(); MailMessage mail = new MailMessage();
// 보내는 사람 이메일 // 보내는 사람 이메일
mail.From = new MailAddress("admin@gloriabook.co.kr"); mail.From = new MailAddress("jhk132765@naver.com");
// 받는 사람 이메일 // 받는 사람 이메일
mail.To.Add("jhk132765@gmail.com"); mail.To.Add("jhk132765@gmail.com");
// 메일 제목 // 메일 제목
mail.Subject = "메일 제목"; mail.Subject = "메일 제목"; // arr_db[0] + "주문분입니다.";
// 메일 내용 // 메일 내용
mail.Body = "메일 내용"; mail.Body = "메일 내용"; // arr_db[0] + "주문분입니다.";
// 첨부파일
System.Net.Mail.Attachment attachment;
// 첨부파일 붙이기
attachment = new System.Net.Mail.Attachment(filePath);
mail.Attachments.Add(attachment);
// SMTP 및 포트 설정 // SMTP 및 포트 설정
SmtpClient smtp = new SmtpClient("localhost", 25); SmtpClient smtp = new SmtpClient("smtp.naver.com", 587); // (arr_db[3], Convert.Int32(arr_db[4]);
smtp.EnableSsl = true; smtp.EnableSsl = true;
// 계정 설정 // 계정 설정
smtp.Credentials = new NetworkCredential("admin@gloriabook.co.kr", "gloria815"); smtp.Credentials = new NetworkCredential("jhk132765@naver.com", "cjaeks3356!"); // (arr_db[1], arr_db[2]);
try try
{ {
@@ -52,11 +74,11 @@ namespace WindowsFormsApp1
/// </summary> /// </summary>
/// <param name="comp_name">DB에 저장된 회사명.</param> /// <param name="comp_name">DB에 저장된 회사명.</param>
/// <param name="taker">받는 업체의 메일주소.</param> /// <param name="taker">받는 업체의 메일주소.</param>
public void Send_Test_mail(string comp_name, string taker, string title, string content) public void Send_Test_mail(string compidx, string taker, string title, string content)
{ {
db.DBcon(); db.DBcon();
string tmpdata = db.DB_Select_Search("`email_ID`, `email_PW`, `smtp`, `port`", string tmpdata = db.DB_Select_Search("`email_ID`, `email_PW`, `smtp`, `port`",
"Comp", "comp_name", comp_name); "Comp", "idx", compidx);
string[] data = tmpdata.Split('|'); string[] data = tmpdata.Split('|');
int port = Convert.ToInt32(data[3]); int port = Convert.ToInt32(data[3]);
if(port == 465) { port = 587; } // 465포트는 기술적으로 사용되지않음. 587로 대체. if(port == 465) { port = 587; } // 465포트는 기술적으로 사용되지않음. 587로 대체.
@@ -132,7 +154,7 @@ namespace WindowsFormsApp1
if(link != "") { Attach_File(mail, link); } if(link != "") { Attach_File(mail, link); }
// 포트 설정 ( TODO: 보내는이 메일에 따라 수정이 필요함. DB내 저장된 smtp 정보 가져오면 될 것 같음. ) // 포트 설정
SmtpClient tp = new SmtpClient(smtp, port); SmtpClient tp = new SmtpClient(smtp, port);
// SSL 설정 // SSL 설정

View File

@@ -335,6 +335,7 @@ namespace WindowsFormsApp1.Delivery
} }
private void button13_Click(object sender, EventArgs e) private void button13_Click(object sender, EventArgs e)
{ {
/*
List<int> chkIdx = new List<int>(); List<int> chkIdx = new List<int>();
for (int a = 0; a < dataGridView1.Rows.Count; a++) for (int a = 0; a < dataGridView1.Rows.Count; a++)
{ {
@@ -352,6 +353,22 @@ namespace WindowsFormsApp1.Delivery
return; return;
} }
} }
*/
string pur = "dasd";
string FilePath = string.Empty;
string filename = string.Empty;
OpenFileDialog Odig = openFileDialog1;
Odig.Filter = "Excel Files(*.xls)|*.xls|Excel Files(*.xlsx)|*.xlsx|All FIles(*.*)|*.*";
Odig.Title = "파일을 선택해주세요.";
if (Odig.ShowDialog() == DialogResult.OK)
{
FilePath = Odig.FileName;
filename = Path.GetFileName(FilePath);
FilePath = Path.GetDirectoryName(FilePath);
}
else return;
if (cb_ordersend.SelectedItem.ToString() == "팩스") { if (cb_ordersend.SelectedItem.ToString() == "팩스") {
@@ -396,20 +413,6 @@ namespace WindowsFormsApp1.Delivery
string[] fax_param = data_list.ToArray(); string[] fax_param = data_list.ToArray();
string FilePath = string.Empty;
string filename = string.Empty;
OpenFileDialog Odig = openFileDialog1;
Odig.Filter = "Excel Files(*.xls)|*.xls|Excel Files(*.xlsx)|*.xlsx|All FIles(*.*)|*.*";
Odig.Title = "엑셀파일을 선택해주세요.";
if (Odig.ShowDialog() == DialogResult.OK) {
FilePath = Odig.FileName;
filename = Path.GetFileName(FilePath);
FilePath = Path.GetDirectoryName(FilePath);
}
else return;
FTP ftp = new FTP(); FTP ftp = new FTP();
// TODO: openFileDialog 사용. 파일경로 가져와야함. // TODO: openFileDialog 사용. 파일경로 가져와야함.
@@ -436,15 +439,19 @@ namespace WindowsFormsApp1.Delivery
// 바로빌 FAX API연동 // 바로빌 FAX API연동
fax.Send_BaroFax(filename, fax_param); db.DB_Update("Comp", "fax_Key", fax.Send_BaroFax(filename, fax_param), "idx", compidx);
} }
if (cb_ordersend.SelectedItem.ToString() == "메일") { if (cb_ordersend.SelectedItem.ToString() == "메일") {
MessageBox.Show("TODO: 구현해야함."); Email email = new Email();
email.Send_mail(compidx, pur, Odig.FileName);
} }
} }
private void btn_send_chk_Click(object sender, EventArgs e) private void btn_send_chk_Click(object sender, EventArgs e)
{ {
fax.Send_chk_BaroFax(); string db_tmp = db.DB_Select_Search("`fax_Key`", "Comp", "idx", compidx);
string[] fax_key = db_tmp.Split('|');
fax.Send_chk_BaroFax(fax_key[0]);
} }
} }
} }