구매 엑셀 업로드 기능 완료 및 메뉴얼 작성

This commit is contained in:
chi
2023-08-02 15:38:02 +09:00
parent d8ddd7cfa7
commit 20e36a3624
16 changed files with 924 additions and 640 deletions

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
// 지정되도록 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("23.07.31.1700")]
[assembly: AssemblyFileVersion("23.07.31.1700")]
[assembly: AssemblyVersion("23.08.02.1530")]
[assembly: AssemblyFileVersion("23.08.02.1530")]

View File

@@ -59,12 +59,12 @@
this.tbNameE = new System.Windows.Forms.TextBox();
this.tbKJPath = new System.Windows.Forms.TextBox();
this.tbProcess = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.tbState = new System.Windows.Forms.TextBox();
this.chkJobReport = new System.Windows.Forms.CheckBox();
this.chkUseState = new System.Windows.Forms.CheckBox();
this.chkExceptHoly = new System.Windows.Forms.CheckBox();
this.btChangePW = new System.Windows.Forms.Button();
idLabel = new System.Windows.Forms.Label();
passwordLabel = new System.Windows.Forms.Label();
nameLabel = new System.Windows.Forms.Label();
@@ -337,16 +337,6 @@
this.tbProcess.Size = new System.Drawing.Size(189, 29);
this.tbProcess.TabIndex = 30;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(105, 45);
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.Size = new System.Drawing.Size(200, 29);
this.textBox1.TabIndex = 31;
this.textBox1.Text = "기본값 0";
this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// button1
//
this.button1.Font = new System.Drawing.Font("맑은 고딕", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
@@ -386,27 +376,38 @@
this.chkUseState.Text = "계정사용";
this.chkUseState.UseVisualStyleBackColor = true;
//
// checkBox1
// chkExceptHoly
//
this.chkExceptHoly.AutoSize = true;
this.chkExceptHoly.Location = new System.Drawing.Point(311, 260);
this.chkExceptHoly.Name = "checkBox1";
this.chkExceptHoly.Name = "chkExceptHoly";
this.chkExceptHoly.Size = new System.Drawing.Size(93, 25);
this.chkExceptHoly.TabIndex = 38;
this.chkExceptHoly.Text = "휴가제외";
this.chkExceptHoly.UseVisualStyleBackColor = true;
//
// btChangePW
//
this.btChangePW.Font = new System.Drawing.Font("맑은 고딕", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.btChangePW.Location = new System.Drawing.Point(105, 46);
this.btChangePW.Name = "btChangePW";
this.btChangePW.Size = new System.Drawing.Size(200, 29);
this.btChangePW.TabIndex = 39;
this.btChangePW.Text = "기본값 \"0\"";
this.btChangePW.UseVisualStyleBackColor = true;
this.btChangePW.Click += new System.EventHandler(this.btChangePW_Click);
//
// fAddNewUser
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(601, 355);
this.Controls.Add(this.btChangePW);
this.Controls.Add(this.chkExceptHoly);
this.Controls.Add(this.chkUseState);
this.Controls.Add(this.chkJobReport);
this.Controls.Add(label6);
this.Controls.Add(this.tbState);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.Controls.Add(label5);
this.Controls.Add(this.tbProcess);
this.Controls.Add(label4);
@@ -464,11 +465,11 @@
private System.Windows.Forms.TextBox tbNameE;
private System.Windows.Forms.TextBox tbKJPath;
private System.Windows.Forms.TextBox tbProcess;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox tbState;
private System.Windows.Forms.CheckBox chkJobReport;
private System.Windows.Forms.CheckBox chkUseState;
private System.Windows.Forms.CheckBox chkExceptHoly;
private System.Windows.Forms.Button btChangePW;
}
}

View File

@@ -29,7 +29,7 @@ namespace Project._Common
{
tbId.Enabled = false;
button1.Enabled = false;
textBox1.Enabled = false;
btChangePW.Enabled = true;
var db = new EEEntitiesMain();
@@ -62,7 +62,11 @@ namespace Project._Common
this.Text = "사용자 정보 변경";
}
else this.Text = "사용자 정보 추가";
else
{
this.Text = "사용자 정보 추가";
btChangePW.Enabled = false;
}
}
@@ -180,7 +184,7 @@ namespace Project._Common
drUser.gcode = gcode;
drUser.level = 1;
drUser.id = tbId.Text.Trim();
drUser.password = "B6589FC6AB0DC82CF12099D1C2D40AB994E8410C"; //기본값0
drUser.password = newpassword;// "B6589FC6AB0DC82CF12099D1C2D40AB994E8410C"; //기본값0
drUser.name = tbNameK.Text.Trim();
drUser.nameE = tbNameE.Text.Trim();
@@ -198,7 +202,9 @@ namespace Project._Common
else
{
if (drUser.password.isEmpty()) drUser.password = "B6589FC6AB0DC82CF12099D1C2D40AB994E8410C";
if(string.IsNullOrEmpty(drUser.password))
drUser.password = newpassword;// "B6589FC6AB0DC82CF12099D1C2D40AB994E8410C";
drUser.name = tbNameK.Text.Trim();
drUser.nameE = tbNameE.Text.Trim();
drUser.dept = this.tbDept.Text.Trim();
@@ -220,7 +226,7 @@ namespace Project._Common
}
catch (Exception ex)
{
FCOMMON.Util.MsgE("save error\n"+ex.Message);
FCOMMON.Util.MsgE("save error\n" + ex.Message);
}
@@ -234,5 +240,37 @@ namespace Project._Common
private void chkJobReport_CheckedChanged(object sender, EventArgs e)
{
}
string newpassword = "B6589FC6AB0DC82CF12099D1C2D40AB994E8410C"; //기본값 0
private void btChangePW_Click(object sender, EventArgs e)
{
var f = new fNewPassword(this.tbId.Text);
if (f.ShowDialog() == DialogResult.OK)
{
var opass = Pub.MakePasswordEnc( f.tbPassO.Text);
//해당 그룹에 해당 사용자가 존재하는지 확이한다.
var gcode = FCOMMON.info.Login.gcode;
var uid = tbId.Text;
var db = new EEEntitiesMain();
var drUser = db.Users.SingleOrDefault(t => t.id == uid);
if (drUser != null)
{
if (opass.Equals(drUser.password)==false)
{
Util.MsgE("기존 암호가 일치하지 않습니다");
return;
}
}
else {
Util.MsgE("사용자 정보가 없어 처리할 수 없습니다");
return;
}
newpassword = Pub.MakePasswordEnc(f.newpassword);
Util.MsgI($"암호가 변경되었습니다.[저장] 버튼을 누르면 적용 됩니다");
}
}
}
}

View File

@@ -11,6 +11,7 @@ namespace Project._Common
{
public partial class fNewPassword : Form
{
public string newpassword { get; set; }
public fNewPassword(string userid)
{
InitializeComponent();
@@ -19,7 +20,7 @@ namespace Project._Common
private void fNewPassword_Load(object sender, EventArgs e)
{
newpassword = string.Empty;
}
private void button1_Click(object sender, EventArgs e)
@@ -49,6 +50,7 @@ namespace Project._Common
tbPass2.SelectAll();
return;
}
newpassword = tbPass1.Text.Trim();
DialogResult = System.Windows.Forms.DialogResult.OK;
}
}