* 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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user