pm 용 구매 업데이트 기능 추가
This commit is contained in:
@@ -13,12 +13,13 @@ namespace Project._Common
|
||||
{
|
||||
string p_dept = string.Empty;
|
||||
string p_id = string.Empty;
|
||||
|
||||
public fAddNewUser(string dept, string id)
|
||||
short deflevel = 1;
|
||||
public fAddNewUser(string dept, string id, short _deflevel = 1)
|
||||
{
|
||||
InitializeComponent();
|
||||
p_dept = dept;
|
||||
p_id = id;
|
||||
this.deflevel = _deflevel;
|
||||
|
||||
this.tbDept.Text = dept;
|
||||
this.StartPosition = FormStartPosition.CenterScreen;
|
||||
@@ -74,9 +75,24 @@ namespace Project._Common
|
||||
private void fUserInfo_Load(object sender, EventArgs e)
|
||||
{
|
||||
int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth(FCOMMON.DBM.eAuthType.account));
|
||||
chkExceptHoly.Enabled = curLevel > 4;
|
||||
chkJobReport.Enabled = curLevel > 4;
|
||||
chkUseState.Enabled = curLevel > 4;
|
||||
|
||||
if(this.deflevel < 1)
|
||||
{
|
||||
chkExceptHoly.Visible = false;
|
||||
chkJobReport.Visible = false;
|
||||
chkUseState.Visible = false;
|
||||
|
||||
chkExceptHoly.Checked = false;
|
||||
chkJobReport.Checked = false; ;
|
||||
chkUseState.Checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
chkExceptHoly.Enabled = curLevel > 4;
|
||||
chkJobReport.Enabled = curLevel > 4;
|
||||
chkUseState.Enabled = curLevel > 4;
|
||||
}
|
||||
|
||||
}
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -144,9 +160,15 @@ namespace Project._Common
|
||||
{
|
||||
drGuser.Process = this.tbProcess.Text.Trim();
|
||||
drGuser.state = this.tbState.Text.Trim();
|
||||
drGuser.useJobReport = chkJobReport.Checked;
|
||||
drGuser.useUserState = chkUseState.Checked;
|
||||
drGuser.exceptHoly = chkExceptHoly.Checked;
|
||||
|
||||
if(deflevel > 0)
|
||||
{
|
||||
drGuser.useJobReport = chkJobReport.Checked;
|
||||
drGuser.useUserState = chkUseState.Checked;
|
||||
drGuser.exceptHoly = chkExceptHoly.Checked;
|
||||
}
|
||||
|
||||
FCOMMON.Util.MsgI($"이미 존재하는 사용자 정보입니다\n"+"기존 정보가 업데이트 됩니다");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -161,7 +183,7 @@ namespace Project._Common
|
||||
drGuser.wuid = FCOMMON.info.Login.no;
|
||||
drGuser.wdate = DateTime.Now;
|
||||
drGuser.gcode = gcode;
|
||||
drGuser.level = 1;
|
||||
drGuser.level = this.deflevel;
|
||||
drGuser.uid = this.tbId.Text.Trim();
|
||||
drGuser.state = this.tbState.Text.Trim();
|
||||
drGuser.Process = this.tbProcess.Text.Trim();
|
||||
@@ -182,7 +204,7 @@ namespace Project._Common
|
||||
drUser.wuid = FCOMMON.info.Login.no;
|
||||
drUser.wdate = DateTime.Now;
|
||||
drUser.gcode = gcode;
|
||||
drUser.level = 1;
|
||||
drUser.level = this.deflevel;
|
||||
drUser.id = tbId.Text.Trim();
|
||||
drUser.password = newpassword;// "B6589FC6AB0DC82CF12099D1C2D40AB994E8410C"; //기본값0
|
||||
|
||||
@@ -202,7 +224,7 @@ namespace Project._Common
|
||||
|
||||
else
|
||||
{
|
||||
if(string.IsNullOrEmpty(drUser.password))
|
||||
if(string.IsNullOrEmpty(drUser.password) || newpassword.isEmpty()==false)
|
||||
drUser.password = newpassword;// "B6589FC6AB0DC82CF12099D1C2D40AB994E8410C";
|
||||
|
||||
drUser.name = tbNameK.Text.Trim();
|
||||
@@ -267,7 +289,6 @@ namespace Project._Common
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
newpassword = Pub.MakePasswordEnc(f.newpassword);
|
||||
Util.MsgI($"암호가 변경되었습니다.[저장] 버튼을 누르면 적용 됩니다");
|
||||
}
|
||||
|
||||
28
Project/_Common/fUserList.Designer.cs
generated
28
Project/_Common/fUserList.Designer.cs
generated
@@ -62,7 +62,7 @@
|
||||
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
|
||||
this.tbProcess = new System.Windows.Forms.ToolStripTextBox();
|
||||
this.btRef = new System.Windows.Forms.ToolStripButton();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.tbFind = new System.Windows.Forms.TextBox();
|
||||
this.ta = new Project.dsMSSQLTableAdapters.vGroupUserTableAdapter();
|
||||
this.arDatagridView1 = new arCtl.arDatagridView();
|
||||
this.idDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -168,6 +168,7 @@
|
||||
//
|
||||
this.bindingNavigatorPositionItem.AccessibleName = "위치";
|
||||
this.bindingNavigatorPositionItem.AutoSize = false;
|
||||
this.bindingNavigatorPositionItem.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||
this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
|
||||
this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
|
||||
this.bindingNavigatorPositionItem.Text = "0";
|
||||
@@ -346,6 +347,7 @@
|
||||
// tbProcess
|
||||
//
|
||||
this.tbProcess.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.tbProcess.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||
this.tbProcess.Name = "tbProcess";
|
||||
this.tbProcess.Size = new System.Drawing.Size(100, 25);
|
||||
this.tbProcess.Text = "%";
|
||||
@@ -360,14 +362,15 @@
|
||||
this.btRef.Text = "새로고침(&R)";
|
||||
this.btRef.Click += new System.EventHandler(this.btRef_Click);
|
||||
//
|
||||
// textBox1
|
||||
// tbFind
|
||||
//
|
||||
this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "ads_title", true));
|
||||
this.textBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.textBox1.Location = new System.Drawing.Point(0, 651);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(1234, 21);
|
||||
this.textBox1.TabIndex = 3;
|
||||
this.tbFind.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.tbFind.Font = new System.Drawing.Font("맑은 고딕", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.tbFind.Location = new System.Drawing.Point(0, 629);
|
||||
this.tbFind.Name = "tbFind";
|
||||
this.tbFind.Size = new System.Drawing.Size(1234, 43);
|
||||
this.tbFind.TabIndex = 3;
|
||||
this.tbFind.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// ta
|
||||
//
|
||||
@@ -384,7 +387,8 @@
|
||||
this.arDatagridView1.AllowUserToDeleteRows = false;
|
||||
this.arDatagridView1.AutoGenerateColumns = false;
|
||||
this.arDatagridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.arDatagridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.arDatagridView1.ColumnHeadersHeight = 35;
|
||||
this.arDatagridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
|
||||
this.arDatagridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.idDataGridViewTextBoxColumn,
|
||||
this.nameDataGridViewTextBoxColumn,
|
||||
@@ -408,7 +412,7 @@
|
||||
this.arDatagridView1.ReadOnly = true;
|
||||
this.arDatagridView1.RowTemplate.Height = 23;
|
||||
this.arDatagridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.arDatagridView1.Size = new System.Drawing.Size(1234, 626);
|
||||
this.arDatagridView1.Size = new System.Drawing.Size(1234, 604);
|
||||
this.arDatagridView1.TabIndex = 6;
|
||||
//
|
||||
// idDataGridViewTextBoxColumn
|
||||
@@ -522,7 +526,7 @@
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1234, 711);
|
||||
this.Controls.Add(this.arDatagridView1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.tbFind);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.Controls.Add(this.bn);
|
||||
this.Name = "fUserList";
|
||||
@@ -570,7 +574,7 @@
|
||||
private System.Windows.Forms.ToolStripComboBox cmbdept;
|
||||
private System.Windows.Forms.ToolStripButton btRef;
|
||||
private System.Windows.Forms.ToolStripMenuItem autoResizeColumnToolStripMenuItem;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.TextBox tbFind;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStripLabel toolStripLabel2;
|
||||
private System.Windows.Forms.ToolStripTextBox tbProcess;
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
@@ -16,7 +17,41 @@ namespace Project._Common
|
||||
InitializeComponent();
|
||||
this.dsMSSQL.Users.TableNewRow += Users_TableNewRow;
|
||||
this.FormClosed += __Closed;
|
||||
|
||||
this.KeyDown += (s1, e1) =>
|
||||
{
|
||||
if (e1.KeyCode == Keys.Escape) this.Close();
|
||||
};
|
||||
this.tbFind.KeyDown += (s1, e1) =>
|
||||
{
|
||||
if (e1.KeyCode == Keys.Enter) SearchKey();
|
||||
};
|
||||
}
|
||||
void SearchKey()
|
||||
{
|
||||
var txt = tbFind.Text.Trim();
|
||||
if (txt.isEmpty())
|
||||
{
|
||||
bs.Filter = "";
|
||||
tbFind.BackColor = Color.White;
|
||||
}
|
||||
else
|
||||
{
|
||||
var cols = new string[] { "id", "name", "email", "tel" };
|
||||
var filter = string.Join(" like '%{0}%' or ", cols) + " like '%{0}%'";
|
||||
filter = string.Format(filter, txt);
|
||||
try
|
||||
{
|
||||
bs.Filter = filter;
|
||||
tbFind.BackColor = Color.Lime;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
bs.Filter = "";
|
||||
tbFind.BackColor = Color.Tomato;
|
||||
}
|
||||
}
|
||||
tbFind.Focus();
|
||||
tbFind.SelectAll();
|
||||
}
|
||||
|
||||
void __Closed(object sender, FormClosedEventArgs e)
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77
|
||||
wgAADsIBFShKgAAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77
|
||||
wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0
|
||||
v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg
|
||||
UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA
|
||||
@@ -141,7 +141,7 @@
|
||||
<data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w
|
||||
wgAADsIBFShKgAAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w
|
||||
5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f
|
||||
Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+
|
||||
08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC
|
||||
@@ -150,7 +150,7 @@
|
||||
<data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78
|
||||
wgAADsIBFShKgAAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78
|
||||
n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI
|
||||
N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f
|
||||
oAc0QjgAAAAASUVORK5CYII=
|
||||
@@ -159,7 +159,7 @@
|
||||
<data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+//
|
||||
wgAADsIBFShKgAAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+//
|
||||
h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B
|
||||
twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA
|
||||
kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG
|
||||
@@ -170,7 +170,7 @@
|
||||
<data name="btAdd.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wwAADsMBx2+oZAAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC
|
||||
wgAADsIBFShKgAAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC
|
||||
pBtwfjov3ICDPSKkG3B8kiBQc93/Pw+q/u9oFydswKWZPP/PTuX7fxKo8Ui/0P993SJAzeX//94r+r++
|
||||
Qeb/qhq5/0srFf/PL1X+P6tIFdPAU0B//nlYD9RUC8SV///cKwHivP9/72b+/3sn+f/f23H//92MAOKQ
|
||||
/5NyNDENONQrDHbu3/ulQI0FQI3ZQI2pQI0J///digZqDPv/70bQ/3/X/f53peliGrCzXeL/lmap/+vA
|
||||
@@ -239,6 +239,9 @@
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="dsMSSQL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="cm1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>252, 17</value>
|
||||
</metadata>
|
||||
@@ -263,4 +266,7 @@
|
||||
<metadata name="nameE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="nameE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Reference in New Issue
Block a user