From 91c2ddc961b79dc87b472d652c8469b184a8f4b1 Mon Sep 17 00:00:00 2001 From: chi Date: Mon, 11 May 2020 13:00:44 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=ED=8A=B8=EB=A6=AC=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EA=B8=88=EC=95=A1=EC=B9=B8=209=EB=B0=B1=EC=97=90=EC=84=9C?= =?UTF-8?q?=209=EC=A1=B0=EB=A1=9C=20=EC=88=98=EC=A0=95=20=ED=95=A8=20(?= =?UTF-8?q?=EB=B6=99=EC=97=AC=EB=84=A3=EA=B8=B0=20=EA=B0=92=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=9E=88=EC=97=88=EC=9D=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project/Dialog/fLogin.Designer.cs | 68 +-- Project/Dialog/fLogin.cs | 54 +- Project/Properties/AssemblyInfo.cs | 4 +- Project/_Common/fADSUserList.cs | 523 +++++++++--------- Project/dsMSSQL.Designer.cs | 150 +++-- Project/dsMSSQL.xsd | 25 +- Project/dsMSSQL.xss | 4 +- .../Purchase/fPurchase_AddS.Designer.cs | 33 +- SubProject/FEQ0000/Purchase/fPurchase_AddS.cs | 24 +- .../FEQ0000/Purchase/fPurchase_AddS.resx | 6 + SubProject/FPJ0000/JobReport/fJobReport.cs | 2 +- .../FPJ0000/Project/fPartList.Designer.cs | 8 + SubProject/FPJ0000/Project/fPartList.cs | 16 +- SubProject/FPJ0000/Project/fPartList.resx | 107 ++-- SubProject/FPJ0000/dsReport.Designer.cs | 128 ++++- SubProject/FPJ0000/dsReport.xsd | 36 +- SubProject/FPJ0000/dsReport.xss | 2 +- 17 files changed, 720 insertions(+), 470 deletions(-) diff --git a/Project/Dialog/fLogin.Designer.cs b/Project/Dialog/fLogin.Designer.cs index 347c660..b49e109 100644 --- a/Project/Dialog/fLogin.Designer.cs +++ b/Project/Dialog/fLogin.Designer.cs @@ -31,15 +31,13 @@ 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.linkLabel1 = new System.Windows.Forms.LinkLabel(); - this.cmbDept = new System.Windows.Forms.ComboBox(); + this.linkLabel2 = new System.Windows.Forms.LinkLabel(); 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.linkLabel2 = new System.Windows.Forms.LinkLabel(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); @@ -59,8 +57,6 @@ // this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(244))))); this.panel1.Controls.Add(this.linkLabel2); - this.panel1.Controls.Add(this.linkLabel1); - this.panel1.Controls.Add(this.cmbDept); this.panel1.Controls.Add(this.tbID); this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.label1); @@ -69,36 +65,28 @@ 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, 366); + this.panel1.Size = new System.Drawing.Size(488, 276); this.panel1.TabIndex = 0; // - // linkLabel1 + // linkLabel2 // - 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.TabStop = true; - this.linkLabel1.Text = "부서"; - this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); - // - // 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; + this.linkLabel2.AutoSize = true; + 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.Name = "linkLabel2"; + this.linkLabel2.Size = new System.Drawing.Size(243, 15); + this.linkLabel2.TabIndex = 7; + this.linkLabel2.TabStop = true; + this.linkLabel2.Text = "문의 ) Chickyun.kim@amkor.co.kr, T.8567"; + this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); // // 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.Location = new System.Drawing.Point(16, 125); this.tbID.Name = "tbID"; this.tbID.Size = new System.Drawing.Size(460, 41); this.tbID.TabIndex = 3; @@ -108,7 +96,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(12, 272); + this.label2.Location = new System.Drawing.Point(13, 181); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(31, 15); this.label2.TabIndex = 4; @@ -119,7 +107,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(12, 200); + this.label1.Location = new System.Drawing.Point(13, 108); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(55, 15); this.label1.TabIndex = 2; @@ -128,7 +116,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(15, 291); + this.tbPW.Location = new System.Drawing.Point(16, 199); this.tbPW.Name = "tbPW"; this.tbPW.PasswordChar = '●'; this.tbPW.Size = new System.Drawing.Size(460, 40); @@ -140,7 +128,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, 366); + this.panel2.Location = new System.Drawing.Point(0, 276); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(488, 34); this.panel2.TabIndex = 6; @@ -156,25 +144,11 @@ this.btLogin.UseVisualStyleBackColor = true; this.btLogin.Click += new System.EventHandler(this.button1_Click); // - // linkLabel2 - // - this.linkLabel2.AutoSize = true; - 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(12, 339); - this.linkLabel2.Name = "linkLabel2"; - this.linkLabel2.Size = new System.Drawing.Size(243, 15); - this.linkLabel2.TabIndex = 7; - this.linkLabel2.TabStop = true; - this.linkLabel2.Text = "문의 ) Chickyun.kim@amkor.co.kr, T.8567"; - this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); - // // fLogin // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.OrangeRed; - this.ClientSize = new System.Drawing.Size(488, 400); + this.ClientSize = new System.Drawing.Size(488, 310); 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))); @@ -202,8 +176,6 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.ComboBox tbID; - private System.Windows.Forms.ComboBox cmbDept; - private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.LinkLabel linkLabel2; } } \ No newline at end of file diff --git a/Project/Dialog/fLogin.cs b/Project/Dialog/fLogin.cs index 6950924..9f8a5e0 100644 --- a/Project/Dialog/fLogin.cs +++ b/Project/Dialog/fLogin.cs @@ -28,10 +28,10 @@ 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; + //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(); @@ -58,22 +58,22 @@ namespace Project.Dialog foreach (var item in this.tbID.Items) if (idlist.Contains(item) == false) idlist.Add(item.ToString()); - List deptlist = new List(); - deptlist.Add(cmbDept.Text.Trim()); - foreach (var item in this.cmbDept.Items) - if (deptlist.Contains(item) == false) deptlist.Add(item.ToString()); + //List deptlist = new List(); + //deptlist.Add(cmbDept.Text.Trim()); + //foreach (var item in this.cmbDept.Items) + // if (deptlist.Contains(item) == false) deptlist.Add(item.ToString()); //180605 var vuserlist = ""; foreach (var item in idlist) vuserlist += ";" + item; - var vdeptlist = ""; - foreach(var item in deptlist) - vdeptlist += ";" + item; + //var vdeptlist = ""; + //foreach(var item in deptlist) + // vdeptlist += ";" + item; Pub.setting.lastid = vuserlist;// tbID.Text.Trim(); - Pub.setting.lastdept = vdeptlist; + // Pub.setting.lastdept = vdeptlist; Pub.setting.Save(); var encpass = Pub.MakePasswordEnc(tbPW.Text.Trim()); @@ -95,23 +95,23 @@ namespace Project.Dialog //이사용자의 부서 코드확인 var userdr = users.Rows[0] as dsMSSQL.UsersRow; - if (userdr.level < 9 && userdr.dept != cmbDept.Text) - { - Util.MsgE("입력한 사용자는 지정한 부서에 접속할 권한이 없습니다"); - return; - } + //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 = cmbDept.Text; + FCOMMON.info.Login.dept = userdr.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 ='" + cmbDept.Text + "'"); - var gperm = FCOMMON.DBM.ExecuteScalar("select isnull(permission,0) from UserGroup where dept ='" + cmbDept.Text + "'"); + 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.process = userdr.processs; FCOMMON.info.Login.permission = 0; @@ -133,13 +133,13 @@ namespace Project.Dialog 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; - } + //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; + //} } private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) diff --git a/Project/Properties/AssemblyInfo.cs b/Project/Properties/AssemblyInfo.cs index cbb8fc2..df5f2c0 100644 --- a/Project/Properties/AssemblyInfo.cs +++ b/Project/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 // 지정되도록 할 수 있습니다. // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("20.05.07.1700")] -[assembly: AssemblyFileVersion("20.05.07.1700")] +[assembly: AssemblyVersion("20.05.11.1300")] +[assembly: AssemblyFileVersion("20.05.11.1300")] diff --git a/Project/_Common/fADSUserList.cs b/Project/_Common/fADSUserList.cs index 7497596..908f509 100644 --- a/Project/_Common/fADSUserList.cs +++ b/Project/_Common/fADSUserList.cs @@ -1,257 +1,266 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -using System.DirectoryServices; - -namespace Project._Common -{ - - public partial class fADSUserList : FCOMMON.fBase - { - public fADSUserList() - { - InitializeComponent(); - } - - private void fADSUserList_Load(object sender, EventArgs e) - { - this.lbDomain.Text = this.DomainName(); - this.btInsert.Visible = (FCOMMON.info.Login.level > 9); - this.tbEntry.Text = "LDAP://OU=Office,OU=Users,OU=People,OU=K4,DC=kr,DC=ds,DC=amkor,DC=com"; - this.tbEntry.Enabled = this.btInsert.Visible; - } - public string DomainName() - { - var objRootDSE = new DirectoryEntry("LDAP://RootDSE"); - return objRootDSE.Properties["defaultNamingContext"][0].ToString(); - } - - private void toolStripButton1_Click(object sender, EventArgs e) - { - this.listView1.Items.Clear(); - this.listView1.Columns.Clear(); - this.listView1.CheckBoxes = true; - this.listView1.Columns.Add("sn"); - this.listView1.Columns.Add("cn"); - this.listView1.Columns.Add("disp"); - this.listView1.Columns.Add("dept"); - this.listView1.Columns.Add("title"); - this.listView1.Columns.Add("tel"); - this.listView1.Columns.Add("mail"); - this.listView1.Columns.Add("pager"); - this.listView1.Columns.Add("empno"); - this.listView1.Columns.Add("when"); - this.listView1.Visible = false; - - this.listView1.View = View.Details; - - string[] propliest = new string[] { "whenCreated", "telephonenumber", "title", "employeeNumber", "department", "displayName", "mail", "pager", "sn", "cn" }; - - Boolean skipuser = false; - string dept = string.Empty; - string whencre = string.Empty; - string empno = string.Empty; - string disp = string.Empty; - string cn = string.Empty; - string sn = string.Empty; - string mail = string.Empty; - string title = string.Empty; - string pager = string.Empty; - string tel = string.Empty; - - var deParent = new DirectoryEntry(tbEntry.Text); - - string Nodename = ""; - try - { - Nodename = deParent.SchemaClassName; - } catch (Exception ex) - { - Util.MsgE(ex.Message + "\n" + tbEntry.Text); - Nodename = string.Empty; - } - if (Nodename != "") - { - if (deParent.Name.StartsWith("CN")) - { - //특정사용자 조회 - - foreach (string listIter in propliest) - { - foreach (object Iter in deParent.Properties[listIter.ToString()]) - { - string strvalue = Iter.ToString(); - switch (listIter.ToString().ToLower()) - { - case "department": - dept = strvalue; - // var search = toolStripTextBox1.Text.Trim(); - // if (search != "") if (dept.IndexOf(search) == -1) skipuser = true; - break; - case "whencreated": whencre = strvalue; break; - case "title": title = strvalue; break; - case "telephonenumber": tel = strvalue; break; - case "employeenumber": empno = strvalue; break; - case "displayname": disp = strvalue; break; - case "mail": mail = strvalue; break; - case "pager": pager = strvalue; break; - case "sn": sn = strvalue; break; - case "cn": cn = strvalue; break; - } - // if (skipuser) break; - } - // if (skipuser) break; - } - - - var lv = this.listView1.Items.Add(sn); - lv.Checked = true; - lv.SubItems.Add(cn); - lv.SubItems.Add(disp); - lv.SubItems.Add(dept); - lv.SubItems.Add(title); - lv.SubItems.Add(tel); - lv.SubItems.Add(mail); - lv.SubItems.Add(pager); - lv.SubItems.Add(empno); - lv.SubItems.Add(whencre); - - - } - else - { - foreach (DirectoryEntry deChild in deParent.Children) - { - skipuser = false; - dept = string.Empty; - whencre = string.Empty; - empno = string.Empty; - disp = string.Empty; - cn = string.Empty; - sn = string.Empty; - mail = string.Empty; - title = string.Empty; - pager = string.Empty; - tel = string.Empty; - - foreach (string listIter in propliest) - { - foreach (object Iter in deChild.Properties[listIter.ToString()]) - { - string strvalue = Iter.ToString(); - switch (listIter.ToString().ToLower()) - { - case "department": - dept = strvalue; - var search = toolStripTextBox1.Text.Trim(); - if (search != "") if (dept.IndexOf(search) == -1) skipuser = true; - break; - case "whencreated": whencre = strvalue; break; - case "title": title = strvalue; break; - case "telephonenumber": tel = strvalue; break; - case "employeenumber": empno = strvalue; break; - case "displayname": disp = strvalue; break; - case "mail": mail = strvalue; break; - case "pager": pager = strvalue; break; - case "sn": sn = strvalue; break; - case "cn": cn = strvalue; break; - } - if (skipuser) break; - } - if (skipuser) break; - } - - if (sn == "" || pager == "" || sn.ToUpper().StartsWith("k4") || sn.ToUpper().StartsWith("test")) skipuser = true; - if (skipuser) continue; - var lv = this.listView1.Items.Add(sn); - lv.Checked = true; - lv.SubItems.Add(cn); - lv.SubItems.Add(disp); - lv.SubItems.Add(dept); - lv.SubItems.Add(title); - lv.SubItems.Add(tel); - lv.SubItems.Add(mail); - lv.SubItems.Add(pager); - lv.SubItems.Add(empno); - lv.SubItems.Add(whencre); - - - if (listView1.Items.Count > 500) break; - } - } - } - - - FCOMMON.Util.MsgI("exit"); - this.listView1.Visible = true; - } - - private void btInsert_Click(object sender, EventArgs e) - { - System.Text.StringBuilder sb = new StringBuilder(); - var items = this.listView1.CheckedItems; - sb.AppendLine("현재 목록의 선택된 자료를 입력하시겠습니까?"); - sb.AppendLine("건수 : " + items.Count.ToString()); - var dlg = FCOMMON.Util.MsgQ(sb.ToString()); - if (dlg != System.Windows.Forms.DialogResult.Yes) return; - - this.prb1.Maximum = items.Count; - this.prb1.Value = 0; - foreach(ListViewItem item in items) - { - - string sn = item.SubItems[0].Text; - string cn = item.SubItems[1].Text; - string disp = item.SubItems[2].Text;// lv.SubItems.Add(disp); - string dept = item.SubItems[3].Text; // lv.SubItems.Add(dept); - string title = item.SubItems[4].Text;// lv.SubItems.Add(title); - string tel = item.SubItems[5].Text; // lv.SubItems.Add(tel); - string mail = item.SubItems[6].Text; // lv.SubItems.Add(mail); - string pager = item.SubItems[7].Text; // lv.SubItems.Add(pager); - string empno = item.SubItems[8].Text; // lv.SubItems.Add(empno); - string whencre = item.SubItems[9].Text; // lv.SubItems.Add(whencre); - - try - { - taUser.InsertADSInfo( - pager, disp, sn, dept, - mail, tel, empno,title, - whencre, - "Auto Gen", FCOMMON.info.Login.no, DateTime.Now ); - } - catch (Exception eX) - { - Console.WriteLine(sn + eX.Message); - } - - this.prb1.Value += 1; - } - - } - - private void allSelectToolStripMenuItem_Click(object sender, EventArgs e) - { - foreach (ListViewItem item in this.listView1.Items) - item.Checked = true; - } - - private void deSelectToolStripMenuItem_Click(object sender, EventArgs e) - { - foreach (ListViewItem item in this.listView1.Items) - item.Checked = !item.Checked; - } - - private void unSelectToolStripMenuItem_Click(object sender, EventArgs e) - { - foreach (ListViewItem item in this.listView1.Items) - item.Checked = false; - } - } -} +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +using System.DirectoryServices; + +namespace Project._Common +{ + + public partial class fADSUserList : FCOMMON.fBase + { + public fADSUserList() + { + InitializeComponent(); + } + + private void fADSUserList_Load(object sender, EventArgs e) + { + this.lbDomain.Text = this.DomainName(); + this.btInsert.Visible = (FCOMMON.info.Login.level > 9); + this.tbEntry.Text = "LDAP://OU=Office,OU=Users,OU=People,OU=K4,DC=kr,DC=ds,DC=amkor,DC=com"; + this.tbEntry.Enabled = this.btInsert.Visible; + } + public string DomainName() + { + var objRootDSE = new DirectoryEntry("LDAP://RootDSE"); + return objRootDSE.Properties["defaultNamingContext"][0].ToString(); + } + + private void toolStripButton1_Click(object sender, EventArgs e) + { + this.listView1.Items.Clear(); + this.listView1.Columns.Clear(); + this.listView1.CheckBoxes = true; + this.listView1.Columns.Add("sn"); + this.listView1.Columns.Add("cn"); + this.listView1.Columns.Add("disp"); + this.listView1.Columns.Add("dept"); + this.listView1.Columns.Add("title"); + this.listView1.Columns.Add("tel"); + this.listView1.Columns.Add("mail"); + this.listView1.Columns.Add("pager"); + this.listView1.Columns.Add("empno"); + this.listView1.Columns.Add("when"); + this.listView1.Visible = false; + + this.listView1.View = View.Details; + + string[] propliest = new string[] { "whenCreated", "telephonenumber", "title", "employeeNumber", "department", "displayName", "mail", "pager", "sn", "cn" }; + + Boolean skipuser = false; + string dept = string.Empty; + string whencre = string.Empty; + string empno = string.Empty; + string disp = string.Empty; + string cn = string.Empty; + string sn = string.Empty; + string mail = string.Empty; + string title = string.Empty; + string pager = string.Empty; + string tel = string.Empty; + + var deParent = new DirectoryEntry(tbEntry.Text); + + string Nodename = ""; + try + { + Nodename = deParent.SchemaClassName; + } catch (Exception ex) + { + Util.MsgE(ex.Message + "\n" + tbEntry.Text); + Nodename = string.Empty; + } + if (Nodename != "") + { + if (deParent.Name.StartsWith("CN")) + { + //특정사용자 조회 + + foreach (string listIter in propliest) + { + foreach (object Iter in deParent.Properties[listIter.ToString()]) + { + string strvalue = Iter.ToString(); + switch (listIter.ToString().ToLower()) + { + case "department": + dept = strvalue; + // var search = toolStripTextBox1.Text.Trim(); + // if (search != "") if (dept.IndexOf(search) == -1) skipuser = true; + break; + case "whencreated": whencre = strvalue; break; + case "title": title = strvalue; break; + case "telephonenumber": tel = strvalue; break; + case "employeenumber": empno = strvalue; break; + case "displayname": disp = strvalue; break; + case "mail": mail = strvalue; break; + case "pager": pager = strvalue; break; + case "sn": sn = strvalue; break; + case "cn": cn = strvalue; break; + } + // if (skipuser) break; + } + // if (skipuser) break; + } + + + var lv = this.listView1.Items.Add(sn); + lv.Checked = true; + lv.SubItems.Add(cn); + lv.SubItems.Add(disp); + lv.SubItems.Add(dept); + lv.SubItems.Add(title); + lv.SubItems.Add(tel); + lv.SubItems.Add(mail); + lv.SubItems.Add(pager); + lv.SubItems.Add(empno); + lv.SubItems.Add(whencre); + + + } + else + { + foreach (DirectoryEntry deChild in deParent.Children) + { + skipuser = false; + dept = string.Empty; + whencre = string.Empty; + empno = string.Empty; + disp = string.Empty; + cn = string.Empty; + sn = string.Empty; + mail = string.Empty; + title = string.Empty; + pager = string.Empty; + tel = string.Empty; + + foreach (string listIter in propliest) + { + foreach (object Iter in deChild.Properties[listIter.ToString()]) + { + string strvalue = Iter.ToString(); + switch (listIter.ToString().ToLower()) + { + case "department": + dept = strvalue; + var search = toolStripTextBox1.Text.Trim(); + if (search != "") if (dept.IndexOf(search) == -1) skipuser = true; + break; + case "whencreated": whencre = strvalue; break; + case "title": title = strvalue; break; + case "telephonenumber": tel = strvalue; break; + case "employeenumber": empno = strvalue; break; + case "displayname": disp = strvalue; break; + case "mail": mail = strvalue; break; + case "pager": pager = strvalue; break; + case "sn": sn = strvalue; break; + case "cn": cn = strvalue; break; + } + if (skipuser) break; + } + if (skipuser) break; + } + + if (sn == "" || pager == "" || sn.ToUpper().StartsWith("k4") || sn.ToUpper().StartsWith("test")) skipuser = true; + if (skipuser) continue; + var lv = this.listView1.Items.Add(sn); + lv.Checked = true; + lv.SubItems.Add(cn); + lv.SubItems.Add(disp); + lv.SubItems.Add(dept); + lv.SubItems.Add(title); + lv.SubItems.Add(tel); + lv.SubItems.Add(mail); + lv.SubItems.Add(pager); + lv.SubItems.Add(empno); + lv.SubItems.Add(whencre); + + + if (listView1.Items.Count > 500) break; + } + } + } + + + FCOMMON.Util.MsgI("exit"); + this.listView1.Visible = true; + } + + private void btInsert_Click(object sender, EventArgs e) + { + System.Text.StringBuilder sb = new StringBuilder(); + var items = this.listView1.CheckedItems; + sb.AppendLine("현재 목록의 선택된 자료를 입력하시겠습니까?"); + sb.AppendLine("건수 : " + items.Count.ToString()); + var dlg = FCOMMON.Util.MsgQ(sb.ToString()); + if (dlg != System.Windows.Forms.DialogResult.Yes) return; + + this.prb1.Maximum = items.Count; + this.prb1.Value = 0; + foreach(ListViewItem item in items) + { + + string sn = item.SubItems[0].Text; + string cn = item.SubItems[1].Text; + string disp = item.SubItems[2].Text;// lv.SubItems.Add(disp); + string dept = item.SubItems[3].Text; // lv.SubItems.Add(dept); + string title = item.SubItems[4].Text;// lv.SubItems.Add(title); + string tel = item.SubItems[5].Text; // lv.SubItems.Add(tel); + string mail = item.SubItems[6].Text; // lv.SubItems.Add(mail); + string pager = item.SubItems[7].Text; // lv.SubItems.Add(pager); + string empno = item.SubItems[8].Text; // lv.SubItems.Add(empno); + string whencre = item.SubItems[9].Text; // lv.SubItems.Add(whencre); + + try + { + //이 대상의 id가 잇는지 체크한다. + if(taUser.ExistID(pager) > 0) + { + taUser.UpdateDept(dept, pager); + } + else + { + taUser.InsertADSInfo( + pager, disp, sn, dept, + mail, tel, empno, title, + whencre, + "Auto Gen", FCOMMON.info.Login.no, DateTime.Now); + } + + } + catch (Exception eX) + { + Console.WriteLine(sn + eX.Message); + } + + this.prb1.Value += 1; + } + + } + + private void allSelectToolStripMenuItem_Click(object sender, EventArgs e) + { + foreach (ListViewItem item in this.listView1.Items) + item.Checked = true; + } + + private void deSelectToolStripMenuItem_Click(object sender, EventArgs e) + { + foreach (ListViewItem item in this.listView1.Items) + item.Checked = !item.Checked; + } + + private void unSelectToolStripMenuItem_Click(object sender, EventArgs e) + { + foreach (ListViewItem item in this.listView1.Items) + item.Checked = false; + } + } +} diff --git a/Project/dsMSSQL.Designer.cs b/Project/dsMSSQL.Designer.cs index 6ecaf6d..10e9b00 100644 --- a/Project/dsMSSQL.Designer.cs +++ b/Project/dsMSSQL.Designer.cs @@ -6440,7 +6440,7 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = @"SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, tel, hp, place, ads_employNo, ads_title, ads_created, memo, wuid, wdate, processs, gcode @@ -6452,48 +6452,59 @@ ORDER BY name"; this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@process", global::System.Data.SqlDbType.NVarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te" + - "l, hp, place, ads_employNo, ads_title, ads_created, memo, wuid, wdate, processs," + - " gcode\r\nFROM Users\r\nWHERE (name = @username) AND (password = @encpw)"; + this._commandCollection[1].CommandText = "SELECT COUNT(*) FROM Users where id = @userid"; this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@username", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@encpw", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "password", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@userid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; this._commandCollection[2].CommandText = "SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te" + "l, hp, place, ads_employNo, ads_title, ads_created, memo, wuid, wdate, processs," + - " gcode\r\nFROM Users\r\nWHERE (id = @id)\r\nORDER BY name"; + " gcode\r\nFROM Users\r\nWHERE (name = @username) AND (password = @encpw)"; this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@username", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@encpw", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "password", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = @"SELECT ads_created, ads_employNo, ads_title, dept, email, grade, hp, id, indate, level, memo, name, nameE, outdate, password, place, tel, wdate, wuid, processs, gcode + this._commandCollection[3].CommandText = "SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te" + + "l, hp, place, ads_employNo, ads_title, ads_created, memo, wuid, wdate, processs," + + " gcode\r\nFROM Users\r\nWHERE (id = @id)\r\nORDER BY name"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = @"SELECT ads_created, ads_employNo, ads_title, dept, email, grade, hp, id, indate, level, memo, name, nameE, outdate, password, place, tel, wdate, wuid, processs, gcode FROM Users WHERE (password = @encpw) AND (level > 0) AND (email = @idkey) OR (password = @encpw) AND (level > 0) AND (id = @idkey) OR (password = @encpw) AND (level > 0) AND (email = { fn CONCAT(@idkey, '@amkor.co.kr') })"; - this._commandCollection[3].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@encpw", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "password", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idkey", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "email", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); - this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = @"INSERT INTO Users + this._commandCollection[4].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@encpw", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "password", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idkey", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "email", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[5].Connection = this.Connection; + this._commandCollection[5].CommandText = @"INSERT INTO Users (id, password, nameE, name, dept, email, level, tel, ads_employNo, ads_title, ads_created, memo, wuid, wdate) VALUES (@id, 'B6589FC6AB0DC82CF12099D1C2D40AB994E8410C',@nameE,@name,@dept,@email, 0,@tel,@ads_employNo,@ads_title,@ads_created,@memo,@wuid,@wdate); SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, tel, hp, place, ads_employNo, ads_title, ads_created, memo, wuid, wdate FROM Users WHERE (id = @id) ORDER BY name"; - this._commandCollection[4].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nameE", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "nameE", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dept", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "dept", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@email", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "email", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@tel", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "tel", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ads_employNo", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "ads_employNo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ads_title", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "ads_title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ads_created", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "ads_created", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@memo", global::System.Data.SqlDbType.NVarChar, 255, global::System.Data.ParameterDirection.Input, 0, 0, "memo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@wuid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "wuid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@wdate", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 0, 0, "wdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nameE", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "nameE", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dept", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "dept", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@email", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "email", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@tel", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "tel", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ads_employNo", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "ads_employNo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ads_title", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "ads_title", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ads_created", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "ads_created", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@memo", global::System.Data.SqlDbType.NVarChar, 255, global::System.Data.ParameterDirection.Input, 0, 0, "memo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@wuid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "wuid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@wdate", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 0, 0, "wdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[6].Connection = this.Connection; + this._commandCollection[6].CommandText = "UPDATE Users\r\nSET dept = @dept\r\nWHERE (id = @Original_id); "; + this._commandCollection[6].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dept", global::System.Data.SqlDbType.VarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "dept", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -6549,7 +6560,7 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] public virtual int FillByNamePw(dsMSSQL.UsersDataTable dataTable, string username, string encpw) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((username == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -6574,7 +6585,7 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsMSSQL.UsersDataTable GetByNamePw(string username, string encpw) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((username == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -6597,7 +6608,7 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] public virtual int FillID(dsMSSQL.UsersDataTable dataTable, string id) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((id == null)) { throw new global::System.ArgumentNullException("id"); } @@ -6616,7 +6627,7 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsMSSQL.UsersDataTable GetID(string id) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((id == null)) { throw new global::System.ArgumentNullException("id"); } @@ -6633,7 +6644,7 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] public virtual int FillIDPW(dsMSSQL.UsersDataTable dataTable, string encpw, string idkey) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((encpw == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -6658,7 +6669,7 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsMSSQL.UsersDataTable GetIDPW(string encpw, string idkey) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((encpw == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -7248,12 +7259,46 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te return this.Update(Original_id, password, nameE, name, dept, grade, email, level, indate, outdate, tel, hp, place, ads_employNo, ads_title, ads_created, memo, wuid, wdate, process, gcode, Original_id); } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual global::System.Nullable ExistID(string userid) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((userid == null)) { + throw new global::System.ArgumentNullException("userid"); + } + else { + command.Parameters[0].Value = ((string)(userid)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + object returnValue; + try { + returnValue = command.ExecuteScalar(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + if (((returnValue == null) + || (returnValue.GetType() == typeof(global::System.DBNull)))) { + return new global::System.Nullable(); + } + else { + return new global::System.Nullable(((int)(returnValue))); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, false)] public virtual int InsertADSInfo(string id, string nameE, string name, string dept, string email, string tel, string ads_employNo, string ads_title, string ads_created, string memo, string wuid, System.DateTime wdate) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; if ((id == null)) { throw new global::System.ArgumentNullException("id"); } @@ -7337,6 +7382,41 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te } return returnValue; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, false)] + public virtual int UpdateDept(string dept, string Original_id) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; + if ((dept == null)) { + command.Parameters[0].Value = global::System.DBNull.Value; + } + else { + command.Parameters[0].Value = ((string)(dept)); + } + if ((Original_id == null)) { + throw new global::System.ArgumentNullException("Original_id"); + } + else { + command.Parameters[1].Value = ((string)(Original_id)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } } /// diff --git a/Project/dsMSSQL.xsd b/Project/dsMSSQL.xsd index a0d3eb3..9128eaf 100644 --- a/Project/dsMSSQL.xsd +++ b/Project/dsMSSQL.xsd @@ -155,6 +155,16 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te + + + + SELECT COUNT(*) FROM Users where id = @userid + + + + + + @@ -196,7 +206,7 @@ WHERE (password = @encpw) AND (level > 0) AND (email = @idkey) OR - + INSERT INTO Users @@ -220,6 +230,19 @@ SELECT id, password, nameE, name, dept, grade, email, level, indate, outdate, te + + + + UPDATE Users +SET dept = @dept +WHERE (id = @Original_id); + + + + + + + diff --git a/Project/dsMSSQL.xss b/Project/dsMSSQL.xss index 86ee4fd..9e19209 100644 --- a/Project/dsMSSQL.xss +++ b/Project/dsMSSQL.xss @@ -4,9 +4,9 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + diff --git a/SubProject/FEQ0000/Purchase/fPurchase_AddS.Designer.cs b/SubProject/FEQ0000/Purchase/fPurchase_AddS.Designer.cs index 14767e4..0164ea5 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase_AddS.Designer.cs +++ b/SubProject/FEQ0000/Purchase/fPurchase_AddS.Designer.cs @@ -39,6 +39,7 @@ System.Windows.Forms.Label label3; System.Windows.Forms.Label label6; System.Windows.Forms.Label label2; + System.Windows.Forms.Label receiveLabel; this.tbSID = new System.Windows.Forms.TextBox(); this.tbPumName = new System.Windows.Forms.TextBox(); this.tbPumModel = new System.Windows.Forms.TextBox(); @@ -63,6 +64,7 @@ this.purchaseTableAdapter = new FEQ0000.dsPurchaseTableAdapters.PurchaseTableAdapter(); this.cmbPlace = new System.Windows.Forms.ComboBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.cmbReceive = new System.Windows.Forms.ComboBox(); sidLabel = new System.Windows.Forms.Label(); pumscaleLabel = new System.Windows.Forms.Label(); pumqtyLabel = new System.Windows.Forms.Label(); @@ -73,6 +75,7 @@ label3 = new System.Windows.Forms.Label(); label6 = new System.Windows.Forms.Label(); label2 = new System.Windows.Forms.Label(); + receiveLabel = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.dsPurchase)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.purchaseBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); @@ -406,18 +409,43 @@ // this.pictureBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pictureBox1.Location = new System.Drawing.Point(490, 11); + this.pictureBox1.Location = new System.Drawing.Point(490, 44); this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(393, 538); + this.pictureBox1.Size = new System.Drawing.Size(393, 505); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.TabIndex = 33; this.pictureBox1.TabStop = false; // + // receiveLabel + // + receiveLabel.AutoSize = true; + receiveLabel.Location = new System.Drawing.Point(494, 11); + receiveLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + receiveLabel.Name = "receiveLabel"; + receiveLabel.Size = new System.Drawing.Size(54, 20); + receiveLabel.TabIndex = 34; + receiveLabel.Text = "수령인"; + // + // cmbReceive + // + this.cmbReceive.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + this.cmbReceive.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.cmbReceive.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbReceive.FormattingEnabled = true; + this.cmbReceive.ImeMode = System.Windows.Forms.ImeMode.Hangul; + this.cmbReceive.Location = new System.Drawing.Point(556, 9); + this.cmbReceive.Margin = new System.Windows.Forms.Padding(4); + this.cmbReceive.Name = "cmbReceive"; + this.cmbReceive.Size = new System.Drawing.Size(327, 28); + this.cmbReceive.TabIndex = 35; + // // fPurchase_AddS // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(895, 561); + this.Controls.Add(receiveLabel); + this.Controls.Add(this.cmbReceive); this.Controls.Add(this.pictureBox1); this.Controls.Add(this.cmbPlace); this.Controls.Add(label2); @@ -490,5 +518,6 @@ private System.Windows.Forms.LinkLabel linkLabel6; private System.Windows.Forms.ComboBox cmbPlace; private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.ComboBox cmbReceive; } } \ No newline at end of file diff --git a/SubProject/FEQ0000/Purchase/fPurchase_AddS.cs b/SubProject/FEQ0000/Purchase/fPurchase_AddS.cs index 6ff6f69..f20d458 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase_AddS.cs +++ b/SubProject/FEQ0000/Purchase/fPurchase_AddS.cs @@ -62,6 +62,7 @@ namespace FEQ0000 var userList = FCOMMON.DBM.getUserList(); //.getGroupList("name", "Users", "[level] > 0 and [level] < 10"); foreach (var user in userList) { + this.cmbReceive.Items.Add(string.Format("[{0}] {1}", user.Key, user.Value)); this.cmbRequest.Items.Add(string.Format("[{0}] {1}", user.Key, user.Value)); } @@ -81,6 +82,18 @@ namespace FEQ0000 } } else cmbRequest.Text = dr.request; + if (cmbReceive.Items.Count > 0) + { + for (int i = 0; i < cmbReceive.Items.Count; i++) + { + if (cmbReceive.Items[i].ToString().StartsWith("[" + dr.receive + "]")) + { + cmbReceive.SelectedIndex = i; + break; + } + } + } + else cmbReceive.Text = dr.receive; cmbPlace.Text = dr.place; @@ -112,7 +125,9 @@ namespace FEQ0000 int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth(FCOMMON.DBM.eAuthType.purchase)); if (curLevel < 5) { - + + if (dr.RowState == DataRowState.Detached || dr.RowState == DataRowState.Added) + cmbReceive.Enabled = false; cmbState.Enabled = false; if (cmbRequest.Text != "") cmbRequest.Enabled = false; @@ -382,6 +397,13 @@ namespace FEQ0000 else dr.supplyidx = int.Parse(tbSupplyIndex.Text); dr.state = cmbState.Text.Trim(); + + if (cmbReceive.Text.IndexOf("]") != -1) + dr.receive = cmbReceive.Text.Substring(1, cmbReceive.Text.IndexOf("]") - 1); + else + dr.receive = cmbReceive.Text.Trim(); + + dr.bigo = tbBigo.Text; //품정보가 업데이트 되어있으면 해당 데이터의 이미지를 업데이트 한다.(크기비교) diff --git a/SubProject/FEQ0000/Purchase/fPurchase_AddS.resx b/SubProject/FEQ0000/Purchase/fPurchase_AddS.resx index 295e958..04fd967 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase_AddS.resx +++ b/SubProject/FEQ0000/Purchase/fPurchase_AddS.resx @@ -150,6 +150,9 @@ 490, 17 + + 490, 17 + 17, 17 @@ -159,6 +162,9 @@ 313, 17 + + False + 58 diff --git a/SubProject/FPJ0000/JobReport/fJobReport.cs b/SubProject/FPJ0000/JobReport/fJobReport.cs index fe1c843..6e9162e 100644 --- a/SubProject/FPJ0000/JobReport/fJobReport.cs +++ b/SubProject/FPJ0000/JobReport/fJobReport.cs @@ -40,7 +40,7 @@ namespace FPJ0000 var processStr = "%"; if (cmbProcess.SelectedIndex > 0) processStr = cmbProcess.Text; - var dtUserList = taUserList.GetData(processStr); + var dtUserList = taUserList.GetData(processStr, FCOMMON.info.Login.gcode); foreach (dsReport.ProcessUserListRow dr in dtUserList) { string cmbdata = string.Format("{1}({0})", dr.id, dr.name); diff --git a/SubProject/FPJ0000/Project/fPartList.Designer.cs b/SubProject/FPJ0000/Project/fPartList.Designer.cs index 15ca7d1..1075e23 100644 --- a/SubProject/FPJ0000/Project/fPartList.Designer.cs +++ b/SubProject/FPJ0000/Project/fPartList.Designer.cs @@ -739,6 +739,8 @@ // this.fpSpread1.AccessibleDescription = ""; this.fpSpread1.AllowDragFill = true; + this.fpSpread1.AutoAdvance = true; + this.fpSpread1.ClipboardPasteToFill = true; this.fpSpread1.ContextMenuStrip = this.cm1; this.fpSpread1.Dock = System.Windows.Forms.DockStyle.Fill; this.fpSpread1.EditModeReplace = true; @@ -881,19 +883,25 @@ this.fpSpread1_Sheet1.Columns.Get(9).Label = "N대 수량"; this.fpSpread1_Sheet1.Columns.Get(9).Tag = "qtyn"; this.fpSpread1_Sheet1.Columns.Get(9).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; + this.fpSpread1_Sheet1.Columns.Get(10).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); numberCellType5.DecimalPlaces = 0; + numberCellType5.MaximumValue = 9999999999999.99D; + numberCellType5.MinimumValue = -9999999999999.99D; numberCellType5.NegativeRed = true; numberCellType5.NullDisplay = "--"; numberCellType5.Separator = ","; numberCellType5.ShowSeparator = true; this.fpSpread1_Sheet1.Columns.Get(10).CellType = numberCellType5; this.fpSpread1_Sheet1.Columns.Get(10).DataField = "amt"; + this.fpSpread1_Sheet1.Columns.Get(10).Formula = "RC[-3]*RC[-2]"; this.fpSpread1_Sheet1.Columns.Get(10).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right; this.fpSpread1_Sheet1.Columns.Get(10).Label = "1대 금액"; this.fpSpread1_Sheet1.Columns.Get(10).Tag = "amt"; this.fpSpread1_Sheet1.Columns.Get(10).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; + this.fpSpread1_Sheet1.Columns.Get(11).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); this.fpSpread1_Sheet1.Columns.Get(11).CellType = numberCellType5; this.fpSpread1_Sheet1.Columns.Get(11).DataField = "amtn"; + this.fpSpread1_Sheet1.Columns.Get(11).Formula = "RC[-4]*RC[-2]"; this.fpSpread1_Sheet1.Columns.Get(11).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right; this.fpSpread1_Sheet1.Columns.Get(11).Label = "N대 금액"; this.fpSpread1_Sheet1.Columns.Get(11).Tag = "amtn"; diff --git a/SubProject/FPJ0000/Project/fPartList.cs b/SubProject/FPJ0000/Project/fPartList.cs index 7786da0..cbbe442 100644 --- a/SubProject/FPJ0000/Project/fPartList.cs +++ b/SubProject/FPJ0000/Project/fPartList.cs @@ -160,6 +160,8 @@ namespace FPJ0000 var delindex = this.fpSpread1.ActiveSheet.Columns["sid"].Index; var col_pmp = this.fpSpread1.ActiveSheet.Columns["pmp"].Index; var col_buy = this.fpSpread1.ActiveSheet.Columns["buy"].Index; + var col_amt = this.fpSpread1.ActiveSheet.Columns["amt"].Index; + var col_amtn = this.fpSpread1.ActiveSheet.Columns["amtn"].Index; for (int i = 0; i < this.fpSpread1.ActiveSheet.Rows.Count; i++) { var value = this.fpSpread1.ActiveSheet.GetValue(i, delindex); @@ -178,6 +180,8 @@ namespace FPJ0000 this.fpSpread1.ActiveSheet.Cells[i, delindex].BackColor = Color.FromArgb(240,240, 250); this.fpSpread1.ActiveSheet.Cells[i, col_pmp].BackColor = Color.FromArgb(240, 240, 240); this.fpSpread1.ActiveSheet.Cells[i, col_buy].BackColor = Color.FromArgb(200,200,255); + this.fpSpread1.ActiveSheet.Cells[i, col_amt].BackColor = Color.WhiteSmoke; + this.fpSpread1.ActiveSheet.Cells[i, col_amtn].BackColor = Color.WhiteSmoke; } @@ -186,13 +190,11 @@ namespace FPJ0000 void RefreshSum() { - decimal sum = 0; - foreach (dsPRJ.ProjectsPartRow dr in this.dsPRJ.ProjectsPart.Rows) - { - if (dr.RowState == DataRowState.Deleted || dr.RowState == DataRowState.Detached) continue; - sum += dr.amt; - } - lbSum.Text = sum.ToString("N0"); + decimal sum = this.dsPRJ.ProjectsPart.Where(t => t.RowState != DataRowState.Deleted && t.RowState != DataRowState.Detached).Sum(t => t.amt); + decimal sumN = this.dsPRJ.ProjectsPart.Where(t => t.RowState != DataRowState.Deleted && t.RowState != DataRowState.Detached).Sum(t => t.amtn); + + + lbSum.Text = string.Format("1:{0:N0} / N:{1:N0}", sum, sumN); } diff --git a/SubProject/FPJ0000/Project/fPartList.resx b/SubProject/FPJ0000/Project/fPartList.resx index 877ebc9..dde3f34 100644 --- a/SubProject/FPJ0000/Project/fPartList.resx +++ b/SubProject/FPJ0000/Project/fPartList.resx @@ -280,57 +280,57 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAANISURBVDhPtZBdTFN3GIdJvFu4ULMaVIiZW0JCci6GLhCp - dIyPaIEYslIwFItVCxIq0GIQEQ6dRUtNEUotrWMIVmpFCYJ2VjAYNWEUu1aPjEDVWlD7YVeoHvwgIfuN - 1C7T6K3P7fs+zz//N+JD1BNk5HFbTT35h3i0+nbpUvmNPUvFpoLRwr7cutze3hXCwedfhVc/RUnVsRqt - 1c5rj65iyHUDppnruPvCBoPtHH7WszXlPTP7SzofOXfrHKyw8j8K++Ec419dGHYNoctxHhW2Okj+JNE3 - fRnZ3exAXpf225LOh4HO235Izj4GR2HPCavLL0+Qq3+xVNEjMyNomlBDMH4ARZYDaJ/shOZWGzI0Kfv3 - djg1zVc9MD2goR32gd1goTMqR1eHAuSYRGZyXMHpqbPgj4uQPyrEQWsD9DY9MlRb7UXayfhd8omlwfuv - oLzuR68liIqOKWwtG5aFAgdvFdvNT4Ygsh7GzmVZOCaG3mGEyFiCJHkCs0A1eafZ5MYlaxCVhueQDfgg - 73+KeMGAPRQoNRctDrh+R7m1Fk2UChem+3DC3IQtR3/4raB1irudvP/mwtg8JAY3in+dhVA7i5NXPIjj - XQyGAoX93OCYdxwXp/uhvqkC69iWQKJ0c/2gmPxaXXUmKpO0UG3XPKg2eFDY4gKv2Ql5nxsb2GfoUIDb - k21vu9mCn9pYL5IVCWKzOC/mHZ9f+zabG6C37yBSqu5QJy4/g6jjKTiNj1GsmYWo3YGNWe3vv5CpTZOk - tjKF9spd6xf37VMu8Hg0XX8EC/k7QSenEkllZkpqnMFelQtZNdOQGT1gV4xgfXrL+yPi0KFV78pKdXMC - weJC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vfAPjyP75s0Fgz1 + eCxt+CZuq4LPdeoJD61WS5pGX18f9Ko2ZPydKK+ZwC1fB/vgLPay7dhOT8Pbf+lHSHHhmCinKP5Zusg6 + MDBws7e3d1WpkLcs6Otff+WL21ttxW6yocpUEx9FhWxAjZDinFQQEwwNDXXx31L4KNFoFNPGTmTZfpQ/ + awX33VQjH+GcsHLpZnCfnuPl/dovrKyuTjyiip6eHnR3dyOourjNbaygvOVHaY3vYM12gM9QKcSRfzUG + /50amyg9DPbRmQ2PrI5z82R+8zTH3K3lmM6THHO7hmPaT3C+1uPBX9kDMJVEIfxrAAAAAElFTkSuQmCC diff --git a/SubProject/FPJ0000/dsReport.Designer.cs b/SubProject/FPJ0000/dsReport.Designer.cs index ceb302b..0741d9b 100644 --- a/SubProject/FPJ0000/dsReport.Designer.cs +++ b/SubProject/FPJ0000/dsReport.Designer.cs @@ -1355,6 +1355,8 @@ namespace FPJ0000 { private global::System.Data.DataColumn columnname; + private global::System.Data.DataColumn columngcode; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public ProcessUserListDataTable() { @@ -1404,6 +1406,14 @@ namespace FPJ0000 { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public global::System.Data.DataColumn gcodeColumn { + get { + return this.columngcode; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -1441,11 +1451,12 @@ namespace FPJ0000 { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] - public ProcessUserListRow AddProcessUserListRow(string id, string name) { + public ProcessUserListRow AddProcessUserListRow(string id, string name, string gcode) { ProcessUserListRow rowProcessUserListRow = ((ProcessUserListRow)(this.NewRow())); object[] columnValuesArray = new object[] { id, - name}; + name, + gcode}; rowProcessUserListRow.ItemArray = columnValuesArray; this.Rows.Add(rowProcessUserListRow); return rowProcessUserListRow; @@ -1470,6 +1481,7 @@ namespace FPJ0000 { internal void InitVars() { this.columnid = base.Columns["id"]; this.columnname = base.Columns["name"]; + this.columngcode = base.Columns["gcode"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1479,11 +1491,14 @@ namespace FPJ0000 { base.Columns.Add(this.columnid); this.columnname = new global::System.Data.DataColumn("name", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnname); + this.columngcode = new global::System.Data.DataColumn("gcode", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columngcode); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnid}, false)); this.columnid.Unique = true; this.columnid.MaxLength = 20; this.columnname.MaxLength = 100; + this.columngcode.MaxLength = 10; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -2269,6 +2284,22 @@ namespace FPJ0000 { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public string gcode { + get { + if (this.IsgcodeNull()) { + return string.Empty; + } + else { + return ((string)(this[this.tableProcessUserList.gcodeColumn])); + } + } + set { + this[this.tableProcessUserList.gcodeColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] public bool IsidNull() { @@ -2292,6 +2323,18 @@ namespace FPJ0000 { public void SetnameNull() { this[this.tableProcessUserList.nameColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public bool IsgcodeNull() { + return this.IsNull(this.tableProcessUserList.gcodeColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + public void SetgcodeNull() { + this[this.tableProcessUserList.gcodeColumn] = global::System.Convert.DBNull; + } } /// @@ -3301,28 +3344,34 @@ ORDER BY processs, JobReport.pdate, uname"; tableMapping.DataSetTable = "ProcessUserList"; tableMapping.ColumnMappings.Add("id", "id"); tableMapping.ColumnMappings.Add("name", "name"); + tableMapping.ColumnMappings.Add("gcode", "gcode"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [Users] WHERE (((@IsNull_id = 1 AND [id] IS NULL) OR ([id] = @Origina" + - "l_id)) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)))" + - ""; + "l_id)) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) " + + "AND ((@IsNull_gcode = 1 AND [gcode] IS NULL) OR ([gcode] = @Original_gcode)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_gcode", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_gcode", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [Users] SET [id] = @id, [name] = @name WHERE (((@IsNull_id = 1 AND [id] IS NULL) OR ([id] = @Original_id)) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name))); -SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = JobReport.uid WHERE (JobReport.idx = @idx) AND (Users.id = @id) GROUP BY Users.id, Users.name ORDER BY Users.name"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [Users] SET [id] = @id, [name] = @name, [gcode] = @gcode WHERE (((@IsNull_id = 1 AND [id] IS NULL) OR ([id] = @Original_id)) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_gcode = 1 AND [gcode] IS NULL) OR ([gcode] = @Original_gcode))); +SELECT Users.id, Users.name, Users.gcode FROM Users RIGHT OUTER JOIN JobReport ON Users.id = JobReport.uid WHERE (JobReport.idx = @idx) AND (Users.id = @id) GROUP BY Users.id, Users.name, Users.gcode ORDER BY Users.name"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_gcode", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_gcode", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idx", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idx", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } @@ -3339,19 +3388,22 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT Users.id, Users.name\r\nFROM Users RIGHT OUTER JOIN\r\n Job" + - "Report ON Users.id = JobReport.uid\r\nWHERE (Users.processs LIKE @process) AND (U" + - "sers.id <> \'dev\') AND (Users.id <> \'test\')\r\nGROUP BY Users.id, Users.name\r\nORDER" + - " BY Users.name"; + this._commandCollection[0].CommandText = @"SELECT Users.id, Users.name, Users.gcode +FROM Users RIGHT OUTER JOIN + JobReport ON Users.id = JobReport.uid +WHERE (Users.processs LIKE @process) AND (Users.id <> 'dev') AND (Users.id <> 'test') AND (Users.gcode = @gcode) +GROUP BY Users.id, Users.name, Users.gcode +ORDER BY Users.name"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@process", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, "processs", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@gcode", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "gcode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(dsReport.ProcessUserListDataTable dataTable, string process) { + public virtual int Fill(dsReport.ProcessUserListDataTable dataTable, string process, string gcode) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((process == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; @@ -3359,6 +3411,12 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = else { this.Adapter.SelectCommand.Parameters[0].Value = ((string)(process)); } + if ((gcode == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(gcode)); + } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } @@ -3370,7 +3428,7 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual dsReport.ProcessUserListDataTable GetData(string process) { + public virtual dsReport.ProcessUserListDataTable GetData(string process, string gcode) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((process == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; @@ -3378,6 +3436,12 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = else { this.Adapter.SelectCommand.Parameters[0].Value = ((string)(process)); } + if ((gcode == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(gcode)); + } dsReport.ProcessUserListDataTable dataTable = new dsReport.ProcessUserListDataTable(); this.Adapter.Fill(dataTable); return dataTable; @@ -3416,7 +3480,7 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(string Original_id, string Original_name) { + public virtual int Delete(string Original_id, string Original_name, string Original_gcode) { if ((Original_id == null)) { throw new global::System.ArgumentNullException("Original_id"); } @@ -3432,6 +3496,14 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_name)); } + if ((Original_gcode == null)) { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_gcode)); + } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -3452,7 +3524,7 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string id, string name, string Original_id, string Original_name, int idx) { + public virtual int Update(string id, string name, string gcode, string Original_id, string Original_name, string Original_gcode, int idx) { if ((id == null)) { throw new global::System.ArgumentNullException("id"); } @@ -3465,22 +3537,36 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = else { this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(name)); } + if ((gcode == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(gcode)); + } if ((Original_id == null)) { throw new global::System.ArgumentNullException("Original_id"); } else { - this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_id)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_id)); } if ((Original_name == null)) { - this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_name)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_name)); } - this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(idx)); + if ((Original_gcode == null)) { + this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_gcode)); + } + this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(idx)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { diff --git a/SubProject/FPJ0000/dsReport.xsd b/SubProject/FPJ0000/dsReport.xsd index 63577ad..606318a 100644 --- a/SubProject/FPJ0000/dsReport.xsd +++ b/SubProject/FPJ0000/dsReport.xsd @@ -90,39 +90,45 @@ ORDER BY processs - DELETE FROM [Users] WHERE (((@IsNull_id = 1 AND [id] IS NULL) OR ([id] = @Original_id)) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name))) + DELETE FROM [Users] WHERE (((@IsNull_id = 1 AND [id] IS NULL) OR ([id] = @Original_id)) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_gcode = 1 AND [gcode] IS NULL) OR ([gcode] = @Original_gcode))) + + - SELECT Users.id, Users.name + SELECT Users.id, Users.name, Users.gcode FROM Users RIGHT OUTER JOIN JobReport ON Users.id = JobReport.uid -WHERE (Users.processs LIKE @process) AND (Users.id <> 'dev') AND (Users.id <> 'test') -GROUP BY Users.id, Users.name +WHERE (Users.processs LIKE @process) AND (Users.id <> 'dev') AND (Users.id <> 'test') AND (Users.gcode = @gcode) +GROUP BY Users.id, Users.name, Users.gcode ORDER BY Users.name + - UPDATE [Users] SET [id] = @id, [name] = @name WHERE (((@IsNull_id = 1 AND [id] IS NULL) OR ([id] = @Original_id)) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name))); -SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = JobReport.uid WHERE (JobReport.idx = @idx) AND (Users.id = @id) GROUP BY Users.id, Users.name ORDER BY Users.name + UPDATE [Users] SET [id] = @id, [name] = @name, [gcode] = @gcode WHERE (((@IsNull_id = 1 AND [id] IS NULL) OR ([id] = @Original_id)) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_gcode = 1 AND [gcode] IS NULL) OR ([gcode] = @Original_gcode))); +SELECT Users.id, Users.name, Users.gcode FROM Users RIGHT OUTER JOIN JobReport ON Users.id = JobReport.uid WHERE (JobReport.idx = @idx) AND (Users.id = @id) GROUP BY Users.id, Users.name, Users.gcode ORDER BY Users.name + + + @@ -132,6 +138,7 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = + @@ -143,7 +150,7 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = - + @@ -173,7 +180,7 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = - + @@ -209,7 +216,7 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = - + @@ -222,7 +229,7 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = - + @@ -239,10 +246,17 @@ SELECT Users.id, Users.name FROM Users RIGHT OUTER JOIN JobReport ON Users.id = + + + + + + + - + diff --git a/SubProject/FPJ0000/dsReport.xss b/SubProject/FPJ0000/dsReport.xss index 38bb41b..a123c86 100644 --- a/SubProject/FPJ0000/dsReport.xss +++ b/SubProject/FPJ0000/dsReport.xss @@ -9,7 +9,7 @@ - +