diff --git a/Project/Properties/AssemblyInfo.cs b/Project/Properties/AssemblyInfo.cs index ff70093..3f4bb1b 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("19.05.08.1200")] -[assembly: AssemblyFileVersion("19.05.08.1200")] +[assembly: AssemblyVersion("19.05.09.1000")] +[assembly: AssemblyFileVersion("19.05.09.1000")] diff --git a/SubProject/FCOMMON/DataBaseManager.cs b/SubProject/FCOMMON/DataBaseManager.cs index 493c12d..3e91ab8 100644 --- a/SubProject/FCOMMON/DataBaseManager.cs +++ b/SubProject/FCOMMON/DataBaseManager.cs @@ -296,14 +296,16 @@ namespace FCOMMON var retval = new sItemInfo(); retval.idx = -1; - string sql = "select [id],[name],concat([name],'(',[id],')') as dispName,[dept],[email],[level],[tel] from Users where dept like '%장비기술%' order by [name]"; + string sql = "select [id],[name],concat([name],'(',[id],')') as dispName,[dept],[email],[level],[tel] from Users " + + " where [id] <> 'dev' and dept like '%장비기술%' and dept like '%1파트%' order by [name]"; var cmd = new SqlCommand(sql, cn); var da = new SqlDataAdapter(sql, cn); var ds = new System.Data.DataSet(); da.Fill(ds); cn.Close(); cn.Dispose(); - return ds.Tables[0]; + if (ds.Tables.Count > 0) return ds.Tables[0]; + else return null; } private static Dictionary MakeDataTable(List list) diff --git a/SubProject/FPJ0000/FPJ0000.csproj b/SubProject/FPJ0000/FPJ0000.csproj index f59d44d..bad385e 100644 --- a/SubProject/FPJ0000/FPJ0000.csproj +++ b/SubProject/FPJ0000/FPJ0000.csproj @@ -205,6 +205,12 @@ fLovProject.cs + + Form + + + rJobReportDay.cs + Form @@ -262,6 +268,10 @@ fLovProject.cs + + + rJobReportDay.cs + rJobReport.cs diff --git a/SubProject/FPJ0000/JobReport/fJobReport.Designer.cs b/SubProject/FPJ0000/JobReport/fJobReport.Designer.cs index 1ed0849..d73f80a 100644 --- a/SubProject/FPJ0000/JobReport/fJobReport.Designer.cs +++ b/SubProject/FPJ0000/JobReport/fJobReport.Designer.cs @@ -30,18 +30,18 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fJobReport)); - FarPoint.Win.Spread.CellType.TextCellType textCellType28 = new FarPoint.Win.Spread.CellType.TextCellType(); - FarPoint.Win.Spread.CellType.TextCellType textCellType29 = new FarPoint.Win.Spread.CellType.TextCellType(); - FarPoint.Win.Spread.CellType.TextCellType textCellType30 = new FarPoint.Win.Spread.CellType.TextCellType(); - FarPoint.Win.Spread.CellType.TextCellType textCellType31 = new FarPoint.Win.Spread.CellType.TextCellType(); - FarPoint.Win.Spread.CellType.TextCellType textCellType32 = new FarPoint.Win.Spread.CellType.TextCellType(); - FarPoint.Win.Spread.CellType.TextCellType textCellType33 = new FarPoint.Win.Spread.CellType.TextCellType(); - FarPoint.Win.Spread.CellType.TextCellType textCellType34 = new FarPoint.Win.Spread.CellType.TextCellType(); - FarPoint.Win.Spread.CellType.TextCellType textCellType35 = new FarPoint.Win.Spread.CellType.TextCellType(); - FarPoint.Win.Spread.CellType.NumberCellType numberCellType10 = new FarPoint.Win.Spread.CellType.NumberCellType(); - FarPoint.Win.Spread.CellType.NumberCellType numberCellType11 = new FarPoint.Win.Spread.CellType.NumberCellType(); - FarPoint.Win.Spread.CellType.NumberCellType numberCellType12 = new FarPoint.Win.Spread.CellType.NumberCellType(); - FarPoint.Win.Spread.CellType.TextCellType textCellType36 = new FarPoint.Win.Spread.CellType.TextCellType(); + FarPoint.Win.Spread.CellType.TextCellType textCellType10 = new FarPoint.Win.Spread.CellType.TextCellType(); + FarPoint.Win.Spread.CellType.TextCellType textCellType11 = new FarPoint.Win.Spread.CellType.TextCellType(); + FarPoint.Win.Spread.CellType.TextCellType textCellType12 = new FarPoint.Win.Spread.CellType.TextCellType(); + FarPoint.Win.Spread.CellType.TextCellType textCellType13 = new FarPoint.Win.Spread.CellType.TextCellType(); + FarPoint.Win.Spread.CellType.TextCellType textCellType14 = new FarPoint.Win.Spread.CellType.TextCellType(); + FarPoint.Win.Spread.CellType.TextCellType textCellType15 = new FarPoint.Win.Spread.CellType.TextCellType(); + FarPoint.Win.Spread.CellType.TextCellType textCellType16 = new FarPoint.Win.Spread.CellType.TextCellType(); + FarPoint.Win.Spread.CellType.TextCellType textCellType17 = new FarPoint.Win.Spread.CellType.TextCellType(); + FarPoint.Win.Spread.CellType.NumberCellType numberCellType4 = new FarPoint.Win.Spread.CellType.NumberCellType(); + FarPoint.Win.Spread.CellType.NumberCellType numberCellType5 = new FarPoint.Win.Spread.CellType.NumberCellType(); + FarPoint.Win.Spread.CellType.NumberCellType numberCellType6 = new FarPoint.Win.Spread.CellType.NumberCellType(); + FarPoint.Win.Spread.CellType.TextCellType textCellType18 = new FarPoint.Win.Spread.CellType.TextCellType(); this.bn = new System.Windows.Forms.BindingNavigator(this.components); this.bs = new System.Windows.Forms.BindingSource(this.components); this.dsMSSQL = new FPJ0000.dsPRJ(); @@ -75,6 +75,10 @@ this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); this.partListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator(); + this.복사ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.편집ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.삭제ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.tam = new FPJ0000.dsPRJTableAdapters.TableAdapterManager(); this.ta = new FPJ0000.dsPRJTableAdapters.JobReportTableAdapter(); this.fpSpread1 = new FarPoint.Win.Spread.FpSpread(); @@ -86,16 +90,10 @@ this.dtED = new System.Windows.Forms.ToolStripTextBox(); this.lbTime = new System.Windows.Forms.ToolStripLabel(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); - this.cmbState = new System.Windows.Forms.ToolStripComboBox(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel(); this.cmbUser = new System.Windows.Forms.ToolStripComboBox(); this.btSearch = new System.Windows.Forms.ToolStripButton(); - this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator(); - this.복사ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.편집ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.삭제ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.btReportDay = new System.Windows.Forms.ToolStripButton(); ((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit(); this.bn.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); @@ -132,7 +130,8 @@ this.toolStripLabel2, this.tbFind, this.btFind, - this.btReport}); + this.btReport, + this.btReportDay}); this.bn.Location = new System.Drawing.Point(0, 564); this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem; this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem; @@ -319,7 +318,7 @@ this.편집ToolStripMenuItem, this.삭제ToolStripMenuItem}); this.cm.Name = "contextMenuStrip1"; - this.cm.Size = new System.Drawing.Size(226, 296); + this.cm.Size = new System.Drawing.Size(226, 274); // // columnSizeToolStripMenuItem // @@ -395,6 +394,32 @@ this.partListToolStripMenuItem.Text = "PartList"; this.partListToolStripMenuItem.Click += new System.EventHandler(this.partListToolStripMenuItem_Click); // + // toolStripMenuItem3 + // + this.toolStripMenuItem3.Name = "toolStripMenuItem3"; + this.toolStripMenuItem3.Size = new System.Drawing.Size(222, 6); + // + // 복사ToolStripMenuItem + // + this.복사ToolStripMenuItem.Name = "복사ToolStripMenuItem"; + this.복사ToolStripMenuItem.Size = new System.Drawing.Size(225, 36); + this.복사ToolStripMenuItem.Text = "복사"; + this.복사ToolStripMenuItem.Click += new System.EventHandler(this.복사ToolStripMenuItem_Click); + // + // 편집ToolStripMenuItem + // + this.편집ToolStripMenuItem.Name = "편집ToolStripMenuItem"; + this.편집ToolStripMenuItem.Size = new System.Drawing.Size(225, 36); + this.편집ToolStripMenuItem.Text = "편집"; + this.편집ToolStripMenuItem.Click += new System.EventHandler(this.편집ToolStripMenuItem_Click); + // + // 삭제ToolStripMenuItem + // + this.삭제ToolStripMenuItem.Name = "삭제ToolStripMenuItem"; + this.삭제ToolStripMenuItem.Size = new System.Drawing.Size(225, 36); + this.삭제ToolStripMenuItem.Text = "삭제"; + this.삭제ToolStripMenuItem.Click += new System.EventHandler(this.삭제ToolStripMenuItem_Click); + // // tam // this.tam.BackupDataSetBeforeUpdate = false; @@ -449,68 +474,68 @@ this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 10).Value = "초과"; this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 11).Value = "비고"; this.fpSpread1_Sheet1.ColumnHeader.Rows.Get(0).Height = 28F; - this.fpSpread1_Sheet1.Columns.Get(0).CellType = textCellType28; + this.fpSpread1_Sheet1.Columns.Get(0).CellType = textCellType10; this.fpSpread1_Sheet1.Columns.Get(0).DataField = "pdate"; this.fpSpread1_Sheet1.Columns.Get(0).Label = "날짜"; this.fpSpread1_Sheet1.Columns.Get(0).Width = 58F; this.fpSpread1_Sheet1.Columns.Get(1).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType29; + this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType11; this.fpSpread1_Sheet1.Columns.Get(1).DataField = "ww"; this.fpSpread1_Sheet1.Columns.Get(1).Label = "WW"; this.fpSpread1_Sheet1.Columns.Get(2).AllowAutoFilter = true; - this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType30; + this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType12; this.fpSpread1_Sheet1.Columns.Get(2).DataField = "requestpart"; this.fpSpread1_Sheet1.Columns.Get(2).Label = "요청부서"; this.fpSpread1_Sheet1.Columns.Get(2).Width = 78F; this.fpSpread1_Sheet1.Columns.Get(3).AllowAutoFilter = true; - this.fpSpread1_Sheet1.Columns.Get(3).CellType = textCellType31; + this.fpSpread1_Sheet1.Columns.Get(3).CellType = textCellType13; this.fpSpread1_Sheet1.Columns.Get(3).DataField = "package"; this.fpSpread1_Sheet1.Columns.Get(3).Label = "패키지"; this.fpSpread1_Sheet1.Columns.Get(3).Width = 86F; - this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType32; + this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType14; this.fpSpread1_Sheet1.Columns.Get(4).DataField = "status"; this.fpSpread1_Sheet1.Columns.Get(4).Label = "상태"; this.fpSpread1_Sheet1.Columns.Get(5).AllowAutoFilter = true; - this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType33; + this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType15; this.fpSpread1_Sheet1.Columns.Get(5).DataField = "type"; this.fpSpread1_Sheet1.Columns.Get(5).Label = "업무형태"; this.fpSpread1_Sheet1.Columns.Get(5).Width = 84F; this.fpSpread1_Sheet1.Columns.Get(6).AllowAutoFilter = true; - this.fpSpread1_Sheet1.Columns.Get(6).CellType = textCellType34; + this.fpSpread1_Sheet1.Columns.Get(6).CellType = textCellType16; this.fpSpread1_Sheet1.Columns.Get(6).DataField = "process"; this.fpSpread1_Sheet1.Columns.Get(6).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; this.fpSpread1_Sheet1.Columns.Get(6).Label = "업무분류"; this.fpSpread1_Sheet1.Columns.Get(6).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; this.fpSpread1_Sheet1.Columns.Get(6).Width = 80F; this.fpSpread1_Sheet1.Columns.Get(7).AllowAutoFilter = true; - this.fpSpread1_Sheet1.Columns.Get(7).CellType = textCellType35; + this.fpSpread1_Sheet1.Columns.Get(7).CellType = textCellType17; this.fpSpread1_Sheet1.Columns.Get(7).DataField = "projectName"; this.fpSpread1_Sheet1.Columns.Get(7).Label = "프로젝트(아이템)"; this.fpSpread1_Sheet1.Columns.Get(7).Width = 158F; this.fpSpread1_Sheet1.Columns.Get(8).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - numberCellType10.DecimalPlaces = 0; - numberCellType10.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes; - numberCellType10.MaximumValue = 2147483647D; - numberCellType10.MinimumValue = -2147483648D; - this.fpSpread1_Sheet1.Columns.Get(8).CellType = numberCellType10; + numberCellType4.DecimalPlaces = 0; + numberCellType4.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes; + numberCellType4.MaximumValue = 2147483647D; + numberCellType4.MinimumValue = -2147483648D; + this.fpSpread1_Sheet1.Columns.Get(8).CellType = numberCellType4; this.fpSpread1_Sheet1.Columns.Get(8).DataField = "pidx"; this.fpSpread1_Sheet1.Columns.Get(8).Label = "*"; this.fpSpread1_Sheet1.Columns.Get(8).Width = 39F; - numberCellType11.MaximumValue = 999999999999999D; - numberCellType11.MinimumValue = -999999999999999D; - this.fpSpread1_Sheet1.Columns.Get(9).CellType = numberCellType11; + numberCellType5.MaximumValue = 999999999999999D; + numberCellType5.MinimumValue = -999999999999999D; + this.fpSpread1_Sheet1.Columns.Get(9).CellType = numberCellType5; this.fpSpread1_Sheet1.Columns.Get(9).DataField = "hrs"; this.fpSpread1_Sheet1.Columns.Get(9).Label = "시간"; this.fpSpread1_Sheet1.Columns.Get(9).Width = 52F; - numberCellType12.MaximumValue = 999999999999999D; - numberCellType12.MinimumValue = -999999999999999D; - this.fpSpread1_Sheet1.Columns.Get(10).CellType = numberCellType12; + numberCellType6.MaximumValue = 999999999999999D; + numberCellType6.MinimumValue = -999999999999999D; + this.fpSpread1_Sheet1.Columns.Get(10).CellType = numberCellType6; this.fpSpread1_Sheet1.Columns.Get(10).DataField = "ot"; this.fpSpread1_Sheet1.Columns.Get(10).ForeColor = System.Drawing.Color.Red; this.fpSpread1_Sheet1.Columns.Get(10).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; this.fpSpread1_Sheet1.Columns.Get(10).Label = "초과"; this.fpSpread1_Sheet1.Columns.Get(10).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; - this.fpSpread1_Sheet1.Columns.Get(11).CellType = textCellType36; + this.fpSpread1_Sheet1.Columns.Get(11).CellType = textCellType18; this.fpSpread1_Sheet1.Columns.Get(11).DataField = "description"; this.fpSpread1_Sheet1.Columns.Get(11).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; this.fpSpread1_Sheet1.Columns.Get(11).Label = "비고"; @@ -530,9 +555,6 @@ this.dtED, this.lbTime, this.toolStripSeparator2, - this.toolStripLabel1, - this.cmbState, - this.toolStripSeparator3, this.toolStripLabel3, this.cmbUser, this.btSearch}); @@ -586,23 +608,6 @@ this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); // - // toolStripLabel1 - // - this.toolStripLabel1.Name = "toolStripLabel1"; - this.toolStripLabel1.Size = new System.Drawing.Size(31, 22); - this.toolStripLabel1.Text = "상태"; - // - // cmbState - // - this.cmbState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbState.Name = "cmbState"; - this.cmbState.Size = new System.Drawing.Size(100, 25); - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25); - // // toolStripLabel3 // this.toolStripLabel3.Name = "toolStripLabel3"; @@ -627,31 +632,15 @@ this.btSearch.Text = "조회(&R)"; this.btSearch.Click += new System.EventHandler(this.btSearch_Click); // - // toolStripMenuItem3 + // btReportDay // - this.toolStripMenuItem3.Name = "toolStripMenuItem3"; - this.toolStripMenuItem3.Size = new System.Drawing.Size(222, 6); - // - // 복사ToolStripMenuItem - // - this.복사ToolStripMenuItem.Name = "복사ToolStripMenuItem"; - this.복사ToolStripMenuItem.Size = new System.Drawing.Size(225, 36); - this.복사ToolStripMenuItem.Text = "복사"; - this.복사ToolStripMenuItem.Click += new System.EventHandler(this.복사ToolStripMenuItem_Click); - // - // 편집ToolStripMenuItem - // - this.편집ToolStripMenuItem.Name = "편집ToolStripMenuItem"; - this.편집ToolStripMenuItem.Size = new System.Drawing.Size(225, 36); - this.편집ToolStripMenuItem.Text = "편집"; - this.편집ToolStripMenuItem.Click += new System.EventHandler(this.편집ToolStripMenuItem_Click); - // - // 삭제ToolStripMenuItem - // - this.삭제ToolStripMenuItem.Name = "삭제ToolStripMenuItem"; - this.삭제ToolStripMenuItem.Size = new System.Drawing.Size(225, 36); - this.삭제ToolStripMenuItem.Text = "삭제"; - this.삭제ToolStripMenuItem.Click += new System.EventHandler(this.삭제ToolStripMenuItem_Click); + this.btReportDay.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.btReportDay.Image = ((System.Drawing.Image)(resources.GetObject("btReportDay.Image"))); + this.btReportDay.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btReportDay.Name = "btReportDay"; + this.btReportDay.Size = new System.Drawing.Size(108, 22); + this.btReportDay.Text = "일/개인별 요약"; + this.btReportDay.Click += new System.EventHandler(this.btReportDay_Click); // // fJobReport // @@ -716,9 +705,6 @@ private System.Windows.Forms.ToolStripLabel lbEnd; private System.Windows.Forms.ToolStripTextBox dtED; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; - private System.Windows.Forms.ToolStripLabel toolStripLabel1; - private System.Windows.Forms.ToolStripComboBox cmbState; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; private System.Windows.Forms.ToolStripLabel toolStripLabel3; private System.Windows.Forms.ToolStripButton btSearch; private dsPRJTableAdapters.JobReportTableAdapter ta; @@ -736,5 +722,6 @@ private System.Windows.Forms.ToolStripMenuItem 복사ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 편집ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 삭제ToolStripMenuItem; + private System.Windows.Forms.ToolStripButton btReportDay; } } \ No newline at end of file diff --git a/SubProject/FPJ0000/JobReport/fJobReport.cs b/SubProject/FPJ0000/JobReport/fJobReport.cs index 8280525..9c694d0 100644 --- a/SubProject/FPJ0000/JobReport/fJobReport.cs +++ b/SubProject/FPJ0000/JobReport/fJobReport.cs @@ -35,24 +35,54 @@ namespace FPJ0000 this.dtSD.Text = DateTime.Now.ToString("yyyy-MM-01"); this.dtED.Text = DateTime.Now.ToShortDateString(); - //담당자목록 - var userList = FCOMMON.DBM.getGroupList("name + '(' + id + ')'", "Users", "[level] > 0 and [level] < 10", false, false); - foreach (var user in userList) - { - this.cmbUser.Items.Add(user); - } + //담당자목록 - 사용자목록으로 처리한다. + string namestr = string.Format("{0}({1})", FCOMMON.info.Login.nameK, FCOMMON.info.Login.no); if (FCOMMON.info.Login.no == "dev") namestr = "김치균(395552)"; + + this.cmbUser.Items.Clear(); + this.cmbUser.Items.Add(namestr); + try + { + var cn = FCOMMON.DBM.getCn(); + cn.Open(); + string sql = "select uid,dbo.getUserName(uid) as uname " + + " from JobReport" + + " where uid <> '{0}'" + + " group by uid " + + " order by uname"; + sql = string.Format(sql, FCOMMON.info.Login.no); + var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); + var rdr = cmd.ExecuteReader(); + while (rdr.Read()) + { + string cmbdata = string.Format("{1}({0})", rdr["uid"].ToString(), rdr["uname"].ToString()); + this.cmbUser.Items.Add(cmbdata); + } + cmd.Dispose(); + cn.Close(); + cn.Dispose(); + }catch (Exception ex) + { + FCOMMON.Util.MsgE("User List Error\n\n"+ex.Message); + } + + //var userList = FCOMMON.DBM.getGroupList("name + '(' + id + ')'", "Users", "[level] > 0 and [level] < 10", false, false); + //foreach (var user in userList) + //{ + // this.cmbUser.Items.Add(user); + //} + cmbUser.Text = namestr; //state list - var stList = FCOMMON.DBM.getCodeList("05"); - this.cmbState.Items.Clear(); - cmbState.Items.Add("-- All --"); - // cmbState.Items.Add("-- incomplete --"); - foreach (var item in stList) - cmbState.Items.Add(item); - this.cmbState.SelectedIndex = 0; + //var stList = FCOMMON.DBM.getCodeList("05"); + //this.cmbState.Items.Clear(); + //cmbState.Items.Add("-- All --"); + //// cmbState.Items.Add("-- incomplete --"); + //foreach (var item in stList) + // cmbState.Items.Add(item); + //this.cmbState.SelectedIndex = 0; //일반사용자의경우에는 상태를 변경하지 못한다. @@ -135,8 +165,8 @@ namespace FPJ0000 void refreshData() { - string state = "%"; - if (cmbState.SelectedIndex > 0) state = cmbState.Text.Split(',')[0].Substring(1); + // string state = "%"; + // if (cmbState.SelectedIndex > 0) state = cmbState.Text.Split(',')[0].Substring(1); //사용자번호추적 if (cmbUser.Text.Trim() == "") @@ -306,6 +336,11 @@ namespace FPJ0000 var drv = this.bs.Current as DataRowView; if (drv == null) return; var dr = drv.Row as dsPRJ.JobReportRow; + if(dr.uid != FCOMMON.info.Login.no && FCOMMON.info.Login.level<5) + { + FCOMMON.Util.MsgE("타인의 자료는 추가/변경/삭제 할 수 없습니다."); + return; + } var f = new JobReport.fJobReport_Add(dr); if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) @@ -336,7 +371,7 @@ namespace FPJ0000 private void btCopy_Click(object sender, EventArgs e) { - + funcCopy(); //190509 } void funcCopy() { @@ -349,7 +384,9 @@ namespace FPJ0000 FCOMMON.Util.CopyData((System.Data.DataRow)dr, (System.Data.DataRow)newdr); newdr.wdate = DateTime.Now; newdr.wuid = FCOMMON.info.Login.no; + newdr.uid = FCOMMON.info.Login.no; newdr.description = ""; + newdr.pdate = DateTime.Now.ToShortDateString(); //190509 newdr.idx = -1; newdr.hrs = 8.0; newdr.ot = 0.0; @@ -374,14 +411,20 @@ namespace FPJ0000 { var drv = this.bs.Current as DataRowView; if (drv == null) return; - var dlg = FCOMMON.Util.MsgQ("현재 선택된 자료를 삭제하시겠습니까?"); var dr = drv.Row as dsPRJ.JobReportRow; + if (dr.uid != FCOMMON.info.Login.no && FCOMMON.info.Login.level < 5) + { + FCOMMON.Util.MsgE("타인의 자료는 추가/변경/삭제 할 수 없습니다."); + return; + } + + var dlg = FCOMMON.Util.MsgQ("현재 선택된 자료를 삭제하시겠습니까?"); + if (dlg != System.Windows.Forms.DialogResult.Yes) return; + dr.Delete(); try { this.ta.Update(dr); - //dr.AcceptChanges(); - //FCOMMON.Util.MsgI("삭제 완료"); } catch (Exception ex) { @@ -429,5 +472,11 @@ namespace FPJ0000 funcDelete(); } + private void btReportDay_Click(object sender, EventArgs e) + { + var f = new JobReport.rJobReportDay(); + f.Show(); + } + } } diff --git a/SubProject/FPJ0000/JobReport/fJobReport.resx b/SubProject/FPJ0000/JobReport/fJobReport.resx index c435bb1..470ad20 100644 --- a/SubProject/FPJ0000/JobReport/fJobReport.resx +++ b/SubProject/FPJ0000/JobReport/fJobReport.resx @@ -222,6 +222,17 @@ hB/a9r+CVAG4Auj5g7iA5/1NACaptgIVLHkb0wWVw13ZL60p2+uerqkCJs1mMgwUU6d1k/xJwI10RZj1 9TPUN7Wam9dgTMC75QR7TjCBkRQs5Jd1jQS8c1ewtZLTPcQW/peADpC44cudgnjZOQ1OCGjTwkwaGBon GoSrpcVIQqmAj6LZftFBup9vWiUlUQdIDCbsQrsGZRJKBbOXyA++SlEsu6QjvQAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVDhPnZIxS8NQFEb7W/wLjh0Fl9a1SxBHBekkWFd1 + qYg4Ci5dndSCg2AHl4LQSaRSKDqoFUE7VAjUmvTKueWmL2mw2gunL7zmO+/mJhmZoTJusdF868vpXUfO + b5/lpPEox9f3SvnsRtk8uojxHQ7HEgSEkXS6vrz3xqtdu+xdfUiheEBsJOGCk/mz/hROUHsIIrp+qIKY + hB/a9r+CVAG4Auj5g7iA5/1NACaptgIVLHkb0wWVw13ZL60p2+uerqkCJs1mMgwUU6d1k/xJwI10RZj1 + 9TPUN7Wam9dgTMC75QR7TjCBkRQs5Jd1jQS8c1ewtZLTPcQW/peADpC44cudgnjZOQ1OCGjTwkwaGBon + GoSrpcVIQqmAj6LZftFBup9vWiUlUQdIDCbsQrsGZRJKBbOXyA++SlEsu6QjvQAAAABJRU5ErkJggg== diff --git a/SubProject/FPJ0000/JobReport/rJobReport.Designer.cs b/SubProject/FPJ0000/JobReport/rJobReport.Designer.cs index ed96871..26e3b70 100644 --- a/SubProject/FPJ0000/JobReport/rJobReport.Designer.cs +++ b/SubProject/FPJ0000/JobReport/rJobReport.Designer.cs @@ -30,14 +30,24 @@ { this.components = new System.ComponentModel.Container(); Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource(); - this.reportViewer1 = new Microsoft.Reporting.WinForms.ReportViewer(); - this.dsReport = new FPJ0000.dsReport(); this.bs = new System.Windows.Forms.BindingSource(this.components); + this.dsReport = new FPJ0000.dsReport(); + this.reportViewer1 = new Microsoft.Reporting.WinForms.ReportViewer(); this.ta = new FPJ0000.dsReportTableAdapters.jobReportTableAdapter(); - ((System.ComponentModel.ISupportInitialize)(this.dsReport)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dsReport)).BeginInit(); this.SuspendLayout(); // + // bs + // + this.bs.DataMember = "jobreport"; + this.bs.DataSource = this.dsReport; + // + // dsReport + // + this.dsReport.DataSetName = "dsReport"; + this.dsReport.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; + // // reportViewer1 // this.reportViewer1.Dock = System.Windows.Forms.DockStyle.Fill; @@ -50,16 +60,6 @@ this.reportViewer1.Size = new System.Drawing.Size(721, 586); this.reportViewer1.TabIndex = 0; // - // dsReport - // - this.dsReport.DataSetName = "dsReport"; - this.dsReport.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; - // - // bs - // - this.bs.DataMember = "jobreport"; - this.bs.DataSource = this.dsReport; - // // ta // this.ta.ClearBeforeFill = true; @@ -71,10 +71,10 @@ this.ClientSize = new System.Drawing.Size(721, 586); this.Controls.Add(this.reportViewer1); this.Name = "rJobReport"; - this.Text = "rJobReport"; + this.Text = "월/개인별 근무시간 내역 집계"; this.Load += new System.EventHandler(this.rJobReport_Load); - ((System.ComponentModel.ISupportInitialize)(this.dsReport)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dsReport)).EndInit(); this.ResumeLayout(false); } diff --git a/SubProject/FPJ0000/JobReport/rJobReportDay.Designer.cs b/SubProject/FPJ0000/JobReport/rJobReportDay.Designer.cs new file mode 100644 index 0000000..92dc66d --- /dev/null +++ b/SubProject/FPJ0000/JobReport/rJobReportDay.Designer.cs @@ -0,0 +1,143 @@ +namespace FPJ0000.JobReport +{ + partial class rJobReportDay + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + Microsoft.Reporting.WinForms.ReportDataSource reportDataSource2 = new Microsoft.Reporting.WinForms.ReportDataSource(); + this.bs = new System.Windows.Forms.BindingSource(this.components); + this.dsReport = new FPJ0000.dsReport(); + this.reportViewer1 = new Microsoft.Reporting.WinForms.ReportViewer(); + this.panel1 = new System.Windows.Forms.Panel(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.btRefresh = new System.Windows.Forms.Button(); + this.tbMon = new System.Windows.Forms.TextBox(); + this.ta = new FPJ0000.dsReportTableAdapters.JobReportDayTableAdapter(); + ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dsReport)).BeginInit(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // bs + // + this.bs.DataMember = "JobReportDay"; + this.bs.DataSource = this.dsReport; + // + // dsReport + // + this.dsReport.DataSetName = "dsReport"; + this.dsReport.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; + // + // reportViewer1 + // + this.reportViewer1.Dock = System.Windows.Forms.DockStyle.Fill; + reportDataSource2.Name = "DataSet1"; + reportDataSource2.Value = this.bs; + this.reportViewer1.LocalReport.DataSources.Add(reportDataSource2); + this.reportViewer1.LocalReport.ReportEmbeddedResource = "FPJ0000.JobReport.rJobReportDay.rdlc"; + this.reportViewer1.Location = new System.Drawing.Point(0, 42); + this.reportViewer1.Name = "reportViewer1"; + this.reportViewer1.Size = new System.Drawing.Size(721, 544); + this.reportViewer1.TabIndex = 1; + // + // panel1 + // + this.panel1.Controls.Add(this.linkLabel1); + this.panel1.Controls.Add(this.btRefresh); + this.panel1.Controls.Add(this.tbMon); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Padding = new System.Windows.Forms.Padding(5); + this.panel1.Size = new System.Drawing.Size(721, 42); + this.panel1.TabIndex = 0; + // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Location = new System.Drawing.Point(13, 15); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(45, 12); + this.linkLabel1.TabIndex = 0; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "조회 월"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // btRefresh + // + this.btRefresh.Dock = System.Windows.Forms.DockStyle.Right; + this.btRefresh.Location = new System.Drawing.Point(641, 5); + this.btRefresh.Name = "btRefresh"; + this.btRefresh.Size = new System.Drawing.Size(75, 32); + this.btRefresh.TabIndex = 2; + this.btRefresh.Text = "새로고침"; + this.btRefresh.UseVisualStyleBackColor = true; + this.btRefresh.Click += new System.EventHandler(this.button1_Click); + // + // tbMon + // + this.tbMon.Location = new System.Drawing.Point(66, 10); + this.tbMon.Name = "tbMon"; + this.tbMon.Size = new System.Drawing.Size(100, 21); + this.tbMon.TabIndex = 1; + this.tbMon.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // ta + // + this.ta.ClearBeforeFill = true; + // + // rJobReportDay + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(721, 586); + this.Controls.Add(this.reportViewer1); + this.Controls.Add(this.panel1); + this.Name = "rJobReportDay"; + this.Text = "일/개인별 근무시간 집계"; + this.Load += new System.EventHandler(this.rJobReport_Load); + ((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dsReport)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Microsoft.Reporting.WinForms.ReportViewer reportViewer1; + private dsReport dsReport; + private System.Windows.Forms.BindingSource bs; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btRefresh; + private System.Windows.Forms.TextBox tbMon; + private System.Windows.Forms.LinkLabel linkLabel1; + private dsReportTableAdapters.JobReportDayTableAdapter ta; + } +} \ No newline at end of file diff --git a/SubProject/FPJ0000/JobReport/rJobReportDay.cs b/SubProject/FPJ0000/JobReport/rJobReportDay.cs new file mode 100644 index 0000000..0b3dc27 --- /dev/null +++ b/SubProject/FPJ0000/JobReport/rJobReportDay.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace FPJ0000.JobReport +{ + public partial class rJobReportDay : Form + { + public rJobReportDay() + { + InitializeComponent(); + this.WindowState = FormWindowState.Maximized; + } + + private void rJobReport_Load(object sender, EventArgs e) + { + this.tbMon.Text = DateTime.Now.ToString("yyyy-MM"); + refrehData(); + } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + var f = new FCOMMON.fSelectMonth(); + if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; + this.tbMon.Text = string.Format("{0:0000}-{1:00}", DateTime.Now.Year, f.selectmon); + refrehData(); + + } + void refrehData() + { + this.ta.Fill(this.dsReport.JobReportDay, tbMon.Text); + this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout); + this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth; + this.reportViewer1.RefreshReport(); + } + private void button1_Click(object sender, EventArgs e) + { + refrehData(); + } + } +} diff --git a/SubProject/FPJ0000/JobReport/rJobReportDay.rdlc b/SubProject/FPJ0000/JobReport/rJobReportDay.rdlc new file mode 100644 index 0000000..66a1483 --- /dev/null +++ b/SubProject/FPJ0000/JobReport/rJobReportDay.rdlc @@ -0,0 +1,489 @@ + + + + + + + + + + + + true + true + + + + + 사원명 + + + + + + + Textbox3 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 0.85958cm + + + 1.12417cm + + + + + 0.6cm + + + + + true + true + + + + + =Sum(Fields!hrs.Value) + + + + + + + hrs + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!hrs.Value) + + + + + + + Textbox8 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Sum(Fields!hrs.Value) + + + + + + + Textbox6 + + true + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!hrs.Value) + + + + + + + Textbox9 + + true + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + =Fields!pdate.Value + + + + + =Fields!pdate.Value + + + + 0.6cm + + + true + true + + + + + =right(Fields!pdate.Value,2) + + + + + + + pdate + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 0.6cm + + + true + true + + + + + 합계 + + + + + + + Textbox7 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + =Fields!uname.Value + + + + + =Fields!uname.Value + + + + 1.49458cm + + + true + true + + + + + =Fields!uname.Value + + + + + + + uname + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 1.49458cm + + + true + true + + + + + 합계 + + + + + + + Textbox5 + + true + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + + Before + + + + DataSet1 + 1.8cm + 3.47833cm + + + + + + 0.70866in +