diff --git a/SubProject/FPJ0000/FPJ0000.csproj b/SubProject/FPJ0000/FPJ0000.csproj index 4f06724..519d199 100644 --- a/SubProject/FPJ0000/FPJ0000.csproj +++ b/SubProject/FPJ0000/FPJ0000.csproj @@ -665,6 +665,7 @@ fProjectConnect.cs + rJobReportType.cs diff --git a/SubProject/FPJ0000/JobReport_/rJobReportType.Designer.cs b/SubProject/FPJ0000/JobReport_/rJobReportType.Designer.cs index 891b77b..a8c0284 100644 --- a/SubProject/FPJ0000/JobReport_/rJobReportType.Designer.cs +++ b/SubProject/FPJ0000/JobReport_/rJobReportType.Designer.cs @@ -53,6 +53,11 @@ this.dts = new System.Windows.Forms.DateTimePicker(); this.btRefresh = new System.Windows.Forms.Button(); this.reportViewer1 = new Microsoft.Reporting.WinForms.ReportViewer(); + this.cmbUser = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.tbProcess = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsReport)).BeginInit(); this.panel1.SuspendLayout(); @@ -71,6 +76,11 @@ // panel1 // this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); + this.panel1.Controls.Add(this.checkBox1); + this.panel1.Controls.Add(this.cmbUser); + this.panel1.Controls.Add(this.label4); + this.panel1.Controls.Add(this.tbProcess); + this.panel1.Controls.Add(this.label1); this.panel1.Controls.Add(this.linkLabel13); this.panel1.Controls.Add(this.linkLabel14); this.panel1.Controls.Add(this.linkLabel9); @@ -323,6 +333,52 @@ this.reportViewer1.Size = new System.Drawing.Size(1114, 641); this.reportViewer1.TabIndex = 8; // + // cmbUser + // + this.cmbUser.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbUser.FormattingEnabled = true; + this.cmbUser.Location = new System.Drawing.Point(598, 32); + this.cmbUser.Name = "cmbUser"; + this.cmbUser.Size = new System.Drawing.Size(180, 20); + this.cmbUser.TabIndex = 31; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(563, 36); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(29, 12); + this.label4.TabIndex = 30; + this.label4.Text = "사원"; + // + // tbProcess + // + this.tbProcess.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.tbProcess.FormattingEnabled = true; + this.tbProcess.Location = new System.Drawing.Point(598, 9); + this.tbProcess.Name = "tbProcess"; + this.tbProcess.Size = new System.Drawing.Size(180, 20); + this.tbProcess.TabIndex = 29; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(564, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(29, 12); + this.label1.TabIndex = 28; + this.label1.Text = "공정"; + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Location = new System.Drawing.Point(786, 33); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(100, 16); + this.checkBox1.TabIndex = 32; + this.checkBox1.Text = "담당자별 분리"; + this.checkBox1.UseVisualStyleBackColor = true; + // // rJobReportType // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); @@ -366,5 +422,10 @@ private System.Windows.Forms.LinkLabel linkLabel14; private Microsoft.Reporting.WinForms.ReportViewer reportViewer1; private System.Windows.Forms.BindingSource bs; + private System.Windows.Forms.ComboBox cmbUser; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox tbProcess; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.CheckBox checkBox1; } } \ No newline at end of file diff --git a/SubProject/FPJ0000/JobReport_/rJobReportType.cs b/SubProject/FPJ0000/JobReport_/rJobReportType.cs index 1951474..c99d457 100644 --- a/SubProject/FPJ0000/JobReport_/rJobReportType.cs +++ b/SubProject/FPJ0000/JobReport_/rJobReportType.cs @@ -24,18 +24,18 @@ namespace FPJ0000.JobReport_ private void rJobReport_Load(object sender, EventArgs e) { - //this.tbProcess.Items.Clear(); - //tbProcess.Items.Add("--전체--"); - //var taProcess = new dsReportTableAdapters.ProcessListTableAdapter(); - //var dtProcessList = taProcess.GetData(FCOMMON.info.Login.gcode); - //foreach (dsReport.ProcessListRow dr in dtProcessList.Rows) - // tbProcess.Items.Add(dr.processs); + this.tbProcess.Items.Clear(); + tbProcess.Items.Add("--전체--"); + var taProcess = new dsReportTableAdapters.ProcessListTableAdapter(); + var dtProcessList = taProcess.GetData(FCOMMON.info.Login.gcode); + foreach (dsReport.ProcessListRow dr in dtProcessList.Rows) + tbProcess.Items.Add(dr.processs); - //this.tbProcess.Text = FCOMMON.info.Login.process; - //if (tbProcess.SelectedIndex < 0) tbProcess.SelectedIndex = 0; + this.tbProcess.Text = FCOMMON.info.Login.process; + if (tbProcess.SelectedIndex < 0) tbProcess.SelectedIndex = 0; - ////사용자 목록을 선택한다 - //UpdateUserList(); + //사용자 목록을 선택한다 + UpdateUserList(); this.Show(); System.Windows.Forms.Application.DoEvents(); @@ -43,41 +43,42 @@ namespace FPJ0000.JobReport_ //this.tbMon.Text = DateTime.Now.ToString("yyyy-MM"); refrehData(); binit = true; + + tbProcess.SelectedIndexChanged += tbProcess_SelectedIndexChanged; } - //void UpdateUserList() - //{ - // var ta = new dsPRJTableAdapters.vJobReportForUserListTableAdapter(); + void UpdateUserList() + { + var ta = new dsPRJTableAdapters.vJobReportForUserListTableAdapter(); - // cmbUser.Items.Clear(); + cmbUser.Items.Clear(); + cmbUser.Items.Add("--전체--"); + //일반사용자 목록 가져온다 + dsPRJ.vJobReportForUserListDataTable userlist; - // //일반사용자 목록 가져온다 - // dsPRJ.vJobReportForUserListDataTable userlist; + if (tbProcess.SelectedIndex <= 0) + { + //공정구분없이 전체사용자를 가져온다 + userlist = ta.GetData(FCOMMON.info.Login.gcode, "%"); + // db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode).OrderBy(t => t.name).GroupBy(t => t.name); + } + else + { + userlist = ta.GetData(FCOMMON.info.Login.gcode, tbProcess.Text); + //db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.userProcess == tbProcess.Text).OrderBy(t => t.name).GroupBy(t => t.name); + } - // if (tbProcess.SelectedIndex <= 0) - // { - // //공정구분없이 전체사용자를 가져온다 - // userlist = ta.GetData(FCOMMON.info.Login.gcode, "%"); - // // db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode).OrderBy(t => t.name).GroupBy(t => t.name); - // } - // else - // { - // userlist = ta.GetData(FCOMMON.info.Login.gcode, tbProcess.Text); - // //db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.userProcess == tbProcess.Text).OrderBy(t => t.name).GroupBy(t => t.name); - // } + //if (tbProcess.SelectedIndex != 0) userlist = userlist.Where(t => t.processs == tbProcess.Text); //해당 공정의 인원만 처리한다 + foreach (var dr in userlist) + { + //var dr = item.First(); + cmbUser.Items.Add(String.Format("[{0}] {1}", dr.id, dr.name)); + } - // //if (tbProcess.SelectedIndex != 0) userlist = userlist.Where(t => t.processs == tbProcess.Text); //해당 공정의 인원만 처리한다 + if (tbProcess.SelectedIndex > 0) + cmbUser.Text = string.Format("[{0}] {1}", FCOMMON.info.Login.no, FCOMMON.info.Login.nameK); - // foreach (var dr in userlist) - // { - // //var dr = item.First(); - // cmbUser.Items.Add(String.Format("[{0}] {1}", dr.id, dr.name)); - // } - - // if (tbProcess.SelectedIndex > 0) - // cmbUser.Text = string.Format("[{0}] {1}", FCOMMON.info.Login.no, FCOMMON.info.Login.nameK); - - // if (cmbUser.SelectedIndex < 0) cmbUser.SelectedIndex = 0; //기본전체로 선택해준다. - //} + if (cmbUser.SelectedIndex < 0) cmbUser.SelectedIndex = 0; //기본전체로 선택해준다. + } void refrehData() { @@ -89,16 +90,22 @@ namespace FPJ0000.JobReport_ //string prcname = tbProcess.SelectedIndex < 1 ? "%" : tbProcess.Text.Trim(); var taH = new dsReportTableAdapters.vJobReportForUserTableAdapter(); - //var username = cmbUser.Text.Trim(); - - //var uid = username.Substring(1, username.IndexOf("]") - 1);// "395552"; + var username = cmbUser.Text.Trim(); var uid = "%"; + if (username.isEmpty() == false && username.StartsWith("--") == false) + uid = username.Substring(1, username.IndexOf("]") - 1);// "395552"; + taH.Fill(this.dsReport.vJobReportForUser, FCOMMON.info.Login.gcode, vSD, vED, uid); //this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout); //this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth; //this.reportViewer1.RefreshReport(); + if (this.checkBox1.Checked) + this.reportViewer1.LocalReport.ReportEmbeddedResource = "FPJ0000.JobReport_.rJobReportTypeU.rdlc"; + else + this.reportViewer1.LocalReport.ReportEmbeddedResource = "FPJ0000.JobReport_.rJobReportType.rdlc"; + this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout); this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth; this.reportViewer1.RefreshReport(); @@ -109,11 +116,11 @@ namespace FPJ0000.JobReport_ refrehData(); } - //private void tbProcess_SelectedIndexChanged(object sender, EventArgs e) - //{ - // if (binit == false) return; - // UpdateUserList(); - //} + private void tbProcess_SelectedIndexChanged(object sender, EventArgs e) + { + if (binit == false) return; + UpdateUserList(); + } private void linkLabel7_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { diff --git a/SubProject/FPJ0000/JobReport_/rJobReportType.rdlc b/SubProject/FPJ0000/JobReport_/rJobReportType.rdlc index 0a06770..180ed23 100644 --- a/SubProject/FPJ0000/JobReport_/rJobReportType.rdlc +++ b/SubProject/FPJ0000/JobReport_/rJobReportType.rdlc @@ -6,13 +6,13 @@ - 4.49792cm + 3.43959cm - 2.5cm + 2.05021cm - 2.5cm + 1.94438cm @@ -200,7 +200,6 @@ 2pt - true @@ -314,7 +313,6 @@ 2pt - true @@ -429,7 +427,6 @@ 2pt - true @@ -484,7 +481,7 @@ - 5cm + 4.365cm true @@ -523,7 +520,6 @@ - After @@ -538,7 +534,7 @@ - 5cm + 4.365cm true @@ -588,7 +584,7 @@ - 5cm + 4.365cm true @@ -624,13 +620,12 @@ - Before DataSet1 2.54938cm - 14.49792cm + 11.79918cm @@ -641,7 +636,7 @@ 1.00369in + + + + + + Textbox17 + + + LightSteelBlue + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 시간(시) + + + + + + + Textbox36 + + + LightSteelBlue + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 비율(%) + + + + + + + Textbox43 + + + LightSteelBlue + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + Textbox7 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox8 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox9 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.71438cm + + + + + true + true + + + + + =Fields!type.Value + + + + + + + type1 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!hrs.Value) + + + + + + + hrs1 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =(Sum(Fields!hrs.Value) / Sum(Fields!hrs.Value, "DataSet1"))*100.0 + + + + + + + Textbox44 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + 소계 + + + + + + + Textbox31 + + + WhiteSmoke + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!hrs.Value) + + + + + + + Textbox38 + + + WhiteSmoke + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =(Sum(Fields!hrs.Value) / Sum(Fields!hrs.Value, "DataSet1"))*100.0 + + + + + + + Textbox45 + + + WhiteSmoke + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + Textbox41 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!hrs.Value) + + + + + + + hrs2 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =(Sum(Fields!hrs.Value) / Sum(Fields!hrs.Value, "DataSet1"))*100.0 + + + + + + + Textbox46 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + 2.07667cm + + + true + true + + + + + 담당자 + + + + + + + Textbox1 + + + LightSteelBlue + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 4.365cm + + + true + true + + + + + 분류 + + + + + + + Textbox19 + + + LightSteelBlue + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + After + + + + + =Fields!name.Value + + + + + =Fields!id.Value + + + + 2.07667cm + + + true + true + + + + + =Fields!name.Value + + + + + + + name + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 4.365cm + + + true + true + + + + + + + + + + + + Textbox6 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + After + + + + =Fields!svalue.Value + + =Fields!svalue.Value + + + + + =Fields!svalue.Value + + + + 4.365cm + + + true + true + + + + + =Fields!svalue.Value + + + + + + + svalue11 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + =Fields!type.Value + + + + + Before + + + + + + + + 2.07667cm + + + true + true + + + + + + + + + + + + Textbox4 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 4.365cm + + + true + true + + + + + 합계 + + + + + + + Textbox40 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + Before + + + + DataSet1 + 3.14938cm + 13.87584cm + + + + + + 1.23991in +