* 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:
131
unimarc/WindowsFormsApp1/납품관리/Order_input.Designer.cs
generated
131
unimarc/WindowsFormsApp1/납품관리/Order_input.Designer.cs
generated
@@ -28,10 +28,10 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.tb_search_order = new System.Windows.Forms.TextBox();
|
||||
this.cb_user = new System.Windows.Forms.ComboBox();
|
||||
@@ -60,8 +60,8 @@
|
||||
this.button11 = new System.Windows.Forms.Button();
|
||||
this.button12 = new System.Windows.Forms.Button();
|
||||
this.cb_ordersend = new System.Windows.Forms.ComboBox();
|
||||
this.button13 = new System.Windows.Forms.Button();
|
||||
this.button14 = new System.Windows.Forms.Button();
|
||||
this.btn_order_send = new System.Windows.Forms.Button();
|
||||
this.btn_send_chk = new System.Windows.Forms.Button();
|
||||
this.tb_orderText = new System.Windows.Forms.TextBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.button15 = new System.Windows.Forms.Button();
|
||||
@@ -93,7 +93,8 @@
|
||||
this.tb_search_book_list = new System.Windows.Forms.TextBox();
|
||||
this.button17 = new System.Windows.Forms.Button();
|
||||
this.btn_close = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.btn_Excel = new System.Windows.Forms.Button();
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
@@ -350,23 +351,25 @@
|
||||
this.cb_ordersend.Size = new System.Drawing.Size(77, 20);
|
||||
this.cb_ordersend.TabIndex = 40;
|
||||
//
|
||||
// button13
|
||||
// btn_order_send
|
||||
//
|
||||
this.button13.Location = new System.Drawing.Point(737, 111);
|
||||
this.button13.Name = "button13";
|
||||
this.button13.Size = new System.Drawing.Size(75, 23);
|
||||
this.button13.TabIndex = 42;
|
||||
this.button13.Text = "주문보내기";
|
||||
this.button13.UseVisualStyleBackColor = true;
|
||||
this.btn_order_send.Location = new System.Drawing.Point(737, 111);
|
||||
this.btn_order_send.Name = "btn_order_send";
|
||||
this.btn_order_send.Size = new System.Drawing.Size(75, 23);
|
||||
this.btn_order_send.TabIndex = 42;
|
||||
this.btn_order_send.Text = "주문보내기";
|
||||
this.btn_order_send.UseVisualStyleBackColor = true;
|
||||
this.btn_order_send.Click += new System.EventHandler(this.button13_Click);
|
||||
//
|
||||
// button14
|
||||
// btn_send_chk
|
||||
//
|
||||
this.button14.Location = new System.Drawing.Point(670, 111);
|
||||
this.button14.Name = "button14";
|
||||
this.button14.Size = new System.Drawing.Size(63, 23);
|
||||
this.button14.TabIndex = 41;
|
||||
this.button14.Text = "전송현황";
|
||||
this.button14.UseVisualStyleBackColor = true;
|
||||
this.btn_send_chk.Location = new System.Drawing.Point(670, 111);
|
||||
this.btn_send_chk.Name = "btn_send_chk";
|
||||
this.btn_send_chk.Size = new System.Drawing.Size(63, 23);
|
||||
this.btn_send_chk.TabIndex = 41;
|
||||
this.btn_send_chk.Text = "전송현황";
|
||||
this.btn_send_chk.UseVisualStyleBackColor = true;
|
||||
this.btn_send_chk.Click += new System.EventHandler(this.btn_send_chk_Click);
|
||||
//
|
||||
// tb_orderText
|
||||
//
|
||||
@@ -402,19 +405,20 @@
|
||||
this.button16.TabIndex = 46;
|
||||
this.button16.Text = "선택주문 일괄입력";
|
||||
this.button16.UseVisualStyleBackColor = true;
|
||||
this.button16.Click += new System.EventHandler(this.button16_Click);
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle5.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.chk,
|
||||
this.order,
|
||||
@@ -433,28 +437,28 @@
|
||||
this.send_date,
|
||||
this.num,
|
||||
this.chk_order});
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle7.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle7;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(9, 142);
|
||||
this.dataGridView1.MultiSelect = false;
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle4.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
|
||||
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle8.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle8;
|
||||
this.dataGridView1.RowHeadersWidth = 10;
|
||||
this.dataGridView1.RowTemplate.Height = 23;
|
||||
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(1283, 482);
|
||||
this.dataGridView1.Size = new System.Drawing.Size(1283, 566);
|
||||
this.dataGridView1.TabIndex = 47;
|
||||
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
|
||||
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
||||
@@ -558,9 +562,9 @@
|
||||
//
|
||||
// chk_order
|
||||
//
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.NullValue = false;
|
||||
this.chk_order.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle6.NullValue = false;
|
||||
this.chk_order.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.chk_order.HeaderText = "주문선택";
|
||||
this.chk_order.Name = "chk_order";
|
||||
this.chk_order.Width = 60;
|
||||
@@ -666,22 +670,22 @@
|
||||
this.btn_close.UseVisualStyleBackColor = true;
|
||||
this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
|
||||
//
|
||||
// button1
|
||||
// btn_Excel
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(818, 111);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 50;
|
||||
this.button1.Text = "button1";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
this.btn_Excel.Location = new System.Drawing.Point(902, 47);
|
||||
this.btn_Excel.Name = "btn_Excel";
|
||||
this.btn_Excel.Size = new System.Drawing.Size(75, 23);
|
||||
this.btn_Excel.TabIndex = 50;
|
||||
this.btn_Excel.Text = "엑 셀";
|
||||
this.btn_Excel.UseVisualStyleBackColor = true;
|
||||
this.btn_Excel.Click += new System.EventHandler(this.btn_Excel_Click);
|
||||
//
|
||||
// Order_input
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1305, 878);
|
||||
this.Controls.Add(this.button1);
|
||||
this.ClientSize = new System.Drawing.Size(1305, 722);
|
||||
this.Controls.Add(this.btn_Excel);
|
||||
this.Controls.Add(this.btn_close);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
@@ -691,8 +695,8 @@
|
||||
this.Controls.Add(this.button15);
|
||||
this.Controls.Add(this.tb_orderText);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.button13);
|
||||
this.Controls.Add(this.button14);
|
||||
this.Controls.Add(this.btn_order_send);
|
||||
this.Controls.Add(this.btn_send_chk);
|
||||
this.Controls.Add(this.cb_ordersend);
|
||||
this.Controls.Add(this.button12);
|
||||
this.Controls.Add(this.button11);
|
||||
@@ -745,8 +749,8 @@
|
||||
private System.Windows.Forms.Button button11;
|
||||
private System.Windows.Forms.Button button12;
|
||||
private System.Windows.Forms.ComboBox cb_ordersend;
|
||||
private System.Windows.Forms.Button button13;
|
||||
private System.Windows.Forms.Button button14;
|
||||
private System.Windows.Forms.Button btn_order_send;
|
||||
private System.Windows.Forms.Button btn_send_chk;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.Button button15;
|
||||
private System.Windows.Forms.Button button16;
|
||||
@@ -761,7 +765,7 @@
|
||||
public System.Windows.Forms.TextBox tb_search_book_list;
|
||||
public System.Windows.Forms.DataGridView dataGridView1;
|
||||
public System.Windows.Forms.TextBox tb_orderText;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button btn_Excel;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn chk;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn order;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn M;
|
||||
@@ -779,5 +783,6 @@
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn send_date;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn num;
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn chk_order;
|
||||
private System.Windows.Forms.OpenFileDialog openFileDialog1;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -14,7 +15,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
public partial class Order_input : Form
|
||||
{
|
||||
Helper_DB db = new Helper_DB();
|
||||
Skill_Grid grid = new Skill_Grid();
|
||||
Barobill_FAX fax = new Barobill_FAX();
|
||||
Main main;
|
||||
public string compidx = "";
|
||||
public int grididx;
|
||||
@@ -27,7 +28,6 @@ namespace WindowsFormsApp1.Delivery
|
||||
InitializeComponent();
|
||||
main = _main;
|
||||
}
|
||||
|
||||
private void Order_input_Load(object sender, EventArgs e)
|
||||
{
|
||||
db.DBcon();
|
||||
@@ -67,7 +67,6 @@ namespace WindowsFormsApp1.Delivery
|
||||
cb_order.Items.AddRange(order);
|
||||
cb_order.SelectedIndex = 0;
|
||||
|
||||
|
||||
// 주문서 구분
|
||||
string[] order_send = { "팩스", "메일" };
|
||||
cb_ordersend.Items.AddRange(order_send);
|
||||
@@ -273,8 +272,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
}
|
||||
private void tb_orderText_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter) {
|
||||
Order_input_Search search = new Order_input_Search(this);
|
||||
search.Where_Open = "Order";
|
||||
search.TopMost = true;
|
||||
@@ -284,12 +282,9 @@ namespace WindowsFormsApp1.Delivery
|
||||
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if(ColumnIndex == 1)
|
||||
{
|
||||
tb_orderText_KeyDown(null, e);
|
||||
}
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
private void btn_Excel_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<int> chkIdx = new List<int>();
|
||||
int total = 0;
|
||||
@@ -302,8 +297,13 @@ namespace WindowsFormsApp1.Delivery
|
||||
}
|
||||
}
|
||||
string[,] inputExcel = new string[chkIdx.Count,7];
|
||||
string pur = dataGridView1.Rows[chkIdx[0]].Cells["order"].Value.ToString();
|
||||
for(int a = 0; a < chkIdx.Count; a++)
|
||||
{
|
||||
if (dataGridView1.Rows[chkIdx[a]].Cells["order"].Value.ToString() != pur) {
|
||||
MessageBox.Show("주문처가 동일하지 않습니다!", "Error");
|
||||
return;
|
||||
}
|
||||
string list = dataGridView1.Rows[chkIdx[a]].Cells["list_name"].Value.ToString();
|
||||
string div = list.Substring(list.IndexOf(']')+1);
|
||||
int num = a + 1;
|
||||
@@ -317,7 +317,134 @@ namespace WindowsFormsApp1.Delivery
|
||||
dataGridView1.Rows[chkIdx[a]].Cells["isbn"].Value.ToString();
|
||||
}
|
||||
Excel_text ex = new Excel_text();
|
||||
ex.mk_Excel_Order(inputExcel, total, compidx);
|
||||
ex.mk_Excel_Order(inputExcel, total, compidx, pur);
|
||||
}
|
||||
private void button16_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<int> chkIdx = new List<int>();
|
||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||
{
|
||||
if (dataGridView1.Rows[a].Cells["chk"].Value.ToString() == "O") {
|
||||
chkIdx.Add(a);
|
||||
}
|
||||
}
|
||||
for(int a= 0; a < chkIdx.Count; a++)
|
||||
{
|
||||
dataGridView1.Rows[chkIdx[a]].Cells["order"].Value = tb_orderText.Text;
|
||||
}
|
||||
}
|
||||
private void button13_Click(object sender, EventArgs e)
|
||||
{
|
||||
List<int> chkIdx = new List<int>();
|
||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||
{
|
||||
if (dataGridView1.Rows[a].Cells["chk"].Value.ToString() == "O") {
|
||||
chkIdx.Add(a);
|
||||
}
|
||||
}
|
||||
|
||||
string pur = dataGridView1.Rows[chkIdx[0]].Cells["order"].Value.ToString();
|
||||
|
||||
for (int a = 0; a < chkIdx.Count; a++)
|
||||
{
|
||||
if (dataGridView1.Rows[chkIdx[a]].Cells["order"].Value.ToString() != pur) {
|
||||
MessageBox.Show("주문처가 동일하지 않습니다!", "Error");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (cb_ordersend.SelectedItem.ToString() == "팩스") {
|
||||
|
||||
List<string> data_list = new List<string>();
|
||||
|
||||
string Area = "`fax`";
|
||||
string tmp = db.DB_Select_Search(Area, "Comp", "idx", compidx);
|
||||
|
||||
string[] tmp_data = tmp.Split('|');
|
||||
string[] fax_num = tmp_data[0].Split(',');
|
||||
|
||||
string pur_area = "`fax`, `boss`";
|
||||
string tmp_pur = db.DB_Select_Search(pur_area, "Purchase", "sangho", pur);
|
||||
|
||||
string[] db_pur = tmp_pur.Split('|');
|
||||
|
||||
string[] pur_data = { "", pur, "" };
|
||||
if (db_pur.Length > 3)
|
||||
{
|
||||
for(int a = 0; a < db_pur.Length; a++)
|
||||
{
|
||||
if (a % 3 == 0) {
|
||||
if (db_pur[a] != "") {
|
||||
pur_data[0] = db_pur[a];
|
||||
}
|
||||
}
|
||||
if (a % 3 == 2) {
|
||||
if (db_pur[a] != "") {
|
||||
pur_data[2] = db_pur[a];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pur_data[1] == "") {
|
||||
MessageBox.Show("주문처의 팩스 번호가 비어있습니다!", "Error");
|
||||
return;
|
||||
}
|
||||
|
||||
data_list.Add(fax_num[0]);
|
||||
data_list.AddRange(pur_data);
|
||||
|
||||
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();
|
||||
|
||||
// TODO: openFileDialog 사용. 파일경로 가져와야함.
|
||||
|
||||
bool result = ftp.ConnectToServer();
|
||||
string path = @"";
|
||||
DirectoryInfo dirInfo = new DirectoryInfo(FilePath);
|
||||
FileInfo[] infos = dirInfo.GetFiles();
|
||||
|
||||
if (result == true) {
|
||||
foreach (FileInfo info in dirInfo.GetFiles())
|
||||
{
|
||||
if (Path.GetFileName(info.Name) == filename) {
|
||||
if (ftp.UpLoad(path, info.FullName) == false)
|
||||
MessageBox.Show("FTP Upload 실패");
|
||||
|
||||
else
|
||||
MessageBox.Show("FTP Upload 성공");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else MessageBox.Show("접속 실패");
|
||||
|
||||
// 바로빌 FAX API연동
|
||||
|
||||
fax.Send_BaroFax(filename, fax_param);
|
||||
}
|
||||
if (cb_ordersend.SelectedItem.ToString() == "메일") {
|
||||
MessageBox.Show("TODO: 구현해야함.");
|
||||
}
|
||||
}
|
||||
private void btn_send_chk_Click(object sender, EventArgs e)
|
||||
{
|
||||
fax.Send_chk_BaroFax();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -168,4 +168,10 @@
|
||||
<metadata name="chk_order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>5, 1</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>27</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Reference in New Issue
Block a user