diff --git a/Project/Properties/AssemblyInfo.cs b/Project/Properties/AssemblyInfo.cs index 5a88c04..29be531 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("21.07.16.1400")] -[assembly: AssemblyFileVersion("21.07.16.1400")] +[assembly: AssemblyVersion("21.07.20.2100")] +[assembly: AssemblyFileVersion("21.07.20.2100")] diff --git a/SubProject/FPJ0000/JobReport_/fJobReport.cs b/SubProject/FPJ0000/JobReport_/fJobReport.cs index 2eb8ebe..def3cdc 100644 --- a/SubProject/FPJ0000/JobReport_/fJobReport.cs +++ b/SubProject/FPJ0000/JobReport_/fJobReport.cs @@ -126,9 +126,11 @@ namespace FPJ0000 if (curLevel >= 5) { btSave.Visible = true; + btImport.Visible = true; } else { + btImport.Visible = false; btSave.Visible = false; //btViewDel.Visible = false; fpSpread1.EditMode = false; @@ -674,7 +676,8 @@ namespace FPJ0000 private void btImport_Click(object sender, EventArgs e) { - + var f = new FPJ0000.JobReport_.fJobReportImport(); + f.ShowDialog(); } private void toolStripButton5_Click(object sender, EventArgs e) diff --git a/SubProject/FPJ0000/JobReport_/fJobReportImport.Designer.cs b/SubProject/FPJ0000/JobReport_/fJobReportImport.Designer.cs index 3abbb6b..62a9c7a 100644 --- a/SubProject/FPJ0000/JobReport_/fJobReportImport.Designer.cs +++ b/SubProject/FPJ0000/JobReport_/fJobReportImport.Designer.cs @@ -61,6 +61,8 @@ this.dsPRJ = new FPJ0000.dsPRJ(); this.button3 = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); + this.nudMon = new System.Windows.Forms.NumericUpDown(); + this.label4 = new System.Windows.Forms.Label(); this.nudname = new System.Windows.Forms.NumericUpDown(); this.label21 = new System.Windows.Forms.Label(); this.nuduid = new System.Windows.Forms.NumericUpDown(); @@ -107,19 +109,18 @@ this.progressBar1 = new System.Windows.Forms.ToolStripProgressBar(); this.panel2 = new System.Windows.Forms.Panel(); this.button2 = new System.Windows.Forms.Button(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.cmbUser = new System.Windows.Forms.ComboBox(); this.label8 = new System.Windows.Forms.Label(); this.checkBox2 = new System.Windows.Forms.CheckBox(); this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker(); this.label14 = new System.Windows.Forms.Label(); this.jobReportTableAdapter = new FPJ0000.dsPRJTableAdapters.JobReportTableAdapter(); - this.nudMon = new System.Windows.Forms.NumericUpDown(); - this.label4 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsPRJ)).BeginInit(); this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudMon)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudname)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nuduid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudot)).BeginInit(); @@ -138,7 +139,6 @@ ((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit(); this.bn.SuspendLayout(); this.panel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudMon)).BeginInit(); this.SuspendLayout(); // // textBox1 @@ -161,7 +161,7 @@ // // button1 // - this.button1.Location = new System.Drawing.Point(525, 8); + this.button1.Location = new System.Drawing.Point(667, 7); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(102, 21); this.button1.TabIndex = 4; @@ -200,10 +200,10 @@ this.tagDataGridViewTextBoxColumn}); this.dataGridView1.DataSource = this.bs; this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridView1.Location = new System.Drawing.Point(0, 158); + this.dataGridView1.Location = new System.Drawing.Point(0, 95); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(1138, 370); + this.dataGridView1.Size = new System.Drawing.Size(1138, 433); this.dataGridView1.TabIndex = 1; // // idxDataGridViewTextBoxColumn @@ -359,7 +359,7 @@ // // button3 // - this.button3.Location = new System.Drawing.Point(525, 35); + this.button3.Location = new System.Drawing.Point(775, 6); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(102, 21); this.button3.TabIndex = 6; @@ -409,13 +409,35 @@ this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1138, 158); + this.panel1.Size = new System.Drawing.Size(1138, 95); this.panel1.TabIndex = 0; this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); // + // nudMon + // + this.nudMon.Location = new System.Drawing.Point(27, 63); + this.nudMon.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.nudMon.Name = "nudMon"; + this.nudMon.Size = new System.Drawing.Size(45, 21); + this.nudMon.TabIndex = 28; + this.nudMon.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(33, 45); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(30, 12); + this.label4.TabIndex = 27; + this.label4.Text = "Mon"; + // // nudname // - this.nudname.Location = new System.Drawing.Point(581, 120); + this.nudname.Location = new System.Drawing.Point(639, 63); this.nudname.Maximum = new decimal(new int[] { 65535, 0, @@ -434,7 +456,7 @@ // label21 // this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(587, 102); + this.label21.Location = new System.Drawing.Point(645, 45); this.label21.Name = "label21"; this.label21.Size = new System.Drawing.Size(29, 12); this.label21.TabIndex = 25; @@ -442,7 +464,7 @@ // // nuduid // - this.nuduid.Location = new System.Drawing.Point(530, 120); + this.nuduid.Location = new System.Drawing.Point(588, 63); this.nuduid.Maximum = new decimal(new int[] { 65535, 0, @@ -456,7 +478,7 @@ // label20 // this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(536, 102); + this.label20.Location = new System.Drawing.Point(594, 45); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(29, 12); this.label20.TabIndex = 25; @@ -464,7 +486,7 @@ // // nudot // - this.nudot.Location = new System.Drawing.Point(479, 120); + this.nudot.Location = new System.Drawing.Point(537, 63); this.nudot.Maximum = new decimal(new int[] { 65535, 0, @@ -475,7 +497,7 @@ this.nudot.TabIndex = 26; this.nudot.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.nudot.Value = new decimal(new int[] { - 15, + 12, 0, 0, 0}); @@ -483,7 +505,7 @@ // label19 // this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(485, 102); + this.label19.Location = new System.Drawing.Point(543, 45); this.label19.Name = "label19"; this.label19.Size = new System.Drawing.Size(22, 12); this.label19.TabIndex = 25; @@ -491,7 +513,7 @@ // // nudhrd // - this.nudhrd.Location = new System.Drawing.Point(428, 120); + this.nudhrd.Location = new System.Drawing.Point(486, 63); this.nudhrd.Maximum = new decimal(new int[] { 65535, 0, @@ -502,7 +524,7 @@ this.nudhrd.TabIndex = 26; this.nudhrd.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.nudhrd.Value = new decimal(new int[] { - 14, + 11, 0, 0, 0}); @@ -510,7 +532,7 @@ // label18 // this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(434, 102); + this.label18.Location = new System.Drawing.Point(492, 45); this.label18.Name = "label18"; this.label18.Size = new System.Drawing.Size(29, 12); this.label18.TabIndex = 25; @@ -518,7 +540,7 @@ // // nudbio // - this.nudbio.Location = new System.Drawing.Point(377, 120); + this.nudbio.Location = new System.Drawing.Point(435, 63); this.nudbio.Maximum = new decimal(new int[] { 65535, 0, @@ -529,14 +551,14 @@ this.nudbio.TabIndex = 24; this.nudbio.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.nudbio.Value = new decimal(new int[] { - 13, + 10, 0, 0, 0}); // // nudst // - this.nudst.Location = new System.Drawing.Point(173, 120); + this.nudst.Location = new System.Drawing.Point(231, 63); this.nudst.Maximum = new decimal(new int[] { 65535, 0, @@ -547,7 +569,7 @@ this.nudst.TabIndex = 24; this.nudst.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.nudst.Value = new decimal(new int[] { - 8, + 6, 0, 0, 0}); @@ -555,7 +577,7 @@ // label17 // this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(383, 102); + this.label17.Location = new System.Drawing.Point(441, 45); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(29, 12); this.label17.TabIndex = 23; @@ -564,7 +586,7 @@ // label12 // this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(179, 102); + this.label12.Location = new System.Drawing.Point(237, 45); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(29, 12); this.label12.TabIndex = 23; @@ -572,7 +594,7 @@ // // nuditem // - this.nuditem.Location = new System.Drawing.Point(326, 120); + this.nuditem.Location = new System.Drawing.Point(384, 63); this.nuditem.Maximum = new decimal(new int[] { 65535, 0, @@ -583,14 +605,14 @@ this.nuditem.TabIndex = 24; this.nuditem.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.nuditem.Value = new decimal(new int[] { - 12, + 9, 0, 0, 0}); // // nudpack // - this.nudpack.Location = new System.Drawing.Point(122, 120); + this.nudpack.Location = new System.Drawing.Point(180, 63); this.nudpack.Maximum = new decimal(new int[] { 65535, 0, @@ -601,7 +623,7 @@ this.nudpack.TabIndex = 24; this.nudpack.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.nudpack.Value = new decimal(new int[] { - 7, + 5, 0, 0, 0}); @@ -609,7 +631,7 @@ // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(332, 102); + this.label16.Location = new System.Drawing.Point(390, 45); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(41, 12); this.label16.TabIndex = 23; @@ -618,7 +640,7 @@ // label11 // this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(128, 102); + this.label11.Location = new System.Drawing.Point(186, 45); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(41, 12); this.label11.TabIndex = 23; @@ -626,7 +648,7 @@ // // nudbunru // - this.nudbunru.Location = new System.Drawing.Point(275, 120); + this.nudbunru.Location = new System.Drawing.Point(333, 63); this.nudbunru.Maximum = new decimal(new int[] { 65535, 0, @@ -637,14 +659,14 @@ this.nudbunru.TabIndex = 24; this.nudbunru.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.nudbunru.Value = new decimal(new int[] { - 10, + 8, 0, 0, 0}); // // nudreq // - this.nudreq.Location = new System.Drawing.Point(71, 120); + this.nudreq.Location = new System.Drawing.Point(129, 63); this.nudreq.Maximum = new decimal(new int[] { 65535, 0, @@ -655,7 +677,7 @@ this.nudreq.TabIndex = 24; this.nudreq.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.nudreq.Value = new decimal(new int[] { - 6, + 4, 0, 0, 0}); @@ -663,7 +685,7 @@ // label15 // this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(281, 102); + this.label15.Location = new System.Drawing.Point(339, 45); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(29, 12); this.label15.TabIndex = 23; @@ -672,7 +694,7 @@ // label10 // this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(77, 102); + this.label10.Location = new System.Drawing.Point(135, 45); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(29, 12); this.label10.TabIndex = 23; @@ -680,7 +702,7 @@ // // nudtype // - this.nudtype.Location = new System.Drawing.Point(224, 120); + this.nudtype.Location = new System.Drawing.Point(282, 63); this.nudtype.Maximum = new decimal(new int[] { 65535, 0, @@ -691,7 +713,7 @@ this.nudtype.TabIndex = 24; this.nudtype.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.nudtype.Value = new decimal(new int[] { - 9, + 7, 0, 0, 0}); @@ -699,7 +721,7 @@ // label13 // this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(230, 102); + this.label13.Location = new System.Drawing.Point(288, 45); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(29, 12); this.label13.TabIndex = 23; @@ -707,7 +729,7 @@ // // nuddate // - this.nuddate.Location = new System.Drawing.Point(20, 120); + this.nuddate.Location = new System.Drawing.Point(78, 63); this.nuddate.Maximum = new decimal(new int[] { 65535, 0, @@ -718,7 +740,7 @@ this.nuddate.TabIndex = 24; this.nuddate.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.nuddate.Value = new decimal(new int[] { - 5, + 3, 0, 0, 0}); @@ -726,7 +748,7 @@ // label9 // this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(26, 102); + this.label9.Location = new System.Drawing.Point(84, 45); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(29, 12); this.label9.TabIndex = 23; @@ -735,7 +757,7 @@ // checkBox1 // this.checkBox1.AutoSize = true; - this.checkBox1.Location = new System.Drawing.Point(474, 66); + this.checkBox1.Location = new System.Drawing.Point(883, 9); this.checkBox1.Name = "checkBox1"; this.checkBox1.Size = new System.Drawing.Size(127, 16); this.checkBox1.TabIndex = 19; @@ -745,7 +767,7 @@ // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(455, 40); + this.label3.Location = new System.Drawing.Point(443, 13); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(14, 12); this.label3.TabIndex = 10; @@ -753,7 +775,7 @@ // // nudE // - this.nudE.Location = new System.Drawing.Point(474, 36); + this.nudE.Location = new System.Drawing.Point(462, 9); this.nudE.Maximum = new decimal(new int[] { 65535, 0, @@ -771,7 +793,7 @@ // // nudS // - this.nudS.Location = new System.Drawing.Point(406, 36); + this.nudS.Location = new System.Drawing.Point(394, 9); this.nudS.Maximum = new decimal(new int[] { 65535, 0, @@ -790,7 +812,7 @@ // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(329, 40); + this.label2.Location = new System.Drawing.Point(317, 13); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(70, 12); this.label2.TabIndex = 7; @@ -945,7 +967,7 @@ // this.panel2.BackColor = System.Drawing.Color.HotPink; this.panel2.Controls.Add(this.button2); - this.panel2.Controls.Add(this.comboBox1); + this.panel2.Controls.Add(this.cmbUser); this.panel2.Controls.Add(this.label8); this.panel2.Controls.Add(this.checkBox2); this.panel2.Controls.Add(this.dateTimePicker1); @@ -959,26 +981,27 @@ // // button2 // - this.button2.Location = new System.Drawing.Point(741, 35); + this.button2.Location = new System.Drawing.Point(809, 39); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(102, 21); this.button2.TabIndex = 23; this.button2.Text = "RUN"; this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); // // comboBox1 // - this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Location = new System.Drawing.Point(457, 40); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(171, 20); - this.comboBox1.TabIndex = 22; + this.cmbUser.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbUser.FormattingEnabled = true; + this.cmbUser.Location = new System.Drawing.Point(457, 40); + this.cmbUser.Name = "comboBox1"; + this.cmbUser.Size = new System.Drawing.Size(171, 20); + this.cmbUser.TabIndex = 22; // // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(422, 45); + this.label8.Location = new System.Drawing.Point(422, 44); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(29, 12); this.label8.TabIndex = 21; @@ -987,11 +1010,14 @@ // checkBox2 // this.checkBox2.AutoSize = true; - this.checkBox2.Location = new System.Drawing.Point(639, 40); + this.checkBox2.Checked = true; + this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox2.Enabled = false; + this.checkBox2.Location = new System.Drawing.Point(639, 42); this.checkBox2.Name = "checkBox2"; - this.checkBox2.Size = new System.Drawing.Size(89, 16); + this.checkBox2.Size = new System.Drawing.Size(164, 16); this.checkBox2.TabIndex = 19; - this.checkBox2.Text = "Import Only"; + this.checkBox2.Text = "업로드 데이터만 대상으로"; this.checkBox2.UseVisualStyleBackColor = true; // // dateTimePicker1 @@ -1025,28 +1051,6 @@ // this.jobReportTableAdapter.ClearBeforeFill = true; // - // nudMon - // - this.nudMon.Location = new System.Drawing.Point(20, 66); - this.nudMon.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.nudMon.Name = "nudMon"; - this.nudMon.Size = new System.Drawing.Size(45, 21); - this.nudMon.TabIndex = 28; - this.nudMon.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(26, 48); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(30, 12); - this.label4.TabIndex = 27; - this.label4.Text = "Mon"; - // // fJobReportImport // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); @@ -1064,6 +1068,7 @@ ((System.ComponentModel.ISupportInitialize)(this.dsPRJ)).EndInit(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudMon)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudname)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nuduid)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudot)).EndInit(); @@ -1084,7 +1089,6 @@ this.bn.PerformLayout(); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudMon)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -1120,7 +1124,7 @@ private System.Windows.Forms.NumericUpDown nudS; private System.Windows.Forms.CheckBox checkBox1; private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.ComboBox cmbUser; private System.Windows.Forms.Label label8; private System.Windows.Forms.CheckBox checkBox2; private System.Windows.Forms.DateTimePicker dateTimePicker1; diff --git a/SubProject/FPJ0000/JobReport_/fJobReportImport.cs b/SubProject/FPJ0000/JobReport_/fJobReportImport.cs index 78ebc0f..8807c0b 100644 --- a/SubProject/FPJ0000/JobReport_/fJobReportImport.cs +++ b/SubProject/FPJ0000/JobReport_/fJobReportImport.cs @@ -26,10 +26,20 @@ namespace FPJ0000.JobReport_ //담당자목록 - var dt_users = FCOMMON.DBM.getUserTable();// getGroupList("name + '(' + id + ')'", "Users", "[level] > 0 and [level] < 10", false, false); - //this.cmbUser.DisplayMember = "dispName"; - //this.cmbUser.ValueMember = "id"; - //this.cmbUser.DataSource = dt_users; + var dt_users = FCOMMON.DBM.getUserTable();// getGroupList("name + '(' + id + ')'", "Users", "[level] > 0 and [level] < + //10", false, false); + + var newdr = dt_users.NewRow(); + newdr["id"] = "--"; + newdr["name"] = "전체"; + newdr["dispName"] = "--전체--"; + dt_users.Rows.Add(newdr); + dt_users.AcceptChanges(); + + this.cmbUser.DisplayMember = "dispName"; + this.cmbUser.ValueMember = "id"; + this.cmbUser.DataSource = dt_users; + this.cmbUser.SelectedValue = "--"; } void __Closed(object sender, FormClosedEventArgs e) @@ -107,7 +117,7 @@ namespace FPJ0000.JobReport_ this.dsPRJ.JobReport.Clear(); this.dsPRJ.JobReport.AcceptChanges(); var dt_users = FCOMMON.DBM.getUserTable(); - + var unknownlist = new List(); try { for (int r = MinRow; r <= MaxRow; r++) @@ -128,7 +138,7 @@ namespace FPJ0000.JobReport_ var monstr = sheet.readStr(r, colidxm); var dayval = sheet.readNum(r, colidx); - var daystr = string.Format("{0}-{1}-{2}",DateTime.Now.Year,monstr,dayval); + var daystr = string.Format("{0}-{1}-{2}", DateTime.Now.Year, monstr, dayval); var dt = DateTime.Parse(daystr); dr.pdate = dt.ToShortDateString(); } @@ -238,12 +248,17 @@ namespace FPJ0000.JobReport_ colidx = (int)(nudname.Value - 1); if (string.IsNullOrEmpty(dr.uid) == true) { - var username = sheet.readStr(r, colidx); - var users = dt_users.Select("name='" + username + "'"); + dr.username = sheet.readStr(r, colidx); + var users = dt_users.Select("name='" + dr.username + "'"); if (users.Length == 1) { dr.uid = users[0]["id"].ToString(); } + else + { + if (unknownlist.Contains(dr.username) == false) + unknownlist.Add(dr.username); + } } } @@ -261,10 +276,23 @@ namespace FPJ0000.JobReport_ this.bn.BindingSource = this.bs; + //기간을 정하낟. + var minDate = this.dsPRJ.JobReport.Min(t => t.pdate); + var maxDate = this.dsPRJ.JobReport.Max(t => t.pdate); + this.dateTimePicker2.Value = DateTime.Parse(minDate); + this.dateTimePicker1.Value = DateTime.Parse(maxDate); + if (this.bs.Count < 1) { FCOMMON.Util.MsgE("입력된 자료가 없습니다.\n\n지정된 엑셀의 1번째 칸에 값이 없다면 입력되지 않습니다."); } + if (unknownlist.Count > 0) + { + FCOMMON.Util.MsgE("다음 사용자명의 계정이 확인되지 않습니다\n사용자를 먼저 등록하고 사용하세요\n" + + string.Join("m",unknownlist) ); + button3.Enabled = false; + } + else button3.Enabled = true; } @@ -299,5 +327,29 @@ namespace FPJ0000.JobReport_ { } + + private void button2_Click(object sender, EventArgs e) + { + var sd = dateTimePicker2.Value; + var ed = dateTimePicker1.Value; + + var dlg = FCOMMON.Util.MsgQ($"{sd.ToShortDateString()}~{ed.ToShortDateString()} 사이의 업로드된 자료를 삭제 할까요?"); + if (dlg != DialogResult.Yes) return; + + + var ta = new dsPRJTableAdapters.JobReportTableAdapter(); + if (this.cmbUser.SelectedValue == null || this.cmbUser.SelectedValue.ToString() == "--") + { + var cnt = ta.DeleteImportAll(sd.ToShortDateString(), ed.ToShortDateString(), FCOMMON.info.Login.gcode); + FCOMMON.Util.MsgI($"{cnt}건의 자료가 삭제 되었습니다"); + } + else + { + var uid = this.cmbUser.SelectedItem.ToString(); + var cnt = ta.DeleteImport(sd.ToShortDateString(), ed.ToShortDateString(), uid, FCOMMON.info.Login.gcode); + FCOMMON.Util.MsgI($"{cnt}건의 자료가 삭제 되었습니다"); + } + + } } } diff --git a/SubProject/FPJ0000/Project/fPartList.cs b/SubProject/FPJ0000/Project/fPartList.cs index e75ee3d..ad6a567 100644 --- a/SubProject/FPJ0000/Project/fPartList.cs +++ b/SubProject/FPJ0000/Project/fPartList.cs @@ -123,6 +123,9 @@ namespace FPJ0000 this.Show(); Application.DoEvents(); RefreshData(); + if (this.WindowState == FormWindowState.Minimized) this.WindowState = FormWindowState.Normal; + if (this.RestoreBounds.X + this.RestoreBounds.Width < 300 && this.RestoreBounds.X < 0) + this.Location = new Point(0, 0); } string sortkey = string.Empty; @@ -820,22 +823,23 @@ namespace FPJ0000 f.Show(); } - private void button4_Click(object sender, EventArgs e) + void showfolder() { var drv = this.bs.Current as DataRowView; if (drv == null) return; var dr = drv.Row as dsPRJ.ProjectsRow; var tbPath = dr.path; - if (tbPath == "") tbPath = "/" + tbIdx.Text; + + if (tbPath == "") tbPath = "/" + dr.idx.ToString(); if (tbPath.StartsWith("\\") == false) { if (tbPath.StartsWith("/")) tbPath = tbPath.Replace("/", "\\"); else tbPath = "\\" + tbPath; } - - var serverpath = @"\\10.131.32.33\Data\Project"; + //\\10.131.32.29\Data + var serverpath = System.IO.Path.Combine(FCOMMON.info.datapath, "Data", "Project"); if (System.IO.Directory.Exists(serverpath) == false) { FCOMMON.Util.MsgE("프로젝트 기본경로가 존재하지 않아 진행할 수 없습니다\n\n" + @@ -846,10 +850,29 @@ namespace FPJ0000 var path = serverpath + tbPath; if (System.IO.Directory.Exists(path) == false) { - FCOMMON.Util.MsgE("프로젝트 저장소 없음"); + try + { + System.IO.Directory.CreateDirectory(path); + + string[] subdir = new string[] { "Source", "Document", "Draw", "Estimate" }; + foreach (var dir in subdir) + System.IO.Directory.CreateDirectory(path + "\\" + dir); + + } + catch (Exception eX) + { + FCOMMON.Util.MsgE("프로젝트 저장소 생성실패\n" + eX.Message); + return; + } } FCOMMON.Util.RunExplorer(path); } + + + private void button4_Click(object sender, EventArgs e) + { + showfolder(); + } } } diff --git a/SubProject/FPJ0000/Project/fProjectList.Designer.cs b/SubProject/FPJ0000/Project/fProjectList.Designer.cs index 1a5faa2..b6c176b 100644 --- a/SubProject/FPJ0000/Project/fProjectList.Designer.cs +++ b/SubProject/FPJ0000/Project/fProjectList.Designer.cs @@ -266,6 +266,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(30, 23); this.bindingNavigatorPositionItem.Text = "0"; @@ -388,6 +389,7 @@ // tbFind // this.tbFind.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tbFind.Font = new System.Drawing.Font("맑은 고딕", 9F); this.tbFind.Name = "tbFind"; this.tbFind.Size = new System.Drawing.Size(100, 25); this.tbFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbFind_KeyDown); @@ -915,6 +917,7 @@ // tbRequest // this.tbRequest.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tbRequest.Font = new System.Drawing.Font("맑은 고딕", 9F); this.tbRequest.Name = "tbRequest"; this.tbRequest.Size = new System.Drawing.Size(120, 25); this.tbRequest.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center; diff --git a/SubProject/FPJ0000/Project/fProjectList.resx b/SubProject/FPJ0000/Project/fProjectList.resx index 85e434d..025ed30 100644 --- a/SubProject/FPJ0000/Project/fProjectList.resx +++ b/SubProject/FPJ0000/Project/fProjectList.resx @@ -231,33 +231,33 @@ iVBOR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I + sh3ZqnK4ClKwHL2OKJYjAmYZCY6giGliT1RB9yQDA6co94N8WVc5Aj+DslEPOVRJ4DKIvqvZtv0xBY5A + AlP+BMZoAfNhBR0Tkf2A1ft5USnuja+860on1tog+B5CoOsgrFjQTWZe3hAx4duDM36/rqBlZHU/gLbk + 3qSrj3Z67x2Juavz5B/9ZrBWm/HzWCCQk5ExR6pbPwgwW5p1W8WZy0bE79VgYw612BlzH9lFz3QUT+yT + abPlse4ZbYWrsZh/UZpbbBz9c72qOHfN+egKF7Q1YORukWh8/js9Lz1cPGo+K9lrLuzv4t9EUV8BHlcj + /82UOg4AAAAASUVORK5CYII= diff --git a/SubProject/FPJ0000/dsPRJ.Designer.cs b/SubProject/FPJ0000/dsPRJ.Designer.cs index e6d725e..5f20c8d 100644 --- a/SubProject/FPJ0000/dsPRJ.Designer.cs +++ b/SubProject/FPJ0000/dsPRJ.Designer.cs @@ -24777,7 +24777,7 @@ SELECT idx, pidx, pdate, uid, requestpart, package, status, type, description, r [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = @"SELECT idx, pidx, pdate, uid, requestpart, package, status, type, description, remark, hrs, import, wuid, wdate, dbo.getUserName(uid) AS username, projectName, ot, dbo.getWorkWeek(pdate) AS ww, @@ -24801,39 +24801,47 @@ ORDER BY pdate DESC"; this._commandCollection[1].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.Original, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = @"SELECT idx, pidx, pdate, uid, requestpart, package, status, type, description, remark, hrs, import, wuid, wdate, dbo.getUserName(uid) AS username, projectName, ot, dbo.getWorkWeek(pdate) AS ww, + this._commandCollection[2].CommandText = "DELETE FROM JobReport\r\nWHERE (pdate BETWEEN @sd AND @ed) AND (ISNULL(import, 0)" + + " = 1) AND (gcode = @gcode)"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sd", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ed", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._commandCollection[2].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.Original, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = @"SELECT idx, pidx, pdate, uid, requestpart, package, status, type, description, remark, hrs, import, wuid, wdate, dbo.getUserName(uid) AS username, projectName, ot, dbo.getWorkWeek(pdate) AS ww, process, gcode, description2, tag, dbo.getCodeSValue(gcode, '15', type) AS svalue FROM JobReport WHERE (pdate BETWEEN @sd AND @ed) AND (uid LIKE @uid) AND (gcode = @gcode) AND (ISNULL(tag, '') <> '') ORDER BY pdate DESC"; - this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sd", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ed", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@uid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "uid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].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, "", "", "")); - this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); - this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = @"SELECT description, hrs, idx, import, ot, package, pdate, pidx, process, projectName, remark, requestpart, status, type, uid, dbo.getUserName(uid) AS username, wdate, wuid, dbo.getWorkWeek(pdate) + this._commandCollection[3].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sd", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ed", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@uid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "uid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].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, "", "", "")); + this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = @"SELECT description, hrs, idx, import, ot, package, pdate, pidx, process, projectName, remark, requestpart, status, type, uid, dbo.getUserName(uid) AS username, wdate, wuid, dbo.getWorkWeek(pdate) AS ww, gcode, description2, tag, dbo.getCodeSValue(gcode, '15', type) AS svalue FROM JobReport WHERE (pdate BETWEEN @sd AND @ed) AND (ISNULL(dbo.getProjectName(pidx), '') LIKE @prjname) AND (gcode = @gcode) ORDER BY pdate DESC"; - this._commandCollection[3].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sd", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ed", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@prjname", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].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, "", "", "")); - this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); - this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = @"SELECT pidx, projectName, MAX(pdate) AS pdate + this._commandCollection[4].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sd", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ed", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@prjname", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].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, "", "", "")); + this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[5].Connection = this.Connection; + this._commandCollection[5].CommandText = @"SELECT pidx, projectName, MAX(pdate) AS pdate FROM JobReport WHERE (ISNULL(projectName, N'') LIKE @search OR ISNULL(description, N'') LIKE @search) AND (projectName <> '') AND (gcode = @gcode) GROUP BY pidx, projectName ORDER BY projectName"; - this._commandCollection[4].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@search", global::System.Data.SqlDbType.NVarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].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, "", "", "")); + this._commandCollection[5].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@search", global::System.Data.SqlDbType.NVarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].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()] @@ -24913,7 +24921,7 @@ ORDER BY projectName"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] public virtual int FillByTagOnly(dsPRJ.JobReportDataTable dataTable, string sd, string ed, string uid, string gcode) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((sd == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -24950,7 +24958,7 @@ ORDER BY projectName"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsPRJ.JobReportDataTable GetByTagOnly(string sd, string ed, string uid, string gcode) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((sd == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -24985,7 +24993,7 @@ ORDER BY projectName"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] public virtual int FillPrjName(dsPRJ.JobReportDataTable dataTable, string sd, string ed, string prjname, string gcode) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((sd == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -25022,7 +25030,7 @@ ORDER BY projectName"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsPRJ.JobReportDataTable GetPrjName(string sd, string ed, string prjname, string gcode) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((sd == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -25057,7 +25065,7 @@ ORDER BY projectName"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] public virtual int FillSearch(dsPRJ.JobReportDataTable dataTable, string search, string gcode) { - this.Adapter.SelectCommand = this.CommandCollection[4]; + this.Adapter.SelectCommand = this.CommandCollection[5]; if ((search == null)) { throw new global::System.ArgumentNullException("search"); } @@ -25082,7 +25090,7 @@ ORDER BY projectName"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsPRJ.JobReportDataTable GetSearch(string search, string gcode) { - this.Adapter.SelectCommand = this.CommandCollection[4]; + this.Adapter.SelectCommand = this.CommandCollection[5]; if ((search == null)) { throw new global::System.ArgumentNullException("search"); } @@ -25618,6 +25626,47 @@ ORDER BY projectName"; } return returnValue; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, false)] + public virtual int DeleteImportAll(string sd, string ed, string gcode) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + if ((sd == null)) { + command.Parameters[0].Value = global::System.DBNull.Value; + } + else { + command.Parameters[0].Value = ((string)(sd)); + } + if ((ed == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(ed)); + } + if ((gcode == null)) { + throw new global::System.ArgumentNullException("gcode"); + } + else { + command.Parameters[2].Value = ((string)(gcode)); + } + 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/SubProject/FPJ0000/dsPRJ.xsd b/SubProject/FPJ0000/dsPRJ.xsd index 7c9bc36..acebd9f 100644 --- a/SubProject/FPJ0000/dsPRJ.xsd +++ b/SubProject/FPJ0000/dsPRJ.xsd @@ -921,14 +921,27 @@ SELECT idx, pidx, pdate, uid, requestpart, package, status, type, description, r DELETE FROM JobReport WHERE (pdate BETWEEN @sd AND @ed) AND (wuid = @user) AND (ISNULL(import, 0) = 1) AND (gcode = @gcode) - - - - + + + + + + + + DELETE FROM JobReport +WHERE (pdate BETWEEN @sd AND @ed) AND (ISNULL(import, 0) = 1) AND (gcode = @gcode) + + + + + + + + @@ -2764,7 +2777,7 @@ WHERE (idx = @idx) - + @@ -3031,7 +3044,7 @@ WHERE (idx = @idx) - + @@ -3075,7 +3088,7 @@ WHERE (idx = @idx) - + @@ -3120,7 +3133,7 @@ WHERE (idx = @idx) - + @@ -3236,7 +3249,7 @@ WHERE (idx = @idx) - + @@ -3368,7 +3381,7 @@ WHERE (idx = @idx) - + @@ -3406,7 +3419,7 @@ WHERE (idx = @idx) - + @@ -3522,7 +3535,7 @@ WHERE (idx = @idx) - + @@ -3573,7 +3586,7 @@ WHERE (idx = @idx) - + @@ -3586,7 +3599,7 @@ WHERE (idx = @idx) - + @@ -3758,7 +3771,7 @@ WHERE (idx = @idx) - + @@ -3935,7 +3948,7 @@ WHERE (idx = @idx) - + @@ -3980,7 +3993,7 @@ WHERE (idx = @idx) - + @@ -4057,7 +4070,7 @@ WHERE (idx = @idx) - + @@ -4244,11 +4257,11 @@ WHERE (idx = @idx) - + - + @@ -4387,7 +4400,7 @@ WHERE (idx = @idx) - + @@ -4439,7 +4452,7 @@ WHERE (idx = @idx) - + diff --git a/SubProject/FPJ0000/dsPRJ.xss b/SubProject/FPJ0000/dsPRJ.xss index b3aaec5..00a8f46 100644 --- a/SubProject/FPJ0000/dsPRJ.xss +++ b/SubProject/FPJ0000/dsPRJ.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - +