This commit is contained in:
chikyun.kim
2019-07-25 08:29:57 +09:00
parent 5c77244a45
commit ae209e00af
85 changed files with 21568 additions and 4313 deletions

View File

@@ -29,28 +29,19 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fLogin));
this.tbID = new System.Windows.Forms.TextBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel();
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.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.tbID = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// tbID
//
this.tbID.Font = new System.Drawing.Font("Calibri", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tbID.Location = new System.Drawing.Point(12, 148);
this.tbID.Name = "tbID";
this.tbID.Size = new System.Drawing.Size(329, 40);
this.tbID.TabIndex = 0;
this.tbID.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
@@ -64,16 +55,38 @@
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(244)))));
this.panel1.Controls.Add(this.tbID);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.tbPW);
this.panel1.Controls.Add(this.pictureBox1);
this.panel1.Controls.Add(this.tbID);
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.TabIndex = 1;
this.panel1.TabIndex = 0;
//
// 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.ForeColor = System.Drawing.Color.Gray;
this.label2.Location = new System.Drawing.Point(12, 200);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(59, 14);
this.label2.TabIndex = 2;
this.label2.Text = "Password";
//
// 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.ForeColor = System.Drawing.Color.Gray;
this.label1.Location = new System.Drawing.Point(12, 131);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(70, 14);
this.label1.TabIndex = 0;
this.label1.Text = "No or Email";
//
// tbPW
//
@@ -82,7 +95,7 @@
this.tbPW.Name = "tbPW";
this.tbPW.PasswordChar = '●';
this.tbPW.Size = new System.Drawing.Size(329, 40);
this.tbPW.TabIndex = 4;
this.tbPW.TabIndex = 3;
this.tbPW.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// panel2
@@ -106,27 +119,14 @@
this.btLogin.UseVisualStyleBackColor = true;
this.btLogin.Click += new System.EventHandler(this.button1_Click);
//
// label1
// tbID
//
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.ForeColor = System.Drawing.Color.Gray;
this.label1.Location = new System.Drawing.Point(12, 131);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(70, 14);
this.label1.TabIndex = 5;
this.label1.Text = "No or Email";
//
// 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.ForeColor = System.Drawing.Color.Gray;
this.label2.Location = new System.Drawing.Point(12, 200);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(59, 14);
this.label2.TabIndex = 5;
this.label2.Text = "Password";
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;
//
// fLogin
//
@@ -153,12 +153,12 @@
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
public System.Windows.Forms.TextBox tbID;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button btLogin;
public System.Windows.Forms.TextBox tbPW;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox tbID;
}
}

View File

@@ -23,7 +23,11 @@ namespace Project.Dialog
}
private void fLogin_Load(object sender, EventArgs e)
{
this.tbID.Text = Pub.setting.lastid;
var list = Pub.setting.lastid.Split(';');
foreach (var item in list)
if (item != "") tbID.Items.Add(item);
if (tbID.Items.Count > 0) tbID.SelectedIndex = 0;
this.Show();
Application.DoEvents();
@@ -44,8 +48,17 @@ namespace Project.Dialog
return;
}
List<string> idlist = new List<string>();
idlist.Add(tbID.Text.Trim());
foreach (var item in this.tbID.Items)
if (idlist.Contains(item) == false) idlist.Add(item.ToString());
//180605
Pub.setting.lastid = tbID.Text.Trim();
var userlist = "";
foreach (var item in idlist)
userlist += ";" + item;
Pub.setting.lastid = userlist;// tbID.Text.Trim();
Pub.setting.Save();
var encpass = Pub.MakePasswordEnc(tbPW.Text.Trim());
@@ -62,6 +75,8 @@ namespace Project.Dialog
}
else
{
//이사용자의 부서 코드확인
var userdr = users.Rows[0] as dsMSSQL.UsersRow;
FCOMMON.info.Login.no = userdr.id;
FCOMMON.info.Login.nameK = userdr.name;
@@ -72,6 +87,11 @@ namespace Project.Dialog
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 + "'");
FCOMMON.info.Login.gcode = gcode;
FCOMMON.info.Login.permission = 0;
FCOMMON.info.Login.gpermission = int.Parse( gperm);
}
DialogResult = DialogResult.OK;
}catch (Exception ex)