..
This commit is contained in:
43
Project/Dialog/fLogin.Designer.cs
generated
43
Project/Dialog/fLogin.Designer.cs
generated
@@ -38,6 +38,8 @@
|
||||
this.tbPW = new System.Windows.Forms.TextBox();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.btLogin = new System.Windows.Forms.Button();
|
||||
this.cmbDept = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
@@ -56,6 +58,8 @@
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(244)))));
|
||||
this.panel1.Controls.Add(this.cmbDept);
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Controls.Add(this.linkLabel2);
|
||||
this.panel1.Controls.Add(this.tbID);
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
@@ -65,7 +69,7 @@
|
||||
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(488, 276);
|
||||
this.panel1.Size = new System.Drawing.Size(488, 377);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// linkLabel2
|
||||
@@ -74,7 +78,7 @@
|
||||
this.linkLabel2.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||
this.linkLabel2.ForeColor = System.Drawing.Color.DodgerBlue;
|
||||
this.linkLabel2.LinkColor = System.Drawing.Color.DodgerBlue;
|
||||
this.linkLabel2.Location = new System.Drawing.Point(13, 247);
|
||||
this.linkLabel2.Location = new System.Drawing.Point(13, 335);
|
||||
this.linkLabel2.Name = "linkLabel2";
|
||||
this.linkLabel2.Size = new System.Drawing.Size(243, 15);
|
||||
this.linkLabel2.TabIndex = 7;
|
||||
@@ -86,7 +90,7 @@
|
||||
//
|
||||
this.tbID.Font = new System.Drawing.Font("Calibri", 20.25F);
|
||||
this.tbID.FormattingEnabled = true;
|
||||
this.tbID.Location = new System.Drawing.Point(16, 125);
|
||||
this.tbID.Location = new System.Drawing.Point(16, 213);
|
||||
this.tbID.Name = "tbID";
|
||||
this.tbID.Size = new System.Drawing.Size(460, 41);
|
||||
this.tbID.TabIndex = 3;
|
||||
@@ -96,7 +100,7 @@
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||
this.label2.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label2.Location = new System.Drawing.Point(13, 181);
|
||||
this.label2.Location = new System.Drawing.Point(13, 269);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(31, 15);
|
||||
this.label2.TabIndex = 4;
|
||||
@@ -107,7 +111,7 @@
|
||||
this.label1.AutoSize = true;
|
||||
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(13, 108);
|
||||
this.label1.Location = new System.Drawing.Point(13, 196);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(55, 15);
|
||||
this.label1.TabIndex = 2;
|
||||
@@ -116,7 +120,7 @@
|
||||
// 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(16, 199);
|
||||
this.tbPW.Location = new System.Drawing.Point(16, 287);
|
||||
this.tbPW.Name = "tbPW";
|
||||
this.tbPW.PasswordChar = '●';
|
||||
this.tbPW.Size = new System.Drawing.Size(460, 40);
|
||||
@@ -128,7 +132,7 @@
|
||||
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, 276);
|
||||
this.panel2.Location = new System.Drawing.Point(0, 377);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(488, 34);
|
||||
this.panel2.TabIndex = 6;
|
||||
@@ -144,11 +148,32 @@
|
||||
this.btLogin.UseVisualStyleBackColor = true;
|
||||
this.btLogin.Click += new System.EventHandler(this.button1_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(16, 136);
|
||||
this.cmbDept.Name = "cmbDept";
|
||||
this.cmbDept.Size = new System.Drawing.Size(460, 41);
|
||||
this.cmbDept.TabIndex = 9;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label3.Location = new System.Drawing.Point(13, 119);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(31, 15);
|
||||
this.label3.TabIndex = 8;
|
||||
this.label3.Text = "부서";
|
||||
//
|
||||
// fLogin
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.OrangeRed;
|
||||
this.ClientSize = new System.Drawing.Size(488, 310);
|
||||
this.ClientSize = new System.Drawing.Size(488, 411);
|
||||
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)));
|
||||
@@ -177,5 +202,7 @@
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.ComboBox tbID;
|
||||
private System.Windows.Forms.LinkLabel linkLabel2;
|
||||
private System.Windows.Forms.ComboBox cmbDept;
|
||||
private System.Windows.Forms.Label label3;
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,16 @@ namespace Project.Dialog
|
||||
if (item != "") tbID.Items.Add(item);
|
||||
if (tbID.Items.Count > 0) tbID.SelectedIndex = 0;
|
||||
|
||||
//var dlist = Pub.setting.lastdept.Split(';');
|
||||
//그룹목록가져오기
|
||||
var tagrp = new dsMSSQLTableAdapters.UserGroupTableAdapter();
|
||||
var grplist = tagrp.GetData();
|
||||
this.cmbDept.DataSource = grplist;
|
||||
this.cmbDept.DisplayMember = "dept";
|
||||
this.cmbDept.ValueMember = "gcode";
|
||||
|
||||
//마지막으로사용한 부서이름
|
||||
if (Pub.setting.lastdpt.isEmpty()) this.cmbDept.SelectedIndex = -1;
|
||||
else this.cmbDept.Text =Pub.setting.lastdpt;
|
||||
//foreach (var item in dlist)
|
||||
// if (item != "") this.cmbDept.Items.Add(item);
|
||||
//if (cmbDept.Items.Count > 0) cmbDept.SelectedIndex = 0;
|
||||
@@ -52,6 +61,12 @@ namespace Project.Dialog
|
||||
tbPW.Focus();
|
||||
return;
|
||||
}
|
||||
if(cmbDept.SelectedIndex < 0)
|
||||
{
|
||||
FCOMMON.Util.MsgE("소속 부서를 선택하세요");
|
||||
cmbDept.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
List<string> idlist = new List<string>();
|
||||
idlist.Add(tbID.Text.Trim());
|
||||
@@ -72,8 +87,10 @@ namespace Project.Dialog
|
||||
//foreach(var item in deptlist)
|
||||
// vdeptlist += ";" + item;
|
||||
|
||||
var gCode = this.cmbDept.SelectedValue.ToString();// as dsMSSQL.UserGroupRow;
|
||||
|
||||
Pub.setting.lastid = vuserlist;// tbID.Text.Trim();
|
||||
// Pub.setting.lastdept = vdeptlist;
|
||||
Pub.setting.lastdpt = cmbDept.Text; //부서저장 201006
|
||||
Pub.setting.Save();
|
||||
|
||||
var encpass = Pub.MakePasswordEnc(tbPW.Text.Trim());
|
||||
@@ -95,15 +112,17 @@ namespace Project.Dialog
|
||||
|
||||
//이사용자의 부서 코드확인
|
||||
var userdr = users.Rows[0] as dsMSSQL.UsersRow;
|
||||
//if (userdr.level < 9 && userdr.dept != cmbDept.Text)
|
||||
//{
|
||||
// Util.MsgE("입력한 사용자는 지정한 부서에 접속할 권한이 없습니다");
|
||||
// return;
|
||||
//}
|
||||
var taGrpUser = new dsMSSQLTableAdapters.EETGW_GroupUserTableAdapter();
|
||||
var Exist = taGrpUser.ExistCheck(gCode, userdr.id) > 0;
|
||||
if (userdr.level < 9 && Exist==false)
|
||||
{
|
||||
Util.MsgE("입력한 사용자는 지정한 부서에 접속할 권한이 없습니다");
|
||||
return;
|
||||
}
|
||||
|
||||
FCOMMON.info.Login.no = userdr.id;
|
||||
FCOMMON.info.Login.nameK = userdr.name;
|
||||
FCOMMON.info.Login.dept = userdr.dept;// cmbDept.Text;
|
||||
FCOMMON.info.Login.dept = cmbDept.Text;// userdr.dept;// cmbDept.Text;
|
||||
FCOMMON.info.Login.level = userdr.level;
|
||||
FCOMMON.info.Login.email = userdr.email;
|
||||
FCOMMON.info.Login.nameE = userdr.nameE;
|
||||
@@ -112,7 +131,7 @@ namespace Project.Dialog
|
||||
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 + "'");
|
||||
FCOMMON.info.Login.gcode = gcode;
|
||||
FCOMMON.info.Login.gcode = gCode;// gcode;
|
||||
FCOMMON.info.Login.process = userdr.processs;
|
||||
FCOMMON.info.Login.permission = 0;
|
||||
FCOMMON.info.Login.gpermission = int.Parse(gperm);
|
||||
|
||||
Reference in New Issue
Block a user