..
This commit is contained in:
100
Project/Dialog/fLogin.Designer.cs
generated
100
Project/Dialog/fLogin.Designer.cs
generated
@@ -31,12 +31,15 @@
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fLogin));
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.tbID = new System.Windows.Forms.ComboBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.tbPW = new System.Windows.Forms.TextBox();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.btLogin = new System.Windows.Forms.Button();
|
||||
this.tbID = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.cmbDept = new System.Windows.Forms.ComboBox();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
@@ -45,7 +48,7 @@
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||
this.pictureBox1.Location = new System.Drawing.Point(136, 34);
|
||||
this.pictureBox1.Location = new System.Drawing.Point(205, 26);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(80, 80);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
@@ -55,6 +58,9 @@
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(244)))));
|
||||
this.panel1.Controls.Add(this.linkLabel1);
|
||||
this.panel1.Controls.Add(this.cmbDept);
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Controls.Add(this.tbID);
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
@@ -63,39 +69,48 @@
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(358, 272);
|
||||
this.panel1.Size = new System.Drawing.Size(488, 366);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// tbID
|
||||
//
|
||||
this.tbID.Font = new System.Drawing.Font("Calibri", 20.25F);
|
||||
this.tbID.FormattingEnabled = true;
|
||||
this.tbID.Location = new System.Drawing.Point(15, 217);
|
||||
this.tbID.Name = "tbID";
|
||||
this.tbID.Size = new System.Drawing.Size(460, 41);
|
||||
this.tbID.TabIndex = 3;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||
this.label2.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label2.Location = new System.Drawing.Point(12, 200);
|
||||
this.label2.Location = new System.Drawing.Point(12, 272);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(59, 14);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Password";
|
||||
this.label2.Size = new System.Drawing.Size(31, 15);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "암호";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label1.Location = new System.Drawing.Point(12, 131);
|
||||
this.label1.Location = new System.Drawing.Point(12, 200);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(70, 14);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "No or Email";
|
||||
this.label1.Size = new System.Drawing.Size(55, 15);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "사원번호";
|
||||
//
|
||||
// tbPW
|
||||
//
|
||||
this.tbPW.Font = new System.Drawing.Font("Calibri", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tbPW.Location = new System.Drawing.Point(15, 219);
|
||||
this.tbPW.Location = new System.Drawing.Point(15, 291);
|
||||
this.tbPW.Name = "tbPW";
|
||||
this.tbPW.PasswordChar = '●';
|
||||
this.tbPW.Size = new System.Drawing.Size(329, 40);
|
||||
this.tbPW.TabIndex = 3;
|
||||
this.tbPW.Size = new System.Drawing.Size(460, 40);
|
||||
this.tbPW.TabIndex = 5;
|
||||
this.tbPW.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// panel2
|
||||
@@ -103,9 +118,9 @@
|
||||
this.panel2.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.panel2.Controls.Add(this.btLogin);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 272);
|
||||
this.panel2.Location = new System.Drawing.Point(0, 366);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(358, 34);
|
||||
this.panel2.Size = new System.Drawing.Size(488, 34);
|
||||
this.panel2.TabIndex = 6;
|
||||
//
|
||||
// btLogin
|
||||
@@ -113,26 +128,50 @@
|
||||
this.btLogin.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.btLogin.Location = new System.Drawing.Point(0, 0);
|
||||
this.btLogin.Name = "btLogin";
|
||||
this.btLogin.Size = new System.Drawing.Size(358, 34);
|
||||
this.btLogin.Size = new System.Drawing.Size(488, 34);
|
||||
this.btLogin.TabIndex = 0;
|
||||
this.btLogin.Text = "LOGIN";
|
||||
this.btLogin.Text = "접속";
|
||||
this.btLogin.UseVisualStyleBackColor = true;
|
||||
this.btLogin.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// tbID
|
||||
// label3
|
||||
//
|
||||
this.tbID.Font = new System.Drawing.Font("Calibri", 20.25F);
|
||||
this.tbID.FormattingEnabled = true;
|
||||
this.tbID.Location = new System.Drawing.Point(15, 148);
|
||||
this.tbID.Name = "tbID";
|
||||
this.tbID.Size = new System.Drawing.Size(329, 41);
|
||||
this.tbID.TabIndex = 1;
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||
this.label3.ForeColor = System.Drawing.Color.DodgerBlue;
|
||||
this.label3.Location = new System.Drawing.Point(15, 340);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(243, 15);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "문의 ) Chickyun.kim@amkor.co.kr, T.8567";
|
||||
this.label3.Click += new System.EventHandler(this.label3_Click);
|
||||
//
|
||||
// cmbDept
|
||||
//
|
||||
this.cmbDept.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbDept.Font = new System.Drawing.Font("Calibri", 20.25F);
|
||||
this.cmbDept.FormattingEnabled = true;
|
||||
this.cmbDept.Location = new System.Drawing.Point(15, 144);
|
||||
this.cmbDept.Name = "cmbDept";
|
||||
this.cmbDept.Size = new System.Drawing.Size(460, 41);
|
||||
this.cmbDept.TabIndex = 1;
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.AutoSize = true;
|
||||
this.linkLabel1.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||
this.linkLabel1.Location = new System.Drawing.Point(12, 126);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(31, 15);
|
||||
this.linkLabel1.TabIndex = 0;
|
||||
this.linkLabel1.Text = "부서";
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// fLogin
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.OrangeRed;
|
||||
this.ClientSize = new System.Drawing.Size(358, 306);
|
||||
this.ClientSize = new System.Drawing.Size(488, 400);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
@@ -140,7 +179,7 @@
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "fLogin";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Login";
|
||||
this.Text = "사용자확인";
|
||||
this.Load += new System.EventHandler(this.fLogin_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
@@ -160,5 +199,8 @@
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.ComboBox tbID;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.ComboBox cmbDept;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,11 @@ namespace Project.Dialog
|
||||
if (item != "") tbID.Items.Add(item);
|
||||
if (tbID.Items.Count > 0) tbID.SelectedIndex = 0;
|
||||
|
||||
var dlist = Pub.setting.lastdept.Split(';');
|
||||
foreach (var item in dlist)
|
||||
if (item != "") this.cmbDept.Items.Add(item);
|
||||
if (cmbDept.Items.Count > 0) cmbDept.SelectedIndex = 0;
|
||||
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
|
||||
@@ -53,12 +58,22 @@ namespace Project.Dialog
|
||||
foreach (var item in this.tbID.Items)
|
||||
if (idlist.Contains(item) == false) idlist.Add(item.ToString());
|
||||
|
||||
//180605
|
||||
var userlist = "";
|
||||
foreach (var item in idlist)
|
||||
userlist += ";" + item;
|
||||
List<string> deptlist = new List<string>();
|
||||
deptlist.Add(cmbDept.Text.Trim());
|
||||
foreach (var item in this.cmbDept.Items)
|
||||
if (deptlist.Contains(item) == false) deptlist.Add(item.ToString());
|
||||
|
||||
Pub.setting.lastid = userlist;// tbID.Text.Trim();
|
||||
//180605
|
||||
var vuserlist = "";
|
||||
foreach (var item in idlist)
|
||||
vuserlist += ";" + item;
|
||||
|
||||
var vdeptlist = "";
|
||||
foreach(var item in deptlist)
|
||||
vdeptlist += ";" + item;
|
||||
|
||||
Pub.setting.lastid = vuserlist;// tbID.Text.Trim();
|
||||
Pub.setting.lastdept = vdeptlist;
|
||||
Pub.setting.Save();
|
||||
|
||||
var encpass = Pub.MakePasswordEnc(tbPW.Text.Trim());
|
||||
@@ -68,27 +83,32 @@ namespace Project.Dialog
|
||||
var users = ta.GetIDPW(encpass, tbID.Text.Trim());
|
||||
if (users.Rows.Count < 1)
|
||||
{
|
||||
Util.MsgE("No user");
|
||||
Util.MsgE("입력한 사용자 계정이 존재하지 않습니다");
|
||||
tbPW.SelectAll();
|
||||
tbPW.Focus();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//이사용자의 부서 코드확인
|
||||
var userdr = users.Rows[0] as dsMSSQL.UsersRow;
|
||||
if(userdr.level < 9 && userdr.dept != cmbDept.Text)
|
||||
{
|
||||
Util.MsgE("입력한 사용자는 지정한 부서에 접속할 권한이 없습니다");
|
||||
return;
|
||||
}
|
||||
|
||||
FCOMMON.info.Login.no = userdr.id;
|
||||
FCOMMON.info.Login.nameK = userdr.name;
|
||||
FCOMMON.info.Login.dept = userdr.dept;
|
||||
FCOMMON.info.Login.dept = cmbDept.Text;
|
||||
FCOMMON.info.Login.level = userdr.level;
|
||||
FCOMMON.info.Login.email = userdr.email;
|
||||
FCOMMON.info.Login.nameE = userdr.nameE;
|
||||
FCOMMON.info.Login.hp = userdr.hp;
|
||||
FCOMMON.info.Login.tel = userdr.tel;
|
||||
FCOMMON.info.Login.title = userdr.ads_title;
|
||||
var gcode = FCOMMON.DBM.ExecuteScalar("select isnull(gcode,'NOGCODE') from UserGroup where dept ='" + userdr.dept + "'");
|
||||
var gperm = FCOMMON.DBM.ExecuteScalar("select isnull(permission,0) from UserGroup where dept ='" + userdr.dept + "'");
|
||||
var gcode = FCOMMON.DBM.ExecuteScalar("select isnull(gcode,'NOGCODE') from UserGroup where dept ='" + cmbDept.Text + "'");
|
||||
var gperm = FCOMMON.DBM.ExecuteScalar("select isnull(permission,0) from UserGroup where dept ='" + cmbDept.Text + "'");
|
||||
FCOMMON.info.Login.gcode = gcode;
|
||||
FCOMMON.info.Login.permission = 0;
|
||||
FCOMMON.info.Login.gpermission = int.Parse( gperm);
|
||||
@@ -102,6 +122,20 @@ namespace Project.Dialog
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void label3_Click(object sender, EventArgs e)
|
||||
{
|
||||
FCOMMON.Util.RunExplorer("mailto:chikyun.kim@amkor.co.kr");
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
var f = new Dialog.fSelectDept();
|
||||
if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
if (cmbDept.Items.Contains(f.deptName) == false)
|
||||
cmbDept.Items.Add(f.deptName);
|
||||
cmbDept.Text = f.deptName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user