=====* unimarc [0.0104] 버전관리 시작 *=====

1. 인쇄 오류 수정
2. DLS복본조사 추가
This commit is contained in:
SeungHo Yang
2021-12-21 17:43:36 +09:00
parent d3ad66cf1f
commit 43625b5e62
91 changed files with 7119 additions and 4951 deletions

View File

@@ -47,23 +47,25 @@ namespace WindowsFormsApp1
login login = new login();
if (DialogResult.OK == login.ShowDialog(this))
{
if (DialogResult.OK == login.ShowDialog(this)) {
this.Visible = true;
}
else { this.Close(); }
else {
this.Close();
}
_DB.DBcon();
string cmd = _DB.DB_Search("User_Data", "id", User_Name);
string cmd = _DB.DB_Search("User_Data", "ID", User_Name);
DB_User_Data = _DB.DB_Send_CMD_Search(cmd);
try
{
string[] result = DB_User_Data.Split('|');
if (result[3] == null) { }
else {
else
{
toolStripLabel2.Text = result[4];
toolStripLabel1.Text = result[3];
botUserLabel.Text = result[3];
User = result[3];
}
@@ -72,13 +74,215 @@ namespace WindowsFormsApp1
cmd = _DB.DB_Select_Search("`idx`", "Comp", "comp_name", result[5]);
com_idx = _DB.DB_Send_CMD_Search(cmd).Replace("|", "");
Settings.Default.compidx = com_idx;
Settings.Default.User = toolStripLabel1.Text;
Settings.Default.User = botUserLabel.Text;
this.Text = "[ '" + com_idx + "' : " + result[4] + " - " + result[3] + "]";
isAccess();
SetBtnName();
}
catch { }
catch (Exception ex) { MessageBox.Show(ex.ToString()); }
}
#region
public void SetBtnName()
{
string Area =
"`ShortCut1`, `ShortCut2`, `ShortCut3`, `ShortCut4`, `ShortCut5`, " +
"`ShortCut6`, `ShortCut7`, `ShortCut8`, `ShortCut9`, `ShortCut10`, " +
"`ShortCut11`, `ShortCut12`";
string cmd = string.Format("SELECT {0} FROM `User_ShortCut` WHERE `id` = \"{1}\"", Area, User_Name);
string res = _DB.DB_Send_CMD_Search(cmd);
string[] ary_res = res.Split('|');
Button[] btn = {
ShortCut1, ShortCut2, ShortCut3, ShortCut4, ShortCut5,
ShortCut6, ShortCut7, ShortCut8, ShortCut9, ShortCut10,
ShortCut11, ShortCut12
};
for (int a = 0; a < btn.Length; a++)
{
if (ary_res[a] == "")
ary_res[a] = string.Format("미지정{0}", a + 1);
btn[a].Text = ary_res[a];
if (!ary_res[a].Contains("미지정"))
btn[a].Enabled = true;
}
}
private void Btn_ShortCut_Click(object sender, EventArgs e)
{
#region
Button btn = sender as Button;
string btnText = btn.Text;
string[] Div = {
"물품등록", "목록조회", "목록집계", "주문입력", "입고작업",
"재고입력 및 조회", "반품처리" };
ToolStripMenuItem[] DivT = {
, , , , ,
,
};
string[] Acc = {
"송금내역조회", "송금등록", "매입 집계", "매입 장부", "매출 입력",
"매출 입금", "매출 조회", "매출 집계", "파트타임 관리" };
ToolStripMenuItem[] AccT = {
, , , , ,
, , ,
};
ToolStripMenuItem[] TempAcc = {
, , , , ,
, , ,
};
string[] Marc = {
"마크 목록", "소장자료검색", "마크 정리", "ISBN 조회", "반입",
"반출", "복본 조사", "DLS 복본 조사", "마크 수집", "전집관리",
"검수", "저자기호", "DLS 조회", "DLS 입력", "서류작성",
"마크통계", "장비관리" };
ToolStripMenuItem[] MarcT = {
, , , iSBN조회, ,
, 1, dLS복본조사, , ,
, , DLS조회, DLS입력, ,
,
};
ToolStripMenuItem[] TempMarc = {
, , , , ,
, , , , ,
, , DLS, DLS, ,
,
};
string[] Home = {
"사용자 관리", "납품 / 거래처 관리", "주문처 관리", "도서정보 관리" };
ToolStripMenuItem[] HomeT = {
, , ,
};
string[][] MenuTotal = { Div, Acc, Marc, Home };
ToolStripMenuItem[][] MenuTotalT = { DivT, AccT, MarcT, HomeT };
ToolStripMenuItem[][] MenuCheckT = { DivT, TempAcc, TempMarc, HomeT };
int[] count = { -1, -1 };
#endregion
for (int a = 0; a < MenuTotal.Length; a++)
{
bool IsText = false;
for(int b = 0; b < MenuTotal[a].Length; b++)
{
if (MenuTotal[a][b] == btnText) {
IsText = true;
count[1] = b;
break;
}
}
if (IsText) {
count[0] = a;
break;
}
}
// 지정된게 없을경우 리턴
foreach (int a in count)
if (a == -1)
return;
// 권한설정으로 인한 리턴
if (!MenuCheckT[count[0]][count[1]].Enabled) {
MessageBox.Show("권한이 설정되지 않았습니다!");
return;
}
// 실행.
MenuTotalT[count[0]][count[1]].PerformClick();
}
#endregion
#region
private void isAccess()
{
string Area =
"`Div_ListInput`, `Div_ListLookup`, `Div_ListTotal`, `Div_OrderInput`, `Div_Inven`,"
+ "`Div_Stock`, `Div_Return`,"
+ "`Acc_SendMoneyList`, `Acc_SendMoneyInput`, `Acc_Buy`, `Acc_Sales`, `Acc_PartTime`,"
+ "`Marc_Setup`, `Marc_Work`, `Marc_Input`, `Marc_CopyCheck`, `Marc_Option`,"
+ "`Marc_DLS`, `Marc_ETC`,"
+ "`Manage_User`, `Manage_Client`, `Manage_Purchase`, `Manage_Book`";
string cmd = string.Format("SELECT {0} FROM `User_Access` WHERE `id` = \"{1}\"", Area, User_Name);
string res = _DB.DB_Send_CMD_Search(cmd);
string[] ary_res = res.Split('|');
ToolStripMenuItem[] menus =
{
, , , , ,
, ,
, , , , ,
, , , , , DLS, ,
, , ,
};
for (int a = 0; a < ary_res.Length; a++)
{
if (ary_res[a] == "0")
{
menus[a].Enabled = false;
}
}
ToolStripMenuItem[] Div = {
, , , , ,
,
};
IsMenuAccess(Div, ToolStripMenuItem);
ToolStripMenuItem[] Acc = {
, , , ,
};
IsMenuAccess(Acc, ToolStripMenuItem);
ToolStripMenuItem[] Marc = {
, , , , , DLS,
};
IsMenuAccess(Marc, ToolStripMenuItem);
ToolStripMenuItem[] Manage = {
, , ,
};
IsMenuAccess(Manage, ToolStripMenuItem);
}
private void IsMenuAccess(ToolStripMenuItem[] Menu, ToolStripMenuItem Target)
{
bool IsEnabled = true;
for (int a = 0; a < Menu.Length; a++)
{
if (Menu[a].Enabled)
IsEnabled = false;
if (!IsEnabled)
break;
}
if (IsEnabled)
Target.Enabled = false;
}
#endregion
#region
// 홈 탭 클릭이벤트
private User_Infor User_Infor;