Files
Unimarc/unimarc/WindowsFormsApp1/Main.cs
SeungHo Yang 278c4bb5e2 =====* unimarc *=====
------------------------

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

------------------------

===== 작업중 =====

===== 보류 =====
 b. 마크목록 폼 작성중
  1. 엑셀반출 기능 추가중 사용 작업대기중

 c. 마크 반입 폼 수정중
  1. 불러오기는 되나 저장 기능이 필요함.

===== 완료 =====
1. 주문관리 팩스연동 완료
2. 전송된 팩스 확인 작업개시, 이메일 전송모듈 수정완료.
3. 주문관리에서 주문처와 목록 검색하는 폼 검색 모듈도 재수정 완료함.
4. 데이터베이스 내 이미지URL을 가져오는작업 완료

ISBN 체크 프로그램 => 본프로그램에 이식중.
ㄴ> 코드는 다 옮겼으나 기존 사용하던 방식과 조금 달라서 버그발생 가능성 있음.
ㄴ> 버그 체크 계속 해볼것. 21-04-15
ㄴ> 21_04_20 버그 없음.

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

주문관리 작업중 (DataGridView 주문처 엔터키 입력시 검색되게끔 하는 코드작성중) - 21.04.27 완료
2021-04-27 18:38:38 +09:00

1194 lines
41 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WindowsFormsApp1.Account;
using WindowsFormsApp1.Convenience;
using WindowsFormsApp1.Delivery;
using WindowsFormsApp1.DLS;
using WindowsFormsApp1.Home;
using WindowsFormsApp1.Mac;
using WindowsFormsApp1.Work_log;
using WindowsFormsApp1.;
using System.IO;
namespace WindowsFormsApp1
{
public partial class Main : Form
{
Email email = new Email();
Helper_DB _DB = new Helper_DB();
public string DB_User_Data;
public string User;
public string com_idx;
public Main()
{
InitializeComponent();
}
public string User_Name { get; internal set; }
private void Main_Load(object sender, EventArgs e)
{
this.Visible = false; // 메인폼을 먼저 숨김
login login = new login();
if (DialogResult.OK == login.ShowDialog(this))
{
this.Visible = true;
}
else { this.Close(); }
_DB.DBcon();
DB_User_Data = _DB.DB_Search("User_Data", "id", User_Name);
try
{
string[] result = DB_User_Data.Split('|');
if (result[3] == null) { }
else {
toolStripLabel1.Text = "이용자 : " + result[3];
User = result[3];
}
if (result[8] != "관리자") { ToolStripMenuItem.Visible = false; }
com_idx = _DB.DB_Select_Search("`idx`", "Comp", "comp_name", result[5]);
com_idx = com_idx.Replace("|", "");
this.Text = "[ '" + com_idx + "' : " + result[5] + " - " + result[3] + "]";
}
catch { }
}
// 홈 탭 클릭이벤트
private User_Infor User_Infor;
private Home_User_manage home_User_Manage;
private Transaction_manage Home_transaction_Manage;
private Order_manage Home_order_Manage;
private pw_change Home_pw_Change;
private Book_infor_manage Home_book_Infor_Manage;
private ledger_of_use Home_ledger_Of_Use;
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (User_Infor != null)
{
User_Infor.Focus();
}
else
{
User_Infor = new User_Infor(this);
User_Infor.TopMost = true;
User_Infor.FormClosed += (o, ea) => User_Infor = null;
User_Infor.Show();
}
User_Infor.Show();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (home_User_Manage != null)
{
home_User_Manage.Focus();
}
else
{
home_User_Manage = new Home_User_manage(this);
home_User_Manage.MdiParent = this;
home_User_Manage.WindowState = FormWindowState.Maximized;
home_User_Manage.FormClosed += (o, ea) => home_User_Manage = null;
home_User_Manage.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Home_transaction_Manage != null)
{
Home_transaction_Manage.Focus();
}
else
{
Home_transaction_Manage = new Transaction_manage(this);
Home_transaction_Manage.MdiParent = this;
Home_transaction_Manage.WindowState = FormWindowState.Maximized;
Home_transaction_Manage.FormClosed += (o, ea) => Home_transaction_Manage = null;
Home_transaction_Manage.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Home_order_Manage != null)
{
Home_order_Manage.Focus();
}
else
{
Home_order_Manage = new Order_manage(this);
Home_order_Manage.MdiParent = this;
Home_order_Manage.WindowState = FormWindowState.Maximized;
Home_order_Manage.FormClosed += (o, ea) => Home_order_Manage = null;
Home_order_Manage.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Home_pw_Change != null)
{
Home_pw_Change.Focus();
}
else
{
Home_pw_Change = new pw_change(this);
Home_pw_Change.MdiParent = this;
Home_pw_Change.WindowState = FormWindowState.Maximized;
Home_pw_Change.FormClosed += (o, ea) => Home_pw_Change = null;
Home_pw_Change.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Home_book_Infor_Manage != null)
{
Home_book_Infor_Manage.Focus();
}
else
{
Home_book_Infor_Manage = new Book_infor_manage();
Home_book_Infor_Manage.FormClosed += (o, ea) => Home_book_Infor_Manage = null;
Home_book_Infor_Manage.Show();
}
Home_book_Infor_Manage.Show();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Home_ledger_Of_Use != null)
{
Home_ledger_Of_Use.Focus();
}
else
{
Home_ledger_Of_Use = new ledger_of_use(this);
Home_ledger_Of_Use.MdiParent = this;
Home_ledger_Of_Use.WindowState = FormWindowState.Maximized;
Home_ledger_Of_Use.FormClosed += (o, ea) => Home_ledger_Of_Use = null;
Home_ledger_Of_Use.Show();
}
}
// 납품관리 탭 클릭 이벤트
Commodity_registration Del_commodity_Registration;
List_Lookup del_list_lookup;
List_aggregation del_list_Aggregation;
Order_input del_order_Input;
Price_check del_price_Check;
Estimate Del_estimate;
Purchase Del_purchase;
Input_Purchase_Return del_input_Purchase_Return;
Input_Lookup_Stock del_input_Lookup_Stock;
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Del_commodity_Registration != null)
{
Del_commodity_Registration.Focus();
}
else
{
Del_commodity_Registration = new Commodity_registration(this);
Del_commodity_Registration.MdiParent = this;
Del_commodity_Registration.WindowState = FormWindowState.Maximized;
Del_commodity_Registration.FormClosed += (o, ea) => Del_commodity_Registration = null;
Del_commodity_Registration.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (del_list_lookup != null)
{
del_list_lookup.Focus();
}
else
{
del_list_lookup = new List_Lookup(this);
del_list_lookup.MdiParent = this;
del_list_lookup.WindowState = FormWindowState.Maximized;
del_list_lookup.FormClosed += (o, ea) => del_list_lookup = null;
del_list_lookup.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (del_list_Aggregation != null)
{
del_list_Aggregation.Focus();
}
else
{
del_list_Aggregation = new List_aggregation(this);
del_list_Aggregation.MdiParent = this;
del_list_Aggregation.WindowState = FormWindowState.Maximized;
del_list_Aggregation.FormClosed += (o, ea) => del_list_Aggregation = null;
del_list_Aggregation.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (del_order_Input != null)
{
del_order_Input.Focus();
}
else
{
del_order_Input = new Order_input(this);
del_order_Input.MdiParent = this;
del_order_Input.WindowState = FormWindowState.Maximized;
del_order_Input.FormClosed += (o, ea) => del_order_Input = null;
del_order_Input.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (del_price_Check != null)
{
del_price_Check.Focus();
}
else
{
del_price_Check = new Price_check(this);
del_price_Check.MdiParent = this;
del_price_Check.WindowState = FormWindowState.Maximized;
del_price_Check.FormClosed += (o, ea) => del_price_Check = null;
del_price_Check.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Del_estimate != null)
{
Del_estimate.Focus();
}
else
{
Del_estimate = new Estimate(this);
Del_estimate.MdiParent = this;
Del_estimate.WindowState = FormWindowState.Maximized;
Del_estimate.FormClosed += (o, ea) => Del_estimate = null;
Del_estimate.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Del_purchase != null)
{
Del_purchase.Focus();
}
else
{
Del_purchase = new Purchase(this);
Del_purchase.MdiParent = this;
Del_purchase.WindowState = FormWindowState.Maximized;
Del_purchase.FormClosed += (o, ea) => Del_purchase = null;
Del_purchase.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (del_input_Purchase_Return != null)
{
del_input_Purchase_Return.Focus();
}
else
{
del_input_Purchase_Return = new Input_Purchase_Return(this);
del_input_Purchase_Return.MdiParent = this;
del_input_Purchase_Return.WindowState = FormWindowState.Maximized;
del_input_Purchase_Return.FormClosed += (o, ea) => del_input_Purchase_Return = null;
del_input_Purchase_Return.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (del_input_Lookup_Stock != null)
{
del_input_Lookup_Stock.Focus();
}
else
{
del_input_Lookup_Stock = new Input_Lookup_Stock(this);
del_input_Lookup_Stock.MdiParent = this;
del_input_Lookup_Stock.WindowState = FormWindowState.Maximized;
del_input_Lookup_Stock.FormClosed += (o, ea) => del_input_Lookup_Stock = null;
del_input_Lookup_Stock.Show();
}
}
// 회계 탭 클릭 이벤트
Remit_reg2 Acc_remit_Reg2;
Purchase_Input Acc_purchase_Input;
Remit_reg Acc_remit_Reg;
Purchase_Book Acc_purchase_Book;
Purchase_Aggregation Acc_purchase_Aggregation;
Purchase_not_pay Acc_purchase_Not_Pay;
Sales_Input Acc_sales_Input;
Sales_Deposit Acc_sales_Deposit;
Sales_Book Acc_sales_Book;
Sales_Not_Pay Acc_sales_Not_Pay;
Bill_manage Acc_bill_Manage;
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Acc_remit_Reg2 != null)
{
Acc_remit_Reg2.Focus();
}
else
{
Acc_remit_Reg2 = new Remit_reg2(this);
Acc_remit_Reg2.MdiParent = this;
Acc_remit_Reg2.FormClosed += (o, ea) => Acc_remit_Reg2 = null;
Acc_remit_Reg2.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Acc_remit_Reg != null)
{
Acc_remit_Reg.Focus();
}
else
{
Acc_remit_Reg = new Remit_reg(this);
Acc_remit_Reg.MdiParent = this;
Acc_remit_Reg.WindowState = FormWindowState.Maximized;
Acc_remit_Reg.FormClosed += (o, ea) => Acc_remit_Reg = null;
Acc_remit_Reg.Show();
}
}
private void ToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (Acc_purchase_Book != null)
{
Acc_purchase_Book.Focus();
}
else
{
Acc_purchase_Book = new Purchase_Book(this);
Acc_purchase_Book.MdiParent = this;
Acc_purchase_Book.WindowState = FormWindowState.Maximized;
Acc_purchase_Book.FormClosed += (o, ea) => Acc_purchase_Book = null;
Acc_purchase_Book.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Acc_purchase_Aggregation != null)
{
Acc_purchase_Aggregation.Focus();
}
else
{
Acc_purchase_Aggregation = new Purchase_Aggregation(this);
Acc_purchase_Aggregation.MdiParent = this;
Acc_purchase_Aggregation.WindowState = FormWindowState.Maximized;
Acc_purchase_Aggregation.FormClosed += (o, ea) => Acc_purchase_Aggregation = null;
Acc_purchase_Aggregation.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Acc_purchase_Not_Pay != null)
{
Acc_purchase_Not_Pay.Focus();
}
else
{
Acc_purchase_Not_Pay = new Purchase_not_pay(this);
Acc_purchase_Not_Pay.MdiParent = this;
Acc_purchase_Not_Pay.WindowState = FormWindowState.Maximized;
Acc_purchase_Not_Pay.FormClosed += (o, ea) => Acc_purchase_Not_Pay = null;
Acc_purchase_Not_Pay.Show();
}
}
private void ToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (Acc_sales_Input != null)
{
Acc_sales_Input.Focus();
}
else
{
Acc_sales_Input = new Sales_Input(this);
Acc_sales_Input.MdiParent = this;
Acc_sales_Input.WindowState = FormWindowState.Maximized;
Acc_sales_Input.FormClosed += (o, ea) => Acc_sales_Input = null;
Acc_sales_Input.Show();
}
}
private void ToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (Acc_sales_Deposit != null)
{
Acc_sales_Deposit.Focus();
}
else
{
Acc_sales_Deposit = new Sales_Deposit(this);
Acc_sales_Deposit.MdiParent = this;
Acc_sales_Deposit.WindowState = FormWindowState.Maximized;
Acc_sales_Deposit.FormClosed += (o, ea) => Acc_sales_Deposit = null;
Acc_sales_Deposit.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Acc_sales_Book != null)
{
Acc_sales_Book.Focus();
}
else
{
Acc_sales_Book = new Sales_Book(this);
Acc_sales_Book.MdiParent = this;
Acc_sales_Book.WindowState = FormWindowState.Maximized;
Acc_sales_Book.FormClosed += (o, ea) => Acc_sales_Book = null;
Acc_sales_Book.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Acc_sales_Not_Pay != null)
{
Acc_sales_Not_Pay.Focus();
}
else
{
Acc_sales_Not_Pay = new Sales_Not_Pay(this);
Acc_sales_Not_Pay.MdiParent = this;
Acc_sales_Not_Pay.WindowState = FormWindowState.Maximized;
Acc_sales_Not_Pay.FormClosed += (o, ea) => Acc_sales_Not_Pay = null;
Acc_sales_Not_Pay.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e) // 계산서 관리
{
if (Acc_bill_Manage != null)
{
Acc_bill_Manage.Focus();
}
else
{
Acc_bill_Manage = new Bill_manage(this);
Acc_bill_Manage.MdiParent = this;
Acc_bill_Manage.WindowState = FormWindowState.Maximized;
Acc_bill_Manage.FormClosed += (o, ea) => Acc_bill_Manage = null;
Acc_bill_Manage.Show();
}
}
// 마크 탭 이벤트
Setup_Shortcut Mac_shortcut;
Set_Macro Mac_set_Macro;
Nonverbal Mac_nonverbal;
Job_Order Job_Order;
Mac_List Mac_List;
Mac_Stat Mac_Stat;
Make_Excel Excel_make;
Search_Infor Mac_search_Infor;
Check_ISBN Mac_check_ISBN;
Mac_Input Mac_Input;
Mac_Output Mac_Output;
Check_copy Mac_check_Copy;
DLS_Copy Mac_dLS_Copy;
All_Book_manage Mac_all_Book_Manage;
Mac_Chack_Up Mac_Chack_Up;
Collect_Mac Mac_Collect;
Symbol_Add Mac_symbol_Add;
Equip_manage Mac_equip_Manage;
Make_Document Make_Document;
School_Lookup DLS_school_Lookup;
Input_DLS DLS_input;
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_shortcut != null)
{
Mac_shortcut.Focus();
}
else
{
Mac_shortcut = new Setup_Shortcut(this);
Mac_shortcut.MdiParent = this;
Mac_shortcut.WindowState = FormWindowState.Maximized;
Mac_shortcut.FormClosed += (o, ea) => Mac_shortcut = null;
Mac_shortcut.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_set_Macro != null)
{
Mac_set_Macro.Focus();
}
else
{
Mac_set_Macro = new Set_Macro(this);
Mac_set_Macro.MdiParent = this;
Mac_set_Macro.WindowState = FormWindowState.Maximized;
Mac_set_Macro.FormClosed += (o, ea) => Mac_set_Macro = null;
Mac_set_Macro.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_nonverbal != null)
{
Mac_nonverbal.Focus();
}
else
{
Mac_nonverbal = new Nonverbal(this);
Mac_nonverbal.MdiParent = this;
Mac_nonverbal.WindowState = FormWindowState.Maximized;
Mac_nonverbal.FormClosed += (o, ea) => Mac_nonverbal = null;
Mac_nonverbal.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Job_Order != null)
{
Job_Order.Focus();
}
else
{
Job_Order = new Job_Order(this);
Job_Order.MdiParent = this;
Job_Order.WindowState = FormWindowState.Maximized;
Job_Order.FormClosed += (o, ea) => Job_Order = null;
Job_Order.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_List != null)
{
Mac_List.Focus();
}
else
{
Mac_List = new Mac_List(this);
Mac_List.MdiParent = this;
Mac_List.WindowState = FormWindowState.Maximized;
Mac_List.FormClosed += (o, ea) => Mac_List = null;
Mac_List.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_search_Infor != null)
{
Mac_search_Infor.Focus();
}
else
{
Mac_search_Infor = new Search_Infor(this);
Mac_search_Infor.MdiParent = this;
Mac_search_Infor.WindowState = FormWindowState.Maximized;
Mac_search_Infor.FormClosed += (o, ea) => Mac_search_Infor = null;
Mac_search_Infor.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Excel_make != null)
{
Excel_make.Focus();
}
else
{
Excel_make = new Make_Excel(this);
Excel_make.MdiParent = this;
Excel_make.WindowState = FormWindowState.Maximized;
Excel_make.FormClosed += (o, ea) => Excel_make = null;
Excel_make.Show();
}
}
private void iSBN조회ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_check_ISBN != null)
{
Mac_check_ISBN.Focus();
}
else
{
Mac_check_ISBN = new Check_ISBN(this);
Mac_check_ISBN.MdiParent = this;
Mac_check_ISBN.WindowState = FormWindowState.Maximized;
Mac_check_ISBN.FormClosed += (o, ea) => Mac_check_ISBN = null;
Mac_check_ISBN.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_Input != null)
{
Mac_Input.Focus();
}
else
{
Mac_Input = new Mac_Input(this);
Mac_Input.MdiParent = this;
Mac_Input.WindowState = FormWindowState.Maximized;
Mac_Input.FormClosed += (o, ea) => Mac_Input = null;
Mac_Input.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_Output != null)
{
Mac_Output.Focus();
}
else
{
Mac_Output = new Mac_Output(this);
Mac_Output.MdiParent = this;
Mac_Output.WindowState = FormWindowState.Maximized;
Mac_Output.FormClosed += (o, ea) => Mac_Output = null;
Mac_Output.Show();
}
}
private void ToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (Mac_check_Copy != null)
{
Mac_check_Copy.Focus();
}
else
{
Mac_check_Copy = new Check_copy(this);
Mac_check_Copy.MdiParent = this;
Mac_check_Copy.WindowState = FormWindowState.Maximized;
Mac_check_Copy.FormClosed += (o, ea) => Mac_check_Copy = null;
Mac_check_Copy.Show();
}
}
private void dLS복본조사ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_dLS_Copy != null)
{
Mac_dLS_Copy.Focus();
}
else
{
Mac_dLS_Copy = new DLS_Copy(this);
Mac_dLS_Copy.MdiParent = this;
Mac_dLS_Copy.WindowState = FormWindowState.Maximized;
Mac_dLS_Copy.FormClosed += (o, ea) => Mac_dLS_Copy = null;
Mac_dLS_Copy.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_Collect != null)
{
Mac_Collect.Focus();
}
else
{
Mac_Collect = new Collect_Mac(this);
Mac_Collect.MdiParent = this;
Mac_Collect.WindowState = FormWindowState.Maximized;
Mac_Collect.FormClosed += (o, ea) => Mac_Collect = null;
Mac_Collect.Show();
}
}
private void ToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (Mac_all_Book_Manage != null)
{
Mac_all_Book_Manage.Focus();
}
else
{
Mac_all_Book_Manage = new All_Book_manage(this);
Mac_all_Book_Manage.MdiParent = this;
Mac_all_Book_Manage.WindowState = FormWindowState.Maximized;
Mac_all_Book_Manage.FormClosed += (o, ea) => Mac_all_Book_Manage = null;
Mac_all_Book_Manage.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_Chack_Up != null)
{
Mac_Chack_Up.Focus();
}
else
{
Mac_Chack_Up = new Mac_Chack_Up(this);
Mac_Chack_Up.MdiParent = this;
Mac_Chack_Up.WindowState = FormWindowState.Maximized;
Mac_Chack_Up.FormClosed += (o, ea) => Mac_Chack_Up = null;
Mac_Chack_Up.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_symbol_Add != null)
{
Mac_symbol_Add.Focus();
}
else
{
Mac_symbol_Add = new Symbol_Add(this);
Mac_symbol_Add.MdiParent = this;
Mac_symbol_Add.WindowState = FormWindowState.Maximized;
Mac_symbol_Add.FormClosed += (o, ea) => Mac_symbol_Add = null;
Mac_symbol_Add.Show();
}
}
private void dLS조회ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (DLS_school_Lookup != null)
{
DLS_school_Lookup.Focus();
}
else
{
DLS_school_Lookup = new School_Lookup(this);
DLS_school_Lookup.MdiParent = this;
DLS_school_Lookup.WindowState = FormWindowState.Maximized;
DLS_school_Lookup.FormClosed += (o, ea) => DLS_school_Lookup = null;
DLS_school_Lookup.Show();
}
}
private void dLS입력ToolStripMenuItem_Click_1(object sender, EventArgs e)
{
if (DLS_input != null)
{
DLS_input.Focus();
}
else
{
DLS_input = new Input_DLS(this);
DLS_input.MdiParent = this;
DLS_input.WindowState = FormWindowState.Maximized;
DLS_input.FormClosed += (o, ea) => DLS_input = null;
DLS_input.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Make_Document != null)
{
Make_Document.Focus();
}
else
{
Make_Document = new Make_Document(this);
Make_Document.MdiParent = this;
Make_Document.WindowState = FormWindowState.Maximized;
Make_Document.FormClosed += (o, ea) => Make_Document = null;
Make_Document.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Mac_Stat != null)
{
Mac_Stat.Focus();
}
else
{
Mac_Stat = new Mac_Stat(this);
Mac_Stat.MdiParent = this;
Mac_Stat.WindowState = FormWindowState.Maximized;
Mac_Stat.FormClosed += (o, ea) => Mac_Stat = null;
Mac_Stat.Show();
}
}
private void ToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (Mac_equip_Manage != null)
{
Mac_equip_Manage.Focus();
}
else
{
Mac_equip_Manage = new Equip_manage(this);
Mac_equip_Manage.MdiParent = this;
Mac_equip_Manage.WindowState = FormWindowState.Maximized;
Mac_equip_Manage.FormClosed += (o, ea) => Mac_equip_Manage = null;
Mac_equip_Manage.Show();
}
}
// 작업일지 탭 이벤트
Work_Log work_Log;
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (work_Log != null)
{
work_Log.Focus();
}
else
{
work_Log = new Work_Log(this);
work_Log.MdiParent = this;
work_Log.WindowState = FormWindowState.Maximized;
work_Log.FormClosed += (o, ea) => work_Log = null;
work_Log.Show();
}
}
// 편의기능 탭 이벤트
Calendar calendar;
Talk talk;
Quick_menu quick_Menu;
Board board;
Send_Notice send_Notice;
Sale_Sale sale_Sale;
Sale_Settlement sale_Settlement;
Sale_End sale_End;
Sale_Member_Manage sale_Member_Manage;
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (calendar != null)
{
calendar.Focus();
}
else
{
calendar = new Calendar(this);
calendar.MdiParent = this;
calendar.WindowState = FormWindowState.Maximized;
calendar.FormClosed += (o, ea) => calendar = null;
calendar.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (talk != null)
{
talk.Focus();
}
else
{
talk = new Talk(this);
talk.MdiParent = this;
talk.WindowState = FormWindowState.Maximized;
talk.FormClosed += (o, ea) => talk = null;
talk.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (quick_Menu != null)
{
quick_Menu.Focus();
}
else
{
quick_Menu = new Quick_menu(this);
quick_Menu.MdiParent = this;
quick_Menu.WindowState = FormWindowState.Maximized;
quick_Menu.FormClosed += (o, ea) => quick_Menu = null;
quick_Menu.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (board != null)
{
board.Focus();
}
else
{
board = new Board(this);
board.MdiParent = this;
board.WindowState = FormWindowState.Maximized;
board.FormClosed += (o, ea) => board = null;
board.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (send_Notice != null)
{
send_Notice.Focus();
}
else
{
send_Notice = new Send_Notice(this);
send_Notice.MdiParent = this;
send_Notice.WindowState = FormWindowState.Maximized;
send_Notice.FormClosed += (o, ea) => send_Notice = null;
send_Notice.Show();
}
}
private void ToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (sale_Sale != null)
{
sale_Sale.Focus();
}
else
{
sale_Sale = new Sale_Sale(this);
sale_Sale.MdiParent = this;
sale_Sale.WindowState = FormWindowState.Maximized;
sale_Sale.FormClosed += (o, ea) => sale_Sale = null;
sale_Sale.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (sale_Settlement != null)
{
sale_Settlement.Focus();
}
else
{
sale_Settlement = new Sale_Settlement(this);
sale_Settlement.MdiParent = this;
sale_Settlement.WindowState = FormWindowState.Maximized;
sale_Settlement.FormClosed += (o, ea) => sale_Settlement = null;
sale_Settlement.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (sale_End != null)
{
sale_End.Focus();
}
else
{
sale_End = new Sale_End(this);
sale_End.MdiParent = this;
sale_End.WindowState = FormWindowState.Maximized;
sale_End.FormClosed += (o, ea) => sale_End = null;
sale_End.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (sale_Member_Manage != null)
{
sale_Member_Manage.Focus();
}
else
{
sale_Member_Manage = new Sale_Member_Manage(this);
sale_Member_Manage.MdiParent = this;
sale_Member_Manage.WindowState = FormWindowState.Maximized;
sale_Member_Manage.FormClosed += (o, ea) => sale_Member_Manage = null;
sale_Member_Manage.Show();
}
}
// 마스터 탭 이벤트
User_manage master_user_Manage;
Notice_Send master_notice_Send;
Sales_Details master_sales_Details;
User_account_inquiry master_user_Account_Inquiry;
Mac_Setting master_mac_setting;
Batch_processing master_batch_Processing;
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (master_user_Manage != null)
{
master_user_Manage.Focus();
}
else
{
master_user_Manage = new User_manage(this);
master_user_Manage.MdiParent = this;
master_user_Manage.WindowState = FormWindowState.Maximized;
master_user_Manage.FormClosed += (o, ea) => master_user_Manage = null;
master_user_Manage.Show();
}
}
private void ToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (master_notice_Send != null)
{
master_notice_Send.Focus();
}
else
{
master_notice_Send = new Notice_Send(this);
master_notice_Send.MdiParent = this;
master_notice_Send.WindowState = FormWindowState.Maximized;
master_notice_Send.FormClosed += (o, ea) => master_notice_Send = null;
master_notice_Send.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (master_sales_Details != null)
{
master_sales_Details.Focus();
}
else
{
master_sales_Details = new Sales_Details(this);
master_sales_Details.MdiParent = this;
master_sales_Details.WindowState = FormWindowState.Maximized;
master_sales_Details.FormClosed += (o, ea) => master_sales_Details = null;
master_sales_Details.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (master_user_Account_Inquiry != null)
{
master_user_Account_Inquiry.Focus();
}
else
{
master_user_Account_Inquiry = new User_account_inquiry(this);
master_user_Account_Inquiry.MdiParent = this;
master_user_Account_Inquiry.WindowState = FormWindowState.Maximized;
master_user_Account_Inquiry.FormClosed += (o, ea) => master_user_Account_Inquiry = null;
master_user_Account_Inquiry.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (master_mac_setting != null)
{
master_mac_setting.Focus();
}
else
{
master_mac_setting = new Mac_Setting(this);
master_mac_setting.MdiParent = this;
master_mac_setting.WindowState = FormWindowState.Maximized;
master_mac_setting.FormClosed += (o, ea) => master_mac_setting = null;
master_mac_setting.Show();
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (master_batch_Processing != null)
{
master_batch_Processing.Focus();
}
else
{
master_batch_Processing = new Batch_processing(this);
master_batch_Processing.MdiParent = this;
master_batch_Processing.WindowState = FormWindowState.Maximized;
master_batch_Processing.FormClosed += (o, ea) => master_batch_Processing = null;
master_batch_Processing.Show();
}
}
private void button1_Click(object sender, EventArgs e)
{
// 엑셀 테스트
Excel_text et = new Excel_text();
// et.mk_Excel_Order();
}
private void button2_Click(object sender, EventArgs e)
{
ExcelTest.Marc marc = new ExcelTest.Marc();
marc.Show();
}
private void button3_Click(object sender, EventArgs e)
{
/*
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);
if (Path.GetExtension(filename) != ".xls" && Path.GetExtension(filename) != ".xlsx")
{
MessageBox.Show("엑셀파일만 적용이 가능합니다! | " + Path.GetExtension(filename));
return;
}
}
if (FilePath == "") 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연동
Barobill_FAX fax = new Barobill_FAX();
fax.Send_BaroFax(filename, "", "");
*/
}
}
}