업무일지 리포트 추가

This commit is contained in:
chikyun.kim
2019-05-07 14:11:57 +09:00
parent 1b487e8c5d
commit a9888ebf39
60 changed files with 8953 additions and 10776 deletions

View File

@@ -30,23 +30,22 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fJobReport));
FarPoint.Win.Spread.CellType.TextCellType textCellType1 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType2 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType3 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType4 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType5 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType6 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType7 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType8 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType9 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType2 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType10 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType19 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType20 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType21 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType22 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType23 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType24 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType25 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType26 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType7 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType8 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType9 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType27 = 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();
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
@@ -55,15 +54,23 @@
this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
this.projectsBindingNavigatorSaveItem = new System.Windows.Forms.ToolStripButton();
this.btAdd = new System.Windows.Forms.ToolStripButton();
this.btCopy = new System.Windows.Forms.ToolStripButton();
this.btEdit = new System.Windows.Forms.ToolStripButton();
this.btDel = new System.Windows.Forms.ToolStripButton();
this.btSave = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
this.tbFind = new System.Windows.Forms.ToolStripTextBox();
this.btFind = new System.Windows.Forms.ToolStripButton();
this.btReport = new System.Windows.Forms.ToolStripButton();
this.cm = new System.Windows.Forms.ContextMenuStrip(this.components);
this.columnSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.autoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.resetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
@@ -71,6 +78,7 @@
this.tam = new FPJ0000.dsPRJTableAdapters.TableAdapterManager();
this.ta = new FPJ0000.dsPRJTableAdapters.JobReportTableAdapter();
this.fpSpread1 = new FarPoint.Win.Spread.FpSpread();
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.lbStt = new System.Windows.Forms.ToolStripLabel();
this.dtSD = new System.Windows.Forms.ToolStripTextBox();
@@ -81,17 +89,17 @@
this.cmbState = new System.Windows.Forms.ToolStripComboBox();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel();
this.tbRequest = new System.Windows.Forms.ToolStripTextBox();
this.cmbUser = new System.Windows.Forms.ToolStripComboBox();
this.btSearch = new System.Windows.Forms.ToolStripButton();
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
this.lbTime = new System.Windows.Forms.ToolStripLabel();
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
this.bn.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).BeginInit();
this.cm.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).BeginInit();
this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).BeginInit();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// bn
@@ -99,7 +107,7 @@
this.bn.AddNewItem = null;
this.bn.BindingSource = this.bs;
this.bn.CountItem = this.bindingNavigatorCountItem;
this.bn.DeleteItem = this.bindingNavigatorDeleteItem;
this.bn.DeleteItem = null;
this.bn.Dock = System.Windows.Forms.DockStyle.Bottom;
this.bn.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.bindingNavigatorMoveFirstItem,
@@ -111,10 +119,16 @@
this.bindingNavigatorMoveNextItem,
this.bindingNavigatorMoveLastItem,
this.bindingNavigatorSeparator2,
this.bindingNavigatorAddNewItem,
this.bindingNavigatorDeleteItem,
this.projectsBindingNavigatorSaveItem,
this.toolStripSeparator1});
this.btAdd,
this.btCopy,
this.btEdit,
this.btDel,
this.btSave,
this.toolStripSeparator1,
this.toolStripLabel2,
this.tbFind,
this.btFind,
this.btReport});
this.bn.Location = new System.Drawing.Point(0, 564);
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
@@ -130,6 +144,7 @@
//
this.bs.DataMember = "JobReport";
this.bs.DataSource = this.dsMSSQL;
this.bs.Sort = "pdate desc";
//
// dsMSSQL
//
@@ -143,14 +158,6 @@
this.bindingNavigatorCountItem.Text = "/{0}";
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
//
// bindingNavigatorDeleteItem
//
this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(78, 22);
this.bindingNavigatorDeleteItem.Text = "Delete(&D)";
//
// bindingNavigatorMoveFirstItem
//
this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@@ -211,39 +218,100 @@
this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
//
// bindingNavigatorAddNewItem
// btAdd
//
this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(65, 22);
this.bindingNavigatorAddNewItem.Text = "Add(&A)";
this.bindingNavigatorAddNewItem.Click += new System.EventHandler(this.bindingNavigatorAddNewItem_Click);
this.btAdd.Image = ((System.Drawing.Image)(resources.GetObject("btAdd.Image")));
this.btAdd.Name = "btAdd";
this.btAdd.RightToLeftAutoMirrorImage = true;
this.btAdd.Size = new System.Drawing.Size(67, 22);
this.btAdd.Text = "추가(&A)";
this.btAdd.Click += new System.EventHandler(this.bindingNavigatorAddNewItem_Click);
//
// projectsBindingNavigatorSaveItem
// btCopy
//
this.projectsBindingNavigatorSaveItem.Image = ((System.Drawing.Image)(resources.GetObject("projectsBindingNavigatorSaveItem.Image")));
this.projectsBindingNavigatorSaveItem.Name = "projectsBindingNavigatorSaveItem";
this.projectsBindingNavigatorSaveItem.Size = new System.Drawing.Size(67, 22);
this.projectsBindingNavigatorSaveItem.Text = "Save(&S)";
this.projectsBindingNavigatorSaveItem.Click += new System.EventHandler(this.projectsBindingNavigatorSaveItem_Click);
this.btCopy.Image = global::FPJ0000.Properties.Resources.copy;
this.btCopy.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btCopy.Name = "btCopy";
this.btCopy.Size = new System.Drawing.Size(67, 22);
this.btCopy.Text = "복사(&C)";
this.btCopy.Click += new System.EventHandler(this.btCopy_Click);
//
// btEdit
//
this.btEdit.Image = ((System.Drawing.Image)(resources.GetObject("btEdit.Image")));
this.btEdit.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btEdit.Name = "btEdit";
this.btEdit.Size = new System.Drawing.Size(65, 22);
this.btEdit.Text = "편집(&E)";
this.btEdit.Click += new System.EventHandler(this.btEdit_Click);
//
// btDel
//
this.btDel.Image = ((System.Drawing.Image)(resources.GetObject("btDel.Image")));
this.btDel.Name = "btDel";
this.btDel.RightToLeftAutoMirrorImage = true;
this.btDel.Size = new System.Drawing.Size(68, 22);
this.btDel.Text = "삭제(&D)";
this.btDel.Click += new System.EventHandler(this.btDel_Click);
//
// btSave
//
this.btSave.Image = global::FPJ0000.Properties.Resources.action_save;
this.btSave.Name = "btSave";
this.btSave.Size = new System.Drawing.Size(66, 22);
this.btSave.Text = "저장(&S)";
this.btSave.Click += new System.EventHandler(this.projectsBindingNavigatorSaveItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// toolStripLabel2
//
this.toolStripLabel2.Name = "toolStripLabel2";
this.toolStripLabel2.Size = new System.Drawing.Size(31, 22);
this.toolStripLabel2.Text = "검색";
//
// tbFind
//
this.tbFind.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbFind.Name = "tbFind";
this.tbFind.Size = new System.Drawing.Size(100, 25);
this.tbFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbFind_KeyDown);
//
// btFind
//
this.btFind.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.btFind.Image = ((System.Drawing.Image)(resources.GetObject("btFind.Image")));
this.btFind.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btFind.Name = "btFind";
this.btFind.Size = new System.Drawing.Size(23, 22);
this.btFind.Text = "toolStripButton2";
this.btFind.Click += new System.EventHandler(this.btFind_Click);
//
// btReport
//
this.btReport.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.btReport.Image = ((System.Drawing.Image)(resources.GetObject("btReport.Image")));
this.btReport.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btReport.Name = "btReport";
this.btReport.Size = new System.Drawing.Size(108, 22);
this.btReport.Text = "월/개인별 요약";
this.btReport.Click += new System.EventHandler(this.btReport_Click);
//
// cm
//
this.cm.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.cm.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.columnSizeToolStripMenuItem,
this.exportListToolStripMenuItem,
this.toolStripMenuItem2,
this.refreshToolStripMenuItem,
this.toolStripMenuItem1,
this.partListToolStripMenuItem});
this.cm.Name = "contextMenuStrip1";
this.cm.Size = new System.Drawing.Size(226, 124);
this.cm.Size = new System.Drawing.Size(226, 160);
//
// columnSizeToolStripMenuItem
//
@@ -288,6 +356,13 @@
this.loadToolStripMenuItem.Text = "Load";
this.loadToolStripMenuItem.Click += new System.EventHandler(this.loadToolStripMenuItem_Click);
//
// exportListToolStripMenuItem
//
this.exportListToolStripMenuItem.Name = "exportListToolStripMenuItem";
this.exportListToolStripMenuItem.Size = new System.Drawing.Size(225, 36);
this.exportListToolStripMenuItem.Text = "Export List";
this.exportListToolStripMenuItem.Click += new System.EventHandler(this.exportListToolStripMenuItem_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
@@ -331,6 +406,7 @@
// fpSpread1
//
this.fpSpread1.AccessibleDescription = "";
this.fpSpread1.AutoFitColumnOptions = FarPoint.Win.Spread.PreferredSizeColumnOptions.Off;
this.fpSpread1.ContextMenuStrip = this.cm;
this.fpSpread1.Dock = System.Windows.Forms.DockStyle.Fill;
this.fpSpread1.Font = new System.Drawing.Font("맑은 고딕", 9F);
@@ -339,8 +415,104 @@
this.fpSpread1.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] {
this.fpSpread1_Sheet1});
this.fpSpread1.Size = new System.Drawing.Size(1142, 539);
this.fpSpread1.StatusBarVisible = true;
this.fpSpread1.TabIndex = 2;
//
// fpSpread1_Sheet1
//
this.fpSpread1_Sheet1.Reset();
this.fpSpread1_Sheet1.SheetName = "Sheet1";
// Formulas and custom names must be loaded with R1C1 reference style
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1;
this.fpSpread1_Sheet1.ColumnCount = 12;
this.fpSpread1_Sheet1.ActiveColumnIndex = -1;
this.fpSpread1_Sheet1.ActiveRowIndex = -1;
this.fpSpread1_Sheet1.AutoGenerateColumns = false;
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 0).Value = "날짜";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 1).Value = "WW";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 2).Value = "요청부서";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 3).Value = "패키지";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 4).Value = "상태";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 5).Value = "업무형태";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 6).Value = "업무분류";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 7).Value = "프로젝트(아이템)";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 8).Value = "*";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 9).Value = "시간";
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 = textCellType19;
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 = textCellType20;
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 = textCellType21;
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 = textCellType22;
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 = textCellType23;
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 = textCellType24;
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 = textCellType25;
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 = textCellType26;
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)))));
numberCellType7.DecimalPlaces = 0;
numberCellType7.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
numberCellType7.MaximumValue = 2147483647D;
numberCellType7.MinimumValue = -2147483648D;
this.fpSpread1_Sheet1.Columns.Get(8).CellType = numberCellType7;
this.fpSpread1_Sheet1.Columns.Get(8).DataField = "pidx";
this.fpSpread1_Sheet1.Columns.Get(8).Label = "*";
this.fpSpread1_Sheet1.Columns.Get(8).Width = 39F;
numberCellType8.MaximumValue = 999999999999999D;
numberCellType8.MinimumValue = -999999999999999D;
this.fpSpread1_Sheet1.Columns.Get(9).CellType = numberCellType8;
this.fpSpread1_Sheet1.Columns.Get(9).DataField = "hrs";
this.fpSpread1_Sheet1.Columns.Get(9).Label = "시간";
this.fpSpread1_Sheet1.Columns.Get(9).Width = 52F;
numberCellType9.MaximumValue = 999999999999999D;
numberCellType9.MinimumValue = -999999999999999D;
this.fpSpread1_Sheet1.Columns.Get(10).CellType = numberCellType9;
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 = textCellType27;
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 = "비고";
this.fpSpread1_Sheet1.Columns.Get(11).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(11).Width = 113F;
this.fpSpread1_Sheet1.DataAutoSizeColumns = false;
this.fpSpread1_Sheet1.DataSource = this.bs;
this.fpSpread1_Sheet1.RowHeader.Columns.Default.Resizable = false;
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1;
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -348,12 +520,13 @@
this.dtSD,
this.lbEnd,
this.dtED,
this.lbTime,
this.toolStripSeparator2,
this.toolStripLabel1,
this.cmbState,
this.toolStripSeparator3,
this.toolStripLabel3,
this.tbRequest,
this.cmbUser,
this.btSearch});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
@@ -363,14 +536,18 @@
//
// lbStt
//
this.lbStt.Font = new System.Drawing.Font("맑은 고딕", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.lbStt.ForeColor = System.Drawing.Color.Blue;
this.lbStt.Name = "lbStt";
this.lbStt.Size = new System.Drawing.Size(41, 22);
this.lbStt.Text = "Period";
this.lbStt.Size = new System.Drawing.Size(31, 22);
this.lbStt.Text = "기간";
this.lbStt.Click += new System.EventHandler(this.lbStt_Click);
//
// dtSD
//
this.dtSD.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dtSD.Name = "dtSD";
this.dtSD.ReadOnly = true;
this.dtSD.Size = new System.Drawing.Size(90, 25);
this.dtSD.Text = "1982-11-23";
this.dtSD.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center;
@@ -385,6 +562,7 @@
//
this.dtED.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.dtED.Name = "dtED";
this.dtED.ReadOnly = true;
this.dtED.Size = new System.Drawing.Size(90, 25);
this.dtED.Text = "1982-11-23";
this.dtED.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center;
@@ -397,8 +575,8 @@
// toolStripLabel1
//
this.toolStripLabel1.Name = "toolStripLabel1";
this.toolStripLabel1.Size = new System.Drawing.Size(32, 22);
this.toolStripLabel1.Text = "Type";
this.toolStripLabel1.Size = new System.Drawing.Size(31, 22);
this.toolStripLabel1.Text = "상태";
//
// cmbState
//
@@ -414,104 +592,32 @@
// toolStripLabel3
//
this.toolStripLabel3.Name = "toolStripLabel3";
this.toolStripLabel3.Size = new System.Drawing.Size(66, 22);
this.toolStripLabel3.Text = "User Name";
this.toolStripLabel3.Size = new System.Drawing.Size(43, 22);
this.toolStripLabel3.Text = "사용자";
this.toolStripLabel3.Click += new System.EventHandler(this.toolStripLabel3_Click);
//
// tbRequest
// cmbUser
//
this.tbRequest.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbRequest.Name = "tbRequest";
this.tbRequest.Size = new System.Drawing.Size(70, 25);
this.tbRequest.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.cmbUser.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbUser.Name = "cmbUser";
this.cmbUser.Size = new System.Drawing.Size(120, 25);
this.cmbUser.SelectedIndexChanged += new System.EventHandler(this.cmbUser_SelectedIndexChanged);
this.cmbUser.Click += new System.EventHandler(this.cmbUser_Click);
//
// btSearch
//
this.btSearch.Image = ((System.Drawing.Image)(resources.GetObject("btSearch.Image")));
this.btSearch.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btSearch.Name = "btSearch";
this.btSearch.Size = new System.Drawing.Size(81, 22);
this.btSearch.Text = "Refresh(&R)";
this.btSearch.Size = new System.Drawing.Size(66, 22);
this.btSearch.Text = "조회(&R)";
this.btSearch.Click += new System.EventHandler(this.btSearch_Click);
//
// fpSpread1_Sheet1
// lbTime
//
this.fpSpread1_Sheet1.Reset();
this.fpSpread1_Sheet1.SheetName = "Sheet1";
// Formulas and custom names must be loaded with R1C1 reference style
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1;
this.fpSpread1_Sheet1.ColumnCount = 12;
this.fpSpread1_Sheet1.ActiveColumnIndex = -1;
this.fpSpread1_Sheet1.ActiveRowIndex = -1;
this.fpSpread1_Sheet1.AutoGenerateColumns = false;
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 0).Value = "담당자";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 1).Value = "날짜";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 2).Value = "WW";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 3).Value = "요일";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 4).Value = "요청부서";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 5).Value = "적용패키지";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 6).Value = "상태";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 7).Value = "TYPE";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 8).Value = "Project";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 9).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).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.fpSpread1_Sheet1.Columns.Get(0).CellType = textCellType1;
this.fpSpread1_Sheet1.Columns.Get(0).DataField = "username";
this.fpSpread1_Sheet1.Columns.Get(0).Label = "담당자";
this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType2;
this.fpSpread1_Sheet1.Columns.Get(1).DataField = "pdate";
this.fpSpread1_Sheet1.Columns.Get(1).Label = "날짜";
this.fpSpread1_Sheet1.Columns.Get(1).Width = 58F;
this.fpSpread1_Sheet1.Columns.Get(2).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType3;
this.fpSpread1_Sheet1.Columns.Get(2).DataField = "ww";
this.fpSpread1_Sheet1.Columns.Get(2).Label = "WW";
this.fpSpread1_Sheet1.Columns.Get(3).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.fpSpread1_Sheet1.Columns.Get(3).CellType = textCellType4;
this.fpSpread1_Sheet1.Columns.Get(3).DataField = "week";
this.fpSpread1_Sheet1.Columns.Get(3).Label = "요일";
this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType5;
this.fpSpread1_Sheet1.Columns.Get(4).DataField = "requestpart";
this.fpSpread1_Sheet1.Columns.Get(4).Label = "요청부서";
this.fpSpread1_Sheet1.Columns.Get(4).Width = 78F;
this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType6;
this.fpSpread1_Sheet1.Columns.Get(5).DataField = "requestpart";
this.fpSpread1_Sheet1.Columns.Get(5).Label = "적용패키지";
this.fpSpread1_Sheet1.Columns.Get(5).Width = 78F;
this.fpSpread1_Sheet1.Columns.Get(6).CellType = textCellType7;
this.fpSpread1_Sheet1.Columns.Get(6).DataField = "status";
this.fpSpread1_Sheet1.Columns.Get(6).Label = "상태";
this.fpSpread1_Sheet1.Columns.Get(7).CellType = textCellType8;
this.fpSpread1_Sheet1.Columns.Get(7).DataField = "type";
this.fpSpread1_Sheet1.Columns.Get(7).Label = "TYPE";
this.fpSpread1_Sheet1.Columns.Get(8).CellType = textCellType9;
this.fpSpread1_Sheet1.Columns.Get(8).DataField = "project";
this.fpSpread1_Sheet1.Columns.Get(8).Label = "Project";
this.fpSpread1_Sheet1.Columns.Get(8).Width = 109F;
this.fpSpread1_Sheet1.Columns.Get(9).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
numberCellType1.DecimalPlaces = 0;
numberCellType1.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
numberCellType1.MaximumValue = 2147483647D;
numberCellType1.MinimumValue = -2147483648D;
this.fpSpread1_Sheet1.Columns.Get(9).CellType = numberCellType1;
this.fpSpread1_Sheet1.Columns.Get(9).DataField = "projectidx";
this.fpSpread1_Sheet1.Columns.Get(9).Label = "*";
this.fpSpread1_Sheet1.Columns.Get(9).Width = 88F;
numberCellType2.MaximumValue = 999999999999999D;
numberCellType2.MinimumValue = -999999999999999D;
this.fpSpread1_Sheet1.Columns.Get(10).CellType = numberCellType2;
this.fpSpread1_Sheet1.Columns.Get(10).DataField = "hrs";
this.fpSpread1_Sheet1.Columns.Get(10).Width = 25F;
this.fpSpread1_Sheet1.Columns.Get(11).CellType = textCellType10;
this.fpSpread1_Sheet1.Columns.Get(11).DataField = "remark";
this.fpSpread1_Sheet1.Columns.Get(11).Label = "비고";
this.fpSpread1_Sheet1.Columns.Get(11).Width = 113F;
this.fpSpread1_Sheet1.DataAutoSizeColumns = false;
this.fpSpread1_Sheet1.DataSource = this.bs;
this.fpSpread1_Sheet1.RowHeader.Columns.Default.Resizable = false;
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1;
this.lbTime.Name = "lbTime";
this.lbTime.Size = new System.Drawing.Size(29, 22);
this.lbTime.Text = "{0}h";
//
// fJobReport
//
@@ -523,7 +629,7 @@
this.Controls.Add(this.bn);
this.Name = "fJobReport";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "JobReport";
this.Text = "업무일지";
this.Load += new System.EventHandler(this.@__Load);
((System.ComponentModel.ISupportInitialize)(this.bn)).EndInit();
this.bn.ResumeLayout(false);
@@ -532,9 +638,9 @@
((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).EndInit();
this.cm.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).EndInit();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -546,9 +652,9 @@
private System.Windows.Forms.BindingSource bs;
private dsPRJTableAdapters.TableAdapterManager tam;
private System.Windows.Forms.BindingNavigator bn;
private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
private System.Windows.Forms.ToolStripButton btAdd;
private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem;
private System.Windows.Forms.ToolStripButton btDel;
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
@@ -557,7 +663,7 @@
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
private System.Windows.Forms.ToolStripButton projectsBindingNavigatorSaveItem;
private System.Windows.Forms.ToolStripButton btSave;
private System.Windows.Forms.ContextMenuStrip cm;
private System.Windows.Forms.ToolStripMenuItem refreshToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
@@ -580,9 +686,17 @@
private System.Windows.Forms.ToolStripComboBox cmbState;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripLabel toolStripLabel3;
private System.Windows.Forms.ToolStripTextBox tbRequest;
private System.Windows.Forms.ToolStripButton btSearch;
private dsPRJTableAdapters.JobReportTableAdapter ta;
private System.Windows.Forms.ToolStripButton btCopy;
private System.Windows.Forms.ToolStripButton btEdit;
private System.Windows.Forms.ToolStripLabel toolStripLabel2;
private System.Windows.Forms.ToolStripTextBox tbFind;
private System.Windows.Forms.ToolStripButton btFind;
private System.Windows.Forms.ToolStripComboBox cmbUser;
private System.Windows.Forms.ToolStripMenuItem exportListToolStripMenuItem;
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
private System.Windows.Forms.ToolStripButton btReport;
private System.Windows.Forms.ToolStripLabel lbTime;
}
}

View File

@@ -17,8 +17,12 @@ namespace FPJ0000
{
InitializeComponent();
fn_fpcolsize = util.MakeFilePath(util.CurrentPath, "formSetting", "fp_" + this.Name + ".ini");
this.dsMSSQL.Projects.TableNewRow += Projects_TableNewRow;
this.dsMSSQL.JobReport.TableNewRow += Projects_TableNewRow;
this.FormClosed += __Closed;
dtSD.KeyDown += dtSD_KeyDown;
dtED.KeyDown += dtSD_KeyDown;
}
void __Closed(object sender, FormClosedEventArgs e)
@@ -28,40 +32,141 @@ namespace FPJ0000
private void __Load(object sender, EventArgs e)
{
this.dtSD.Text = DateTime.Now.Year.ToString("0000") + "-01-01";
this.dtSD.Text = DateTime.Now.ToString("yyyy-MM-01");
this.dtED.Text = DateTime.Now.ToShortDateString();
//프로젝트 목록을 처리함
this.tbRequest.Text = FCOMMON.info.Login.nameK;
//담당자목록
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)";
cmbUser.Text = namestr;
//state list
var stList = FCOMMON.DBM.getCodeList("05");
this.cmbState.Items.Clear();
cmbState.Items.Add("-- All --");
// cmbState.Items.Add("-- incomplete --");
// cmbState.Items.Add("-- incomplete --");
foreach (var item in stList)
cmbState.Items.Add(item);
this.cmbState.SelectedIndex = 0;
//일반사용자의경우에는 상태를 변경하지 못한다.
int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth(FCOMMON.DBM.eAutoType.jobreport));
if (curLevel >= 5)
{
btSave.Visible = true;
}
else
{
btSave.Visible = false;
//btViewDel.Visible = false;
fpSpread1.EditMode = false;
fpSpread1.Sheets[0].SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Row;
fpSpread1.EditModePermanent = false;
fpSpread1.EditModeReplace = false;
foreach (FarPoint.Win.Spread.Column col in fpSpread1.ActiveSheet.Columns)
col.Locked = true;
}
refreshData();
FPUtil.ColSizeLoad(ref this.fpSpread1, fn_fpcolsize);
}
void RefreshTime()
{
lbTime.Text = "--h";
//사용자번호추적
if (cmbUser.Text.Trim() == "")
{
//FCOMMON.Util.MsgE("담당자가 선택되지 않았습니다.");
return;
}
if (cmbUser.Text.IndexOf("(") == -1 || cmbUser.Text.IndexOf(")") == -1)
{
// FCOMMON.Util.MsgE("담당자 번호를 확인할 수 없습니다.(문의 T.8567)");
return;
}
string request = cmbUser.Text.Substring(cmbUser.Text.LastIndexOf('(') + 1);
request = request.Substring(0, request.Length - 1);
int work, ot, total;
FCOMMON.DBM.getWorkTime(request, this.dtSD.Text.Substring(0,7), out work, out total, out ot);
lbTime.Text = string.Format(" {0}h/{2}h, OT:{1}h", work,ot, total);
}
void dtSD_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode != Keys.Enter) return;
var tb = sender as ToolStripTextBox;
var input = tb.Text.Trim();
if (input == "") tb.Text = DateTime.Now.ToShortDateString();
else
{
string dt = string.Empty;
if (!util.MakeDateString(input, out dt))
{
FCOMMON.Util.MsgE("입력값이 올바르지 않습니다.");
tb.SelectAll();
tb.Focus();
return;
}
else
{
tb.Text = dt;
}
}
if (tb == dtSD)
{
dtED.Focus();
dtED.SelectAll();
}
else
{
btSearch.PerformClick();
tb.SelectAll();
}
}
void refreshData()
{
string state = "%";
if (cmbState.SelectedIndex > 0) state = cmbState.Text.Split(',')[0].Substring(1);
string request = "%";
if (tbRequest.Text.Trim() != "") request = "%" + this.tbRequest.Text.Trim() + "%";
this.ta.Fill(this.dsMSSQL.JobReport, dtSD.Text, dtED.Text, "%");
//사용자번호추적
if (cmbUser.Text.Trim() == "")
{
FCOMMON.Util.MsgE("담당자가 선택되지 않았습니다.");
return;
}
if (cmbUser.Text.IndexOf("(") == -1 || cmbUser.Text.IndexOf(")") == -1)
{
FCOMMON.Util.MsgE("담당자 번호를 확인할 수 없습니다.(문의 T.8567)");
return;
}
string request = cmbUser.Text.Substring(cmbUser.Text.LastIndexOf('(') + 1);
request = request.Substring(0, request.Length - 1);
this.ta.Fill(this.dsMSSQL.JobReport, dtSD.Text, dtED.Text, request);
RefreshTime();
}
void saveData()
{
this.Validate();
this.bs.EndEdit();
this.tam.UpdateAll(this.dsMSSQL);
try
{
this.tam.UpdateAll(this.dsMSSQL);
}
catch (Exception ex)
{
FCOMMON.Util.MsgE("저장 실패\n" + ex.Message);
}
}
private void projectsBindingNavigatorSaveItem_Click(object sender, EventArgs e)
@@ -71,12 +176,13 @@ namespace FPJ0000
}
void Projects_TableNewRow(object sender, DataTableNewRowEventArgs e)
{
e.Row["pdate"] = DateTime.Now.ToShortDateString();
e.Row["wuid"] = FCOMMON.info.Login.no;
e.Row["wdate"] = DateTime.Now;
e.Row["type"] = "02";//other
e.Row["uid"] = FCOMMON.info.Login.no;
e.Row["hrs"] = 1.0;
e.Row["pdate"] = DateTime.Now.ToShortDateString();
e.Row["status"] = "진행 완료";//other
e.Row["uid"] = FCOMMON.info.Login.nameK; //이름을 직접 기록
e.Row["hrs"] = 8.0;
e.Row["ot"] = 0.0;
}
private void refreshToolStripMenuItem_Click(object sender, EventArgs e)
@@ -86,8 +192,8 @@ namespace FPJ0000
private void partListToolStripMenuItem_Click(object sender, EventArgs e)
{
var drv =this.bs.Current as DataRowView;
if(drv == null) return;
var drv = this.bs.Current as DataRowView;
if (drv == null) return;
var dr = drv.Row as dsPRJ.ProjectsRow;
var f = new fPartList(dr.idx);
f.MdiParent = this.MdiParent;
@@ -130,22 +236,175 @@ namespace FPJ0000
private void toolStripLabel3_Click(object sender, EventArgs e)
{
//사용자목록처리
tbRequest.Text = string.Empty;
var namestr = string.Format("{0}({1})", FCOMMON.info.Login.nameK, FCOMMON.info.Login.no); ;
if (FCOMMON.info.Login.no == "dev") namestr = "김치균(395552)";
this.cmbUser.Text = namestr;
refreshData();
}
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
{
var newdr = this.dsMSSQL.JobReport.NewJobReportRow();
newdr.pdate = DateTime.Now.ToShortDateString();
if (DateTime.Now.DayOfWeek == DayOfWeek.Sunday ||
DateTime.Now.DayOfWeek == DayOfWeek.Saturday) newdr.hrs = 0;
JobReport.fJobReport_Add f = new JobReport.fJobReport_Add(newdr);
if(f.ShowDialog() != System.Windows.Forms.DialogResult.OK)
{
newdr.Delete();
}
else
if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
this.dsMSSQL.JobReport.AddJobReportRow(newdr);
int cnt = this.ta.Update(newdr);
newdr.AcceptChanges();
if (cnt != 1)
FCOMMON.Util.MsgE("자료가 추가되지 않았습니다.\n\n잠시 후 다시 시도하세요");
}
else newdr.Delete();
}
private void btFind_Click(object sender, EventArgs e)
{
var search = tbFind.Text.Trim();
search = search.Replace("*", "x");
if (tbFind.Text != search) tbFind.Text = search;
try
{
if (search.Trim() == "")
{
this.bs.Filter = "";
tbFind.BackColor = Color.White;
}
else
{
search = search.Replace("'", "''");
string filter = "requestpart like ? or package like ? or projectname like ? or process like ? or [type] like ? or description like ?";
filter = filter.Replace("?", "'%" + search + "%'");
this.bs.Filter = filter;
tbFind.BackColor = Color.Lime;
}
tbFind.SelectAll();
tbFind.Focus();
}
catch (Exception ex)
{
this.tbFind.BackColor = Color.Tomato;
FCOMMON.Util.MsgE(ex.Message);
}
}
private void tbFind_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter) btFind.PerformClick();
}
private void btEdit_Click(object sender, EventArgs e)
{
Func_Edit();
}
void Func_Edit()
{
var drv = this.bs.Current as DataRowView;
if (drv == null) return;
var dr = drv.Row as dsPRJ.JobReportRow;
var f = new JobReport.fJobReport_Add(dr);
if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
if (dr.RowState != DataRowState.Unchanged)
{
this.ta.Update(dr);
dr.AcceptChanges();
}
}
else dr.RejectChanges();
}
private void exportListToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveFileDialog sd = new SaveFileDialog();
sd.Filter = "excel|*.xls";
sd.FileName = "jobreport.xls";
if (sd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
fpSpread1.SaveExcel(sd.FileName,
FarPoint.Excel.ExcelSaveFlags.SaveAsViewed
| FarPoint.Excel.ExcelSaveFlags.NoFormulas
| FarPoint.Excel.ExcelSaveFlags.SaveCustomColumnHeaders);
FCOMMON.Util.MsgI("다음 파일이 생성 되었습니다.\n\n" + sd.FileName);
}
}
private void btCopy_Click(object sender, EventArgs e)
{
var drv = this.bs.Current as DataRowView;
if (drv == null) return;
var dr = drv.Row as dsPRJ.JobReportRow;
//현재 데이터를 입력하여 신규 추가를 한다.
var newdr = this.dsMSSQL.JobReport.NewJobReportRow();
FCOMMON.Util.CopyData((System.Data.DataRow)dr, (System.Data.DataRow)newdr);
newdr.wdate = DateTime.Now;
newdr.wuid = FCOMMON.info.Login.no;
newdr.description = "";
newdr.idx = -1;
newdr.hrs = 8.0;
newdr.ot = 0.0;
newdr.EndEdit();
//var newdr = this.dsMSSQL.JobReport.NewJobReportRow();
JobReport.fJobReport_Add f = new JobReport.fJobReport_Add(newdr);
if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
this.dsMSSQL.JobReport.AddJobReportRow(newdr);
this.ta.Update(newdr);
newdr.AcceptChanges();
}
else newdr.Delete();
}
private void btDel_Click(object sender, EventArgs e)
{
var drv = this.bs.Current as DataRowView;
if (drv == null) return;
var dlg = FCOMMON.Util.MsgQ("현재 선택된 자료를 삭제하시겠습니까?");
var dr = drv.Row as dsPRJ.JobReportRow;
dr.Delete();
try
{
this.ta.Update(dr);
//dr.AcceptChanges();
//FCOMMON.Util.MsgI("삭제 완료");
}
catch(Exception ex)
{
FCOMMON.Util.MsgE("삭제실패\n\n"+ex.Message);
}
}
private void lbStt_Click(object sender, EventArgs e)
{
var f = new FCOMMON.fSelectMonth();
if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
var sdDate = DateTime.Parse(DateTime.Now.ToString("yyyy-") + f.selectmon.ToString() + "-01");
dtSD.Text = sdDate.ToShortDateString();
dtED.Text = sdDate.AddMonths(1).AddDays(-1).ToShortDateString();
refreshData();
}
private void btReport_Click(object sender, EventArgs e)
{
var f = new JobReport.rJobReport();
f.Show();
}
private void cmbUser_Click(object sender, EventArgs e)
{
}
private void cmbUser_SelectedIndexChanged(object sender, EventArgs e)
{
RefreshTime();
}
}
}

View File

@@ -127,18 +127,6 @@
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="bindingNavigatorDeleteItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAW9JREFUOE+1kE0ow2Ecx3dV3krt4oJaOSCTvIRkMqSxyITIzCQHDouEdnFwIOVC
DrhIDiQl5UTiNG/z2ppafy1S2gX/uDwfY6i1v7Hie3nqeb7fz+/7/FR/Ilwn0G0Exw4fV5GJlXlEZxXC
rIet9bAQvB5Ymgn2sLYAvSZEux7RUQFzE4qQt4bCXAYjPaHvnDoCkLpsRGMB2JqCTGLIijDlwqQ9bEMV
i9OIytR3EMNWcJ/BWH8A6j8/bOGFxwXNxYEvGbMQ9XnQ1/K78KfY3/VXzkMY0qFGG2H4RoLGQshJQNbG
86CNhdrsX9a/uQZTPhQl4rMY4OLofbl3aX7I8uwPC7y/g1YdjyVJuEvT8e1tfwUYteHUxCCfHChDeHmG
QQvokjlOU+PbWA0x3pZnILVVI3uvQyHsbiLnqnGmRCF1NYD8pDhpRxOH7HQoAKZGkFKjceszQbpSrumX
bO+G80MFwKUTxgfgcO/b8D9IpXoFiiMDHIQm0skAAAAASUVORK5CYII=
</value>
</data>
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
@@ -179,7 +167,7 @@
8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg==
</value>
</data>
<data name="bindingNavigatorAddNewItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="btAdd.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC
@@ -191,13 +179,54 @@
rkJggg==
</value>
</data>
<data name="projectsBindingNavigatorSaveItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="btEdit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAExJREFUOE9joAr49u3bf1IxVCsEgAWC58Dxh/cf4RhZDETHTNiHaQgpBoAwzBCo
dtINAGGiDUDGyGpoawAxeNSAQWkAORiqnRLAwAAA9EMMU8Daa3MAAAAASUVORK5CYII=
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEvSURBVDhPpZI/S0JRGIed+i6Nbk0t0iCuSkuDi1MfIKfm
+gAOQktTQkMggYtRkwgidKmgyQwMCgqz0CivvvK8cK7neG4KdeHhHs45v+c9/xLyz08Ft713OQ+6SqXV
kfLlnXJw1lSK5VrERqGkMB4JCCLpvQ7lZfDlQJ+B4EnwI9nTkbYdAZMbjxOPq4eJPH1MvXC2sD8XsOzP
0bcX/C3MXEfAfmzBsnCnP10uWBWu3IS+gJOm0w5fHCZiw0aQzu3GC0xYgm2R+poTRnh8HeqNOALu920w
9MK0F8NGkMrs+ALewqrwUXss3ed+vKB6H+rh2OT3SjpO0IBgcyvnCjgDBGCq8mcMiQ3FHAGdLB/J4vMF
KhoI83LXk6m5gCpmufbyOWlgv0BVIMx4JPj7JzIDGHRUPz2nxiQAAAAASUVORK5CYII=
</value>
</data>
<data name="btDel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAW9JREFUOE+1kE0ow2Ecx3dV3krt4oJaOSCTvIRkMqSxyITIzCQHDouEdnFwIOVC
DrhIDiQl5UTiNG/z2ppafy1S2gX/uDwfY6i1v7Hie3nqeb7fz+/7/FR/Ilwn0G0Exw4fV5GJlXlEZxXC
rIet9bAQvB5Ymgn2sLYAvSZEux7RUQFzE4qQt4bCXAYjPaHvnDoCkLpsRGMB2JqCTGLIijDlwqQ9bEMV
i9OIytR3EMNWcJ/BWH8A6j8/bOGFxwXNxYEvGbMQ9XnQ1/K78KfY3/VXzkMY0qFGG2H4RoLGQshJQNbG
86CNhdrsX9a/uQZTPhQl4rMY4OLofbl3aX7I8uwPC7y/g1YdjyVJuEvT8e1tfwUYteHUxCCfHChDeHmG
QQvokjlOU+PbWA0x3pZnILVVI3uvQyHsbiLnqnGmRCF1NYD8pDhpRxOH7HQoAKZGkFKjceszQbpSrumX
bO+G80MFwKUTxgfgcO/b8D9IpXoFiiMDHIQm0skAAAAASUVORK5CYII=
</value>
</data>
<data name="btFind.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVDhPnZIxS8NQFEb7W/wLjh0Fl9a1SxBHBekkWFd1
qYg4Ci5dndSCg2AHl4LQSaRSKDqoFUE7VAjUmvTKueWmL2mw2gunL7zmO+/mJhmZoTJusdF868vpXUfO
b5/lpPEox9f3SvnsRtk8uojxHQ7HEgSEkXS6vrz3xqtdu+xdfUiheEBsJOGCk/mz/hROUHsIIrp+qIKY
hB/a9r+CVAG4Auj5g7iA5/1NACaptgIVLHkb0wWVw13ZL60p2+uerqkCJs1mMgwUU6d1k/xJwI10RZj1
9TPUN7Wam9dgTMC75QR7TjCBkRQs5Jd1jQS8c1ewtZLTPcQW/peADpC44cudgnjZOQ1OCGjTwkwaGBon
GoSrpcVIQqmAj6LZftFBup9vWiUlUQdIDCbsQrsGZRJKBbOXyA++SlEsu6QjvQAAAABJRU5ErkJggg==
</value>
</data>
<data name="btReport.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVDhPnZIxS8NQFEb7W/wLjh0Fl9a1SxBHBekkWFd1
qYg4Ci5dndSCg2AHl4LQSaRSKDqoFUE7VAjUmvTKueWmL2mw2gunL7zmO+/mJhmZoTJusdF868vpXUfO
b5/lpPEox9f3SvnsRtk8uojxHQ7HEgSEkXS6vrz3xqtdu+xdfUiheEBsJOGCk/mz/hROUHsIIrp+qIKY
hB/a9r+CVAG4Auj5g7iA5/1NACaptgIVLHkb0wWVw13ZL60p2+uerqkCJs1mMgwUU6d1k/xJwI10RZj1
9TPUN7Wam9dgTMC75QR7TjCBkRQs5Jd1jQS8c1ewtZLTPcQW/peADpC44cudgnjZOQ1OCGjTwkwaGBon
GoSrpcVIQqmAj6LZftFBup9vWiUlUQdIDCbsQrsGZRJKBbOXyA++SlEsu6QjvQAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="dsMSSQL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="cm.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>325, 17</value>
</metadata>

View File

@@ -0,0 +1,552 @@
namespace FPJ0000.JobReport
{
partial class fJobReportImport
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fJobReportImport));
this.textBox1 = new System.Windows.Forms.TextBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.button1 = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.button3 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.label7 = new System.Windows.Forms.Label();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.label6 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.nudCE = new System.Windows.Forms.NumericUpDown();
this.nudCS = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.nudE = new System.Windows.Forms.NumericUpDown();
this.nudS = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.bn = new System.Windows.Forms.BindingNavigator(this.components);
this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
this.bs = new System.Windows.Forms.BindingSource(this.components);
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.progressBar1 = new System.Windows.Forms.ToolStripProgressBar();
this.sd = new System.Windows.Forms.DateTimePicker();
this.ed = new System.Windows.Forms.DateTimePicker();
this.cmbUser = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudCE)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudCS)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudE)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudS)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
this.bn.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(42, 9);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(170, 21);
this.textBox1.TabIndex = 1;
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(12, 13);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(25, 12);
this.linkLabel1.TabIndex = 0;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "File";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// button1
//
this.button1.Location = new System.Drawing.Point(525, 8);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(102, 21);
this.button1.TabIndex = 4;
this.button1.Text = "1.View";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 120);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(906, 512);
this.dataGridView1.TabIndex = 1;
//
// button3
//
this.button3.Location = new System.Drawing.Point(525, 35);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(102, 21);
this.button3.TabIndex = 6;
this.button3.Text = "2.Save";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// panel1
//
this.panel1.Controls.Add(this.cmbUser);
this.panel1.Controls.Add(this.label7);
this.panel1.Controls.Add(this.checkBox1);
this.panel1.Controls.Add(this.numericUpDown2);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.ed);
this.panel1.Controls.Add(this.sd);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.nudCE);
this.panel1.Controls.Add(this.nudCS);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.nudE);
this.panel1.Controls.Add(this.nudS);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.numericUpDown1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.button3);
this.panel1.Controls.Add(this.textBox1);
this.panel1.Controls.Add(this.linkLabel1);
this.panel1.Controls.Add(this.button1);
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(906, 120);
this.panel1.TabIndex = 0;
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(362, 95);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(29, 12);
this.label7.TabIndex = 21;
this.label7.Text = "사번";
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(474, 66);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(127, 16);
this.checkBox1.TabIndex = 19;
this.checkBox1.Text = "Auto Delete Import";
this.checkBox1.UseVisualStyleBackColor = true;
//
// numericUpDown2
//
this.numericUpDown2.Location = new System.Drawing.Point(406, 63);
this.numericUpDown2.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(45, 21);
this.numericUpDown2.TabIndex = 18;
this.numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDown2.Value = new decimal(new int[] {
3,
0,
0,
0});
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(312, 67);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(87, 12);
this.label6.TabIndex = 17;
this.label6.Text = "Column Name";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(455, 13);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(14, 12);
this.label4.TabIndex = 14;
this.label4.Text = "~";
//
// nudCE
//
this.nudCE.Location = new System.Drawing.Point(474, 9);
this.nudCE.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.nudCE.Name = "nudCE";
this.nudCE.Size = new System.Drawing.Size(45, 21);
this.nudCE.TabIndex = 13;
this.nudCE.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.nudCE.Value = new decimal(new int[] {
14,
0,
0,
0});
//
// nudCS
//
this.nudCS.Location = new System.Drawing.Point(406, 9);
this.nudCS.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.nudCS.Name = "nudCS";
this.nudCS.Size = new System.Drawing.Size(45, 21);
this.nudCS.TabIndex = 12;
this.nudCS.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.nudCS.Value = new decimal(new int[] {
2,
0,
0,
0});
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(335, 13);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(64, 12);
this.label5.TabIndex = 11;
this.label5.Text = "Col Range";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(455, 40);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(14, 12);
this.label3.TabIndex = 10;
this.label3.Text = "~";
//
// nudE
//
this.nudE.Location = new System.Drawing.Point(474, 36);
this.nudE.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.nudE.Name = "nudE";
this.nudE.Size = new System.Drawing.Size(45, 21);
this.nudE.TabIndex = 9;
this.nudE.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.nudE.Value = new decimal(new int[] {
300,
0,
0,
0});
//
// nudS
//
this.nudS.Location = new System.Drawing.Point(406, 36);
this.nudS.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.nudS.Name = "nudS";
this.nudS.Size = new System.Drawing.Size(45, 21);
this.nudS.TabIndex = 8;
this.nudS.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.nudS.Value = new decimal(new int[] {
5,
0,
0,
0});
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(329, 40);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(70, 12);
this.label2.TabIndex = 7;
this.label2.Text = "Row Range";
//
// numericUpDown1
//
this.numericUpDown1.Location = new System.Drawing.Point(261, 9);
this.numericUpDown1.Maximum = new decimal(new int[] {
10,
0,
0,
0});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(45, 21);
this.numericUpDown1.TabIndex = 3;
this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(218, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(37, 12);
this.label1.TabIndex = 2;
this.label1.Text = "Sheet";
//
// bn
//
this.bn.AddNewItem = this.bindingNavigatorAddNewItem;
this.bn.BindingSource = this.bs;
this.bn.CountItem = this.bindingNavigatorCountItem;
this.bn.DeleteItem = this.bindingNavigatorDeleteItem;
this.bn.Dock = System.Windows.Forms.DockStyle.Bottom;
this.bn.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.bindingNavigatorMoveFirstItem,
this.bindingNavigatorMovePreviousItem,
this.bindingNavigatorSeparator,
this.bindingNavigatorPositionItem,
this.bindingNavigatorCountItem,
this.bindingNavigatorSeparator1,
this.bindingNavigatorMoveNextItem,
this.bindingNavigatorMoveLastItem,
this.bindingNavigatorSeparator2,
this.bindingNavigatorAddNewItem,
this.bindingNavigatorDeleteItem,
this.progressBar1});
this.bn.Location = new System.Drawing.Point(0, 632);
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
this.bn.MoveNextItem = this.bindingNavigatorMoveNextItem;
this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
this.bn.Name = "bn";
this.bn.PositionItem = this.bindingNavigatorPositionItem;
this.bn.Size = new System.Drawing.Size(906, 25);
this.bn.TabIndex = 2;
this.bn.Text = "bindingNavigator1";
//
// bindingNavigatorAddNewItem
//
this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorAddNewItem.Text = "새로 추가";
//
// bindingNavigatorCountItem
//
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
this.bindingNavigatorCountItem.Text = "/{0}";
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
//
// bindingNavigatorDeleteItem
//
this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorDeleteItem.Text = "삭제";
//
// bindingNavigatorMoveFirstItem
//
this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorMoveFirstItem.Text = "처음으로 이동";
//
// bindingNavigatorMovePreviousItem
//
this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorMovePreviousItem.Text = "이전으로 이동";
//
// bindingNavigatorSeparator
//
this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25);
//
// bindingNavigatorPositionItem
//
this.bindingNavigatorPositionItem.AccessibleName = "위치";
this.bindingNavigatorPositionItem.AutoSize = false;
this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
this.bindingNavigatorPositionItem.Text = "0";
this.bindingNavigatorPositionItem.ToolTipText = "현재 위치";
//
// bindingNavigatorSeparator1
//
this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25);
//
// bindingNavigatorMoveNextItem
//
this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorMoveNextItem.Text = "다음으로 이동";
//
// bindingNavigatorMoveLastItem
//
this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorMoveLastItem.Text = "마지막으로 이동";
//
// bindingNavigatorSeparator2
//
this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
//
// progressBar1
//
this.progressBar1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(200, 22);
//
// sd
//
this.sd.Location = new System.Drawing.Point(42, 40);
this.sd.Name = "sd";
this.sd.Size = new System.Drawing.Size(170, 21);
this.sd.TabIndex = 15;
//
// ed
//
this.ed.Location = new System.Drawing.Point(42, 67);
this.ed.Name = "ed";
this.ed.Size = new System.Drawing.Size(170, 21);
this.ed.TabIndex = 16;
//
// cmbUser
//
this.cmbUser.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbUser.FormattingEnabled = true;
this.cmbUser.Location = new System.Drawing.Point(397, 90);
this.cmbUser.Name = "cmbUser";
this.cmbUser.Size = new System.Drawing.Size(171, 20);
this.cmbUser.TabIndex = 22;
//
// fJobReportImport
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(906, 657);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.bn);
this.Controls.Add(this.panel1);
this.Name = "fJobReportImport";
this.Text = "업무일지 가져오기";
this.Load += new System.EventHandler(this.@__Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudCE)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudCS)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudE)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudS)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bn)).EndInit();
this.bn.ResumeLayout(false);
this.bn.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.BindingNavigator bn;
private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem;
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1;
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
private System.Windows.Forms.ToolStripProgressBar progressBar1;
private System.Windows.Forms.BindingSource bs;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown nudE;
private System.Windows.Forms.NumericUpDown nudS;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.NumericUpDown nudCE;
private System.Windows.Forms.NumericUpDown nudCS;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.DateTimePicker ed;
private System.Windows.Forms.DateTimePicker sd;
private System.Windows.Forms.ComboBox cmbUser;
}
}

View File

@@ -0,0 +1,323 @@
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 fJobReportImport : Form
{
DataTable dt = new dsPRJ.JobReportDataTable();
DataTable dtExcel = new DataTable();
public fJobReportImport()
{
InitializeComponent();
this.FormClosed += __Closed;
}
private void __Load(object sender, EventArgs e)
{
this.sd.Value = DateTime.Parse( DateTime.Now.Year.ToString("0000") + "-01-01");
this.ed.Value = DateTime.Now;
//담당자목록
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;
}
void __Closed(object sender, FormClosedEventArgs e)
{
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
OpenFileDialog od = new OpenFileDialog();
od.Filter = "excel|*.xlsx|all files|*.*";
// od.InitialDirectory = FCOMMON.Util.CurrentPath + "model";
od.FilterIndex = 1;
od.RestoreDirectory = true;
if (od.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
textBox1.Text = od.FileName;
}
private void button1_Click(object sender, EventArgs e)
{
int ColumnNameNo = (int)numericUpDown2.Value;
if(textBox1.Text.Trim() == "")
{
FCOMMON.Util.MsgE("파일을 선택하세요");
textBox1.Focus();
return;
}
if(!System.IO.File.Exists(textBox1.Text))
{
FCOMMON.Util.MsgE("입력하신 파일이 존재하지 않습니다.");
textBox1.Focus();
textBox1.SelectAll();
return;
}
dtExcel.Columns.Clear();
dtExcel.Rows.Clear();
dtExcel.AcceptChanges();
libxl.Book book;// = new libxl.BinBook();
book = new libxl.XmlBook();
book.setKey(FCOMMON.info.libxlCompany, FCOMMON.info.libxlKey);
try
{
book.load(textBox1.Text);
}catch (Exception ex)
{
FCOMMON.Util.MsgE(ex.Message);
return;
}
int sheetNum = (int)numericUpDown1.Value;
if (sheetNum >= book.sheetCount())
{
FCOMMON.Util.MsgE("입력한 시트 번호는 존재하지 않습니다.");
book = null;
return;
}
var sheet = book.getSheet(sheetNum);
var MaxRow = sheet.lastRow();
var MinRow = sheet.firstRow();
MaxRow = (int)Math.Min(MaxRow, nudE.Value-1);
MinRow = (int)Math.Max(MinRow, nudS.Value-1);
if(MinRow <= (ColumnNameNo-1))
{
FCOMMON.Util.MsgI("시작줄을 제목줄 보다 커야 합니다. 자동으로 +1 증가합니다.");
MinRow = ColumnNameNo ;
}
var MaxCol = sheet.lastCol();
var MinCol = sheet.firstCol();
MaxCol = (int)Math.Min(MaxCol, nudCE.Value - 1);
MinCol = (int)Math.Max(MinCol, nudCS.Value - 1);
//제목줄을 처리한다. 181029
List<string> cols = new List<string>();
string sDate = sd.Value.ToShortDateString();
string eDate = ed.Value.ToShortDateString();
for (int c = MinCol; c <= MaxCol; c++)
{
var strVallue = sheet.readStr(ColumnNameNo-1, c);
if (strVallue.Trim()=="" )
{
if (c == MinCol)
{
//첫줄 첫행이 빈값이면 처리하지 않는다.
FCOMMON.Util.MsgE("열 제목에 빈값이 있어 처리되지 못합니다.");
return;
}
else
{
//빈값이 나왓으므로 열 최대값을 변경해준다.
if(c < MaxCol)
{
FCOMMON.Util.MsgI("빈값으로 인해 최대 열 번호를 " + c.ToString() + "로 변경합니다");
MaxCol = c;
break;
}
}
}
cols.Add(strVallue);
this.dtExcel.Columns.Add(strVallue);
}
try{
for (int r = MinRow; r <= MaxRow; r++)
{
DataRow dr = dtExcel.NewRow();
Boolean nullColumn = false;
for (int c = MinCol; c <= MaxCol; c++)
{
if (sheet.isDate(r, c))
{
var datevalue = sheet.readNum(r, c);
int y, m, d;
y = m = d = 0;
book.dateUnpack(datevalue, ref y, ref m, ref d);
if (y == 1900) y = DateTime.Now.Year;
if (y >= 2000)
dr[cols[c - MinCol]] = string.Format("{0:0000}-{1:00}-{2:00}", y, m, d);
else
dr[cols[c - MinCol]] = string.Empty;
//일자가 만약 넘어서면 패스한다.
if(cols[c]=="일자" )
{
string value = dr[cols[c - MinCol]].ToString();
if(value == "")
{
nullColumn = true; //날짜가 없다면 패스
break;
} else if(value.CompareTo(sDate) < 0)
{
nullColumn = true; //과거데이터라서 패스
break;
} else if(value.CompareTo(eDate) > 0)
{
nullColumn = true; //미래데이터 패스
break;
}
}
}
else
{
var dateStrin = sheet.readStr(r, c);
var strVallue = sheet.readStr(r, c);
if (strVallue.Trim() == "" && c == MinCol)
{
//첫줄 첫행이 빈값이면 처리하지 않는다.
nullColumn = true;
break;
}
if (cols[c - MinCol].Trim() != "")
dr[cols[c - MinCol]] = strVallue;
}
}
if (nullColumn) continue; //줄처리를 못한 경우 넘어감
if (dr != null)
{
dtExcel.Rows.Add(dr);
}
}
dtExcel.AcceptChanges();
}
catch(Exception ex)
{
FCOMMON.Util.MsgE("불러오는 중 오류 발생\n" + ex.Message);
}
//
book = null;
this.bs.DataSource = dtExcel;
this.dataGridView1.DataSource = dtExcel;
this.bn.BindingSource = this.bs;
if(this.bs.Count < 1)
{
FCOMMON.Util.MsgE("입력된 자료가 없습니다.\n\n지정된 엑셀의 1번째 칸에 값이 없다면 입력되지 않습니다.");
}
}
private void button3_Click(object sender, EventArgs e)
{
if(dtExcel == null || dtExcel.Rows.Count < 1)
{
FCOMMON.Util.MsgE("등록 가능한 자료가 없습니다.");
return;
}
if(cmbUser.SelectedValue == null || cmbUser.Text.Trim()=="")
{
FCOMMON.Util.MsgE("사번이 입력되지 않았습니다.");
return;
}
System.Text.StringBuilder sb = new StringBuilder();
sb.AppendLine("다음 자료를 추가하시겠습니까?");
sb.AppendLine();
sb.AppendLine("'저장 완료' 메세지가 나올때 까지 기다려 주세요.");
sb.AppendLine();
sb.AppendLine("실행 하려면 '예' 를 누르세요");
var dlg = FCOMMON.Util.MsgQ(sb.ToString());
if (dlg != System.Windows.Forms.DialogResult.Yes) return;
dt.Clear();
dt.AcceptChanges();
this.progressBar1.Value = 0;
this.progressBar1.Maximum = dtExcel.Rows.Count;
//12,13
foreach (DataRow dr in dtExcel.Rows)
{
this.progressBar1.Value += 1;
//데이터추가
var newdr = dt.NewRow();
if (dr[1] == DBNull.Value || dr[1].ToString()=="") continue; //nullerror
var strdate = dr[1].ToString().Replace('/','-');
var datebuf = strdate.Split('-');
if (datebuf.Length == 2)
{
strdate = DateTime.Now.Year.ToString("0000") + "-" +
datebuf[0].PadLeft(2, '0') + "-" +
datebuf[1].PadLeft(2, '0');
}
newdr["pdate"] = strdate;
newdr["uid"] = cmbUser.SelectedValue.ToString(); // tbNo.Text.Trim();
newdr["requestpart"] = dr[2].ToString().Trim();
newdr["package"] = dr[3].ToString().Trim();
newdr["status"] = dr[4].ToString().Trim();
newdr["type"] = dr[5].ToString();
newdr["process"] = dr[6].ToString();
newdr["projectName"] = dr[7].ToString();
newdr["description"] = dr[8].ToString();
//프로젝트이름을 검색해서 PIDX를 결정해준다.
newdr["pidx"] = -1;// dr[3].ToString();
string hrsstr = "";
if (dr[9] != DBNull.Value) hrsstr = dr[9].ToString().Trim();
if (hrsstr.Trim() == "") hrsstr = "0";
newdr["hrs"] = double.Parse(hrsstr);
string otstr = "";
if (dr[10] != DBNull.Value) otstr = dr[10].ToString().Trim();
if (otstr.Trim() == "") otstr = "0";
newdr["ot"] = double.Parse(otstr);
newdr["remark"] = "";
newdr["import"] = true;
newdr["wuid"] = FCOMMON.info.Login.no;
newdr["wdate"] = DateTime.Now;
dt.Rows.Add(newdr);
}
var taE = new dsPRJTableAdapters.JobReportTableAdapter();
if (checkBox1.Checked) taE.DeleteImport(sd.Value.ToShortDateString(), ed.Value.ToShortDateString(), FCOMMON.info.Login.no);
taE.Update((dsPRJ.JobReportDataTable)dt);
dt.AcceptChanges();
FCOMMON.Util.MsgI("Save OK");
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
}
}

View File

@@ -0,0 +1,191 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="bn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="bindingNavigatorAddNewItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC
pBtwfjov3ICDPSKkG3B8kiBQc93/Pw+q/u9oFydswKWZPP/PTuX7fxKo8Ui/0P993SJAzeX//94r+r++
Qeb/qhq5/0srFf/PL1X+P6tIFdPAU0B//nlYD9RUC8SV///cKwHivP9/72b+/3sn+f/f23H//92MAOKQ
/5NyNDENONQrDHbu3/ulQI0FQI3ZQI2pQI0J///digZqDPv/70bQ/3/X/f53peliGrCzXeL/lmap/+vA
zpX/v6RC8f/fWzFAjeH/p+Zp/J+QpfW/O0P3f3uq/v/mREPCYTIb6E+Qc//dCPjfk6FDWAM6APnz3w1/
IPb735qsT7oB3em6YP+CcH2cEekGtCQZ/G+IN/xfE2v8vzLahHQD6AQYGAAkI9iedfyIaQAAAABJRU5E
rkJggg==
</value>
</data>
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>83, 17</value>
</metadata>
<data name="bindingNavigatorDeleteItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAW9JREFUOE+1kE0ow2Ecx3dV3krt4oJaOSCTvIRkMqSxyITIzCQHDouEdnFwIOVC
DrhIDiQl5UTiNG/z2ppafy1S2gX/uDwfY6i1v7Hie3nqeb7fz+/7/FR/Ilwn0G0Exw4fV5GJlXlEZxXC
rIet9bAQvB5Ymgn2sLYAvSZEux7RUQFzE4qQt4bCXAYjPaHvnDoCkLpsRGMB2JqCTGLIijDlwqQ9bEMV
i9OIytR3EMNWcJ/BWH8A6j8/bOGFxwXNxYEvGbMQ9XnQ1/K78KfY3/VXzkMY0qFGG2H4RoLGQshJQNbG
86CNhdrsX9a/uQZTPhQl4rMY4OLofbl3aX7I8uwPC7y/g1YdjyVJuEvT8e1tfwUYteHUxCCfHChDeHmG
QQvokjlOU+PbWA0x3pZnILVVI3uvQyHsbiLnqnGmRCF1NYD8pDhpRxOH7HQoAKZGkFKjceszQbpSrumX
bO+G80MFwKUTxgfgcO/b8D9IpXoFiiMDHIQm0skAAAAASUVORK5CYII=
</value>
</data>
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77
wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0
v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg
UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA
Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu
lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII=
</value>
</data>
<data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w
5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f
Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+
08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC
</value>
</data>
<data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78
n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI
N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f
oAc0QjgAAAAASUVORK5CYII=
</value>
</data>
<data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+//
h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B
twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA
kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG
WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9
8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg==
</value>
</data>
</root>

View File

@@ -29,127 +29,311 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label groupLabel;
System.Windows.Forms.Label uidLabel;
System.Windows.Forms.Label memoLabel;
System.Windows.Forms.Label hrsLabel;
System.Windows.Forms.Label projectLabel;
System.Windows.Forms.Label typeLabel;
System.Windows.Forms.Label label1;
System.Windows.Forms.Label label2;
this.dsPRJ = new FPJ0000.dsPRJ();
System.Windows.Forms.Label projectLabel;
System.Windows.Forms.Label label4;
System.Windows.Forms.Label stateLabel;
System.Windows.Forms.Label label5;
this.lbSummary = new System.Windows.Forms.Label();
this.tbHrs = new System.Windows.Forms.TextBox();
this.bs = new System.Windows.Forms.BindingSource(this.components);
this.ta = new FPJ0000.dsPRJTableAdapters.JobReportTableAdapter();
this.tam = new FPJ0000.dsPRJTableAdapters.TableAdapterManager();
this.pdateTextBox = new System.Windows.Forms.TextBox();
this.groupTextBox = new System.Windows.Forms.TextBox();
this.memoTextBox = new System.Windows.Forms.TextBox();
this.hrsTextBox = new System.Windows.Forms.TextBox();
this.projectidxTextBox = new System.Windows.Forms.TextBox();
this.projectTextBox = new System.Windows.Forms.TextBox();
this.dsPRJ = new FPJ0000.dsPRJ();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.lbIndex = new System.Windows.Forms.ToolStripStatusLabel();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.typeComboBox = new System.Windows.Forms.ComboBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
groupLabel = new System.Windows.Forms.Label();
uidLabel = new System.Windows.Forms.Label();
memoLabel = new System.Windows.Forms.Label();
this.cmbType = new System.Windows.Forms.ComboBox();
this.btSave = new System.Windows.Forms.Button();
this.tbDescription = new System.Windows.Forms.TextBox();
this.dtPdate = new System.Windows.Forms.DateTimePicker();
this.cmbUser = new System.Windows.Forms.ComboBox();
this.tbProject = new System.Windows.Forms.TextBox();
this.tbProjectIndex = new System.Windows.Forms.TextBox();
this.tbOt = new System.Windows.Forms.TextBox();
this.tbWW = new System.Windows.Forms.TextBox();
this.cmbProcess = new System.Windows.Forms.ComboBox();
this.cmbState = new System.Windows.Forms.ComboBox();
this.cmbPackage = new System.Windows.Forms.ComboBox();
this.cmbRequest = new System.Windows.Forms.ComboBox();
this.ta = new FPJ0000.dsPRJTableAdapters.JobReportTableAdapter();
this.tam = new FPJ0000.dsPRJTableAdapters.TableAdapterManager();
hrsLabel = new System.Windows.Forms.Label();
projectLabel = new System.Windows.Forms.Label();
typeLabel = new System.Windows.Forms.Label();
label1 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dsPRJ)).BeginInit();
projectLabel = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
stateLabel = new System.Windows.Forms.Label();
label5 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dsPRJ)).BeginInit();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// groupLabel
//
groupLabel.AutoSize = true;
groupLabel.Location = new System.Drawing.Point(43, 68);
groupLabel.Name = "groupLabel";
groupLabel.Size = new System.Drawing.Size(47, 12);
groupLabel.TabIndex = 6;
groupLabel.Text = "request";
//
// uidLabel
//
uidLabel.AutoSize = true;
uidLabel.Location = new System.Drawing.Point(64, 15);
uidLabel.Name = "uidLabel";
uidLabel.Size = new System.Drawing.Size(26, 12);
uidLabel.TabIndex = 8;
uidLabel.Text = "uid:";
//
// memoLabel
//
memoLabel.AutoSize = true;
memoLabel.Location = new System.Drawing.Point(46, 236);
memoLabel.Name = "memoLabel";
memoLabel.Size = new System.Drawing.Size(44, 12);
memoLabel.TabIndex = 12;
memoLabel.Text = "remark";
//
// hrsLabel
//
hrsLabel.AutoSize = true;
hrsLabel.Location = new System.Drawing.Point(188, 123);
hrsLabel.Location = new System.Drawing.Point(18, 162);
hrsLabel.Name = "hrsLabel";
hrsLabel.Size = new System.Drawing.Size(27, 12);
hrsLabel.Size = new System.Drawing.Size(115, 12);
hrsLabel.TabIndex = 16;
hrsLabel.Text = "hrs:";
//
// projectLabel
//
projectLabel.AutoSize = true;
projectLabel.Location = new System.Drawing.Point(43, 150);
projectLabel.Name = "projectLabel";
projectLabel.Size = new System.Drawing.Size(47, 12);
projectLabel.TabIndex = 26;
projectLabel.Text = "project:";
hrsLabel.Text = "근무시간 / 초과시간";
//
// typeLabel
//
typeLabel.AutoSize = true;
typeLabel.Location = new System.Drawing.Point(57, 123);
typeLabel.Location = new System.Drawing.Point(18, 129);
typeLabel.Name = "typeLabel";
typeLabel.Size = new System.Drawing.Size(33, 12);
typeLabel.TabIndex = 29;
typeLabel.Text = "type:";
typeLabel.Size = new System.Drawing.Size(115, 12);
typeLabel.TabIndex = 13;
typeLabel.Text = "업무형태 / 업무분류";
//
// label1
//
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(37, 95);
label1.Location = new System.Drawing.Point(30, 100);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(53, 12);
label1.TabIndex = 33;
label1.Text = "package";
label1.Size = new System.Drawing.Size(103, 12);
label1.TabIndex = 10;
label1.Text = "요청부서 / 패키지";
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(22, 177);
label2.Location = new System.Drawing.Point(76, 190);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(68, 12);
label2.TabIndex = 35;
label2.Text = "Description";
label2.Size = new System.Drawing.Size(57, 12);
label2.TabIndex = 18;
label2.Text = "진행 내용";
//
// projectLabel
//
projectLabel.AutoSize = true;
projectLabel.Location = new System.Drawing.Point(30, 74);
projectLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
projectLabel.Name = "projectLabel";
projectLabel.Size = new System.Drawing.Size(103, 12);
projectLabel.TabIndex = 7;
projectLabel.Text = "프로젝트 (아이템)";
//
// label4
//
label4.AutoSize = true;
label4.Location = new System.Drawing.Point(92, 46);
label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(41, 12);
label4.TabIndex = 5;
label4.Text = "담당자";
//
// stateLabel
//
stateLabel.AutoSize = true;
stateLabel.Location = new System.Drawing.Point(388, 18);
stateLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
stateLabel.Name = "stateLabel";
stateLabel.Size = new System.Drawing.Size(29, 12);
stateLabel.TabIndex = 3;
stateLabel.Text = "상태";
//
// lbSummary
//
this.lbSummary.AutoSize = true;
this.lbSummary.ForeColor = System.Drawing.Color.SlateGray;
this.lbSummary.Location = new System.Drawing.Point(309, 156);
this.lbSummary.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbSummary.Name = "lbSummary";
this.lbSummary.Size = new System.Drawing.Size(195, 24);
this.lbSummary.TabIndex = 53;
this.lbSummary.Text = "금월 근무시간 : {0:N1}h / {1:N0}h\r\n금월 초과시간 : {2:N1}h";
//
// label5
//
label5.AutoSize = true;
label5.Location = new System.Drawing.Point(92, 18);
label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
label5.Name = "label5";
label5.Size = new System.Drawing.Size(41, 12);
label5.TabIndex = 0;
label5.Text = "등록일";
//
// tbHrs
//
this.tbHrs.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "hrs", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, null, "N2"));
this.tbHrs.Font = new System.Drawing.Font("맑은 고딕", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.tbHrs.Location = new System.Drawing.Point(141, 151);
this.tbHrs.Name = "tbHrs";
this.tbHrs.Size = new System.Drawing.Size(77, 33);
this.tbHrs.TabIndex = 17;
this.tbHrs.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// bs
//
this.bs.DataMember = "JobReport";
this.bs.DataSource = this.dsPRJ;
//
// dsPRJ
//
this.dsPRJ.DataSetName = "dsPRJ";
this.dsPRJ.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
//
// bs
// statusStrip1
//
this.bs.DataMember = "JobReport";
this.bs.DataSource = this.dsPRJ;
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1,
this.lbIndex});
this.statusStrip1.Location = new System.Drawing.Point(0, 351);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(538, 22);
this.statusStrip1.TabIndex = 28;
this.statusStrip1.Text = "statusStrip1";
//
// toolStripStatusLabel1
//
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Size = new System.Drawing.Size(36, 17);
this.toolStripStatusLabel1.Text = "Index";
//
// lbIndex
//
this.lbIndex.Name = "lbIndex";
this.lbIndex.Size = new System.Drawing.Size(17, 17);
this.lbIndex.Text = "--";
//
// cmbType
//
this.cmbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbType.FormattingEnabled = true;
this.cmbType.Location = new System.Drawing.Point(141, 123);
this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(183, 20);
this.cmbType.TabIndex = 14;
this.cmbType.SelectedIndexChanged += new System.EventHandler(this.cmbType_SelectedIndexChanged);
//
// btSave
//
this.btSave.Location = new System.Drawing.Point(141, 300);
this.btSave.Name = "btSave";
this.btSave.Size = new System.Drawing.Size(381, 43);
this.btSave.TabIndex = 20;
this.btSave.Text = "확인";
this.btSave.UseVisualStyleBackColor = true;
this.btSave.Click += new System.EventHandler(this.button1_Click);
//
// tbDescription
//
this.tbDescription.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "description", true));
this.tbDescription.Location = new System.Drawing.Point(141, 190);
this.tbDescription.Multiline = true;
this.tbDescription.Name = "tbDescription";
this.tbDescription.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.tbDescription.Size = new System.Drawing.Size(381, 101);
this.tbDescription.TabIndex = 19;
//
// dtPdate
//
this.dtPdate.Location = new System.Drawing.Point(141, 14);
this.dtPdate.Margin = new System.Windows.Forms.Padding(4);
this.dtPdate.Name = "dtPdate";
this.dtPdate.Size = new System.Drawing.Size(178, 21);
this.dtPdate.TabIndex = 1;
this.dtPdate.ValueChanged += new System.EventHandler(this.dtPdate_ValueChanged);
//
// cmbUser
//
this.cmbUser.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.cmbUser.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.cmbUser.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbUser.FormattingEnabled = true;
this.cmbUser.ImeMode = System.Windows.Forms.ImeMode.Hangul;
this.cmbUser.Location = new System.Drawing.Point(141, 42);
this.cmbUser.Margin = new System.Windows.Forms.Padding(4);
this.cmbUser.Name = "cmbUser";
this.cmbUser.Size = new System.Drawing.Size(381, 20);
this.cmbUser.TabIndex = 6;
this.cmbUser.SelectedIndexChanged += new System.EventHandler(this.cmbUser_SelectedIndexChanged);
//
// tbProject
//
this.tbProject.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.tbProject.ImeMode = System.Windows.Forms.ImeMode.Alpha;
this.tbProject.Location = new System.Drawing.Point(141, 69);
this.tbProject.Margin = new System.Windows.Forms.Padding(4);
this.tbProject.Name = "tbProject";
this.tbProject.Size = new System.Drawing.Size(311, 21);
this.tbProject.TabIndex = 8;
//
// tbProjectIndex
//
this.tbProjectIndex.Location = new System.Drawing.Point(458, 69);
this.tbProjectIndex.Margin = new System.Windows.Forms.Padding(4);
this.tbProjectIndex.Name = "tbProjectIndex";
this.tbProjectIndex.ReadOnly = true;
this.tbProjectIndex.Size = new System.Drawing.Size(64, 21);
this.tbProjectIndex.TabIndex = 9;
this.tbProjectIndex.TabStop = false;
this.tbProjectIndex.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// tbOt
//
this.tbOt.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "ot", true));
this.tbOt.Font = new System.Drawing.Font("맑은 고딕", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.tbOt.ForeColor = System.Drawing.Color.Red;
this.tbOt.Location = new System.Drawing.Point(224, 151);
this.tbOt.Name = "tbOt";
this.tbOt.Size = new System.Drawing.Size(77, 33);
this.tbOt.TabIndex = 17;
this.tbOt.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// tbWW
//
this.tbWW.Location = new System.Drawing.Point(321, 14);
this.tbWW.Margin = new System.Windows.Forms.Padding(4);
this.tbWW.Name = "tbWW";
this.tbWW.ReadOnly = true;
this.tbWW.Size = new System.Drawing.Size(63, 21);
this.tbWW.TabIndex = 2;
this.tbWW.TabStop = false;
this.tbWW.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// cmbProcess
//
this.cmbProcess.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbProcess.FormattingEnabled = true;
this.cmbProcess.Location = new System.Drawing.Point(339, 123);
this.cmbProcess.Name = "cmbProcess";
this.cmbProcess.Size = new System.Drawing.Size(183, 20);
this.cmbProcess.TabIndex = 15;
//
// cmbState
//
this.cmbState.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.cmbState.FormattingEnabled = true;
this.cmbState.Location = new System.Drawing.Point(421, 14);
this.cmbState.Margin = new System.Windows.Forms.Padding(4);
this.cmbState.Name = "cmbState";
this.cmbState.Size = new System.Drawing.Size(101, 20);
this.cmbState.TabIndex = 4;
//
// cmbPackage
//
this.cmbPackage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPackage.FormattingEnabled = true;
this.cmbPackage.Location = new System.Drawing.Point(339, 97);
this.cmbPackage.Name = "cmbPackage";
this.cmbPackage.Size = new System.Drawing.Size(183, 20);
this.cmbPackage.TabIndex = 12;
//
// cmbRequest
//
this.cmbRequest.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbRequest.FormattingEnabled = true;
this.cmbRequest.Location = new System.Drawing.Point(141, 97);
this.cmbRequest.Name = "cmbRequest";
this.cmbRequest.Size = new System.Drawing.Size(183, 20);
this.cmbRequest.TabIndex = 11;
//
// ta
//
@@ -167,169 +351,43 @@
this.tam.ProjectsTableAdapter = null;
this.tam.UpdateOrder = FPJ0000.dsPRJTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete;
//
// pdateTextBox
//
this.pdateTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "pdate", true));
this.pdateTextBox.Location = new System.Drawing.Point(98, 38);
this.pdateTextBox.Name = "pdateTextBox";
this.pdateTextBox.Size = new System.Drawing.Size(200, 21);
this.pdateTextBox.TabIndex = 5;
//
// groupTextBox
//
this.groupTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "requestpart", true));
this.groupTextBox.Location = new System.Drawing.Point(98, 65);
this.groupTextBox.Name = "groupTextBox";
this.groupTextBox.Size = new System.Drawing.Size(200, 21);
this.groupTextBox.TabIndex = 7;
//
// memoTextBox
//
this.memoTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "remark", true));
this.memoTextBox.Location = new System.Drawing.Point(98, 233);
this.memoTextBox.Name = "memoTextBox";
this.memoTextBox.Size = new System.Drawing.Size(200, 21);
this.memoTextBox.TabIndex = 13;
//
// hrsTextBox
//
this.hrsTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "hrs", true));
this.hrsTextBox.Location = new System.Drawing.Point(221, 120);
this.hrsTextBox.Name = "hrsTextBox";
this.hrsTextBox.Size = new System.Drawing.Size(77, 21);
this.hrsTextBox.TabIndex = 17;
//
// projectidxTextBox
//
this.projectidxTextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.projectidxTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "pidx", true));
this.projectidxTextBox.Location = new System.Drawing.Point(247, 147);
this.projectidxTextBox.Name = "projectidxTextBox";
this.projectidxTextBox.Size = new System.Drawing.Size(51, 21);
this.projectidxTextBox.TabIndex = 25;
this.projectidxTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// projectTextBox
//
this.projectTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "projectName", true));
this.projectTextBox.Location = new System.Drawing.Point(99, 147);
this.projectTextBox.Name = "projectTextBox";
this.projectTextBox.Size = new System.Drawing.Size(143, 21);
this.projectTextBox.TabIndex = 27;
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1,
this.lbIndex});
this.statusStrip1.Location = new System.Drawing.Point(0, 308);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(316, 22);
this.statusStrip1.TabIndex = 28;
this.statusStrip1.Text = "statusStrip1";
//
// toolStripStatusLabel1
//
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Size = new System.Drawing.Size(36, 17);
this.toolStripStatusLabel1.Text = "Index";
//
// lbIndex
//
this.lbIndex.Name = "lbIndex";
this.lbIndex.Size = new System.Drawing.Size(17, 17);
this.lbIndex.Text = "--";
//
// comboBox1
//
this.comboBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "uid", true));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(98, 12);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(200, 20);
this.comboBox1.TabIndex = 29;
//
// typeComboBox
//
this.typeComboBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "type", true));
this.typeComboBox.FormattingEnabled = true;
this.typeComboBox.Location = new System.Drawing.Point(98, 120);
this.typeComboBox.Name = "typeComboBox";
this.typeComboBox.Size = new System.Drawing.Size(77, 20);
this.typeComboBox.TabIndex = 30;
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(60, 41);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(30, 12);
this.linkLabel1.TabIndex = 31;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "Date";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// button1
//
this.button1.Location = new System.Drawing.Point(97, 260);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(201, 31);
this.button1.TabIndex = 32;
this.button1.Text = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "package", true));
this.textBox1.Location = new System.Drawing.Point(98, 92);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(200, 21);
this.textBox1.TabIndex = 34;
//
// textBox2
//
this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "description", true));
this.textBox2.Location = new System.Drawing.Point(99, 174);
this.textBox2.Multiline = true;
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(200, 51);
this.textBox2.TabIndex = 36;
//
// fJobReport_Add
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(316, 330);
this.Controls.Add(label2);
this.Controls.Add(this.textBox2);
this.Controls.Add(label1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(typeLabel);
this.Controls.Add(this.typeComboBox);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.pdateTextBox);
this.Controls.Add(groupLabel);
this.Controls.Add(this.groupTextBox);
this.Controls.Add(uidLabel);
this.Controls.Add(memoLabel);
this.Controls.Add(this.memoTextBox);
this.Controls.Add(hrsLabel);
this.Controls.Add(this.hrsTextBox);
this.Controls.Add(this.projectidxTextBox);
this.ClientSize = new System.Drawing.Size(538, 373);
this.Controls.Add(label5);
this.Controls.Add(this.lbSummary);
this.Controls.Add(this.cmbPackage);
this.Controls.Add(this.cmbRequest);
this.Controls.Add(this.cmbState);
this.Controls.Add(stateLabel);
this.Controls.Add(this.cmbProcess);
this.Controls.Add(this.tbWW);
this.Controls.Add(label4);
this.Controls.Add(this.tbOt);
this.Controls.Add(projectLabel);
this.Controls.Add(this.projectTextBox);
this.Controls.Add(this.tbProject);
this.Controls.Add(this.tbProjectIndex);
this.Controls.Add(this.cmbUser);
this.Controls.Add(this.dtPdate);
this.Controls.Add(label2);
this.Controls.Add(this.tbDescription);
this.Controls.Add(label1);
this.Controls.Add(this.btSave);
this.Controls.Add(typeLabel);
this.Controls.Add(this.cmbType);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(hrsLabel);
this.Controls.Add(this.tbHrs);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "fJobReport_Add";
this.Text = "fJobReport_Add";
this.Text = "업무일지 등록/변경";
this.Load += new System.EventHandler(this.fJobReport_Add_Load);
((System.ComponentModel.ISupportInitialize)(this.dsPRJ)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dsPRJ)).EndInit();
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
@@ -343,20 +401,23 @@
private System.Windows.Forms.BindingSource bs;
private dsPRJTableAdapters.JobReportTableAdapter ta;
private dsPRJTableAdapters.TableAdapterManager tam;
private System.Windows.Forms.TextBox pdateTextBox;
private System.Windows.Forms.TextBox groupTextBox;
private System.Windows.Forms.TextBox memoTextBox;
private System.Windows.Forms.TextBox hrsTextBox;
private System.Windows.Forms.TextBox projectidxTextBox;
private System.Windows.Forms.TextBox projectTextBox;
private System.Windows.Forms.TextBox tbHrs;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.ToolStripStatusLabel lbIndex;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.ComboBox typeComboBox;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.ComboBox cmbType;
private System.Windows.Forms.Button btSave;
private System.Windows.Forms.TextBox tbDescription;
private System.Windows.Forms.DateTimePicker dtPdate;
private System.Windows.Forms.ComboBox cmbUser;
private System.Windows.Forms.TextBox tbProject;
private System.Windows.Forms.TextBox tbProjectIndex;
private System.Windows.Forms.TextBox tbOt;
private System.Windows.Forms.TextBox tbWW;
private System.Windows.Forms.ComboBox cmbProcess;
private System.Windows.Forms.ComboBox cmbState;
private System.Windows.Forms.ComboBox cmbPackage;
private System.Windows.Forms.ComboBox cmbRequest;
private System.Windows.Forms.Label lbSummary;
}
}

View File

@@ -16,6 +16,20 @@ namespace FPJ0000.JobReport
{
InitializeComponent();
dr =dr_;
this.KeyPreview = true;
this.StartPosition = FormStartPosition.CenterScreen;
this.KeyDown += (s1, e1) =>
{
if (e1.KeyCode == Keys.Escape) this.Close();
};
foreach (Control ctl in this.Controls)
{
if (ctl.GetType() == typeof(TextBox) || ctl.GetType() == typeof(ComboBox))
{
ctl.KeyDown += ctl_KeyDown;
}
}
}
private void fJobReport_Add_Load(object sender, EventArgs e)
@@ -23,21 +37,310 @@ namespace FPJ0000.JobReport
//사용자목록
this.bs.DataSource = dr;
}
//상태
var stateList = FCOMMON.DBM.getCodeTable("12");
this.cmbState.DisplayMember = "Value";
this.cmbState.ValueMember = "Value";
this.cmbState.DataSource = stateList;
this.cmbState.Text = dr.status;
//요청부서
var dt_request = FCOMMON.DBM.getCodeTable("13");
this.cmbRequest.DisplayMember = "Value";
this.cmbRequest.ValueMember = "Value";
this.cmbRequest.DataSource = dt_request;
//패키지
var dt_package = FCOMMON.DBM.getCodeTable("14");
this.cmbPackage.DisplayMember = "Value";
this.cmbPackage.ValueMember = "Value";
this.cmbPackage.DataSource = dt_package;
//타입
var dt_type = FCOMMON.DBM.getCodeTable("15");
this.cmbType.DisplayMember = "Value";
this.cmbType.ValueMember = "Value";
this.cmbType.DataSource = dt_type;
//공정
var dt_process = FCOMMON.DBM.getCodeTable("16");
this.cmbProcess.DisplayMember = "Value";
this.cmbProcess.ValueMember = "Value";
this.cmbProcess.DataSource = dt_process;
//담당자목록
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;
if (FCOMMON.info.Login.level < 5) cmbUser.Enabled = false;
// tbWW.Text = dr.ww;
dtPdate.Value = DateTime.Parse(dr.pdate); //일자선택
cmbUser.SelectedValue = dr.wuid;
tbProject.Text = dr.projectName;
cmbRequest.SelectedValue = dr.requestpart;
cmbPackage.SelectedValue = dr.package;
cmbType.SelectedValue = dr.type;
cmbProcess.SelectedValue = dr.process;
if (cmbRequest.Text == "") cmbRequest.Text = "EE1";
if (cmbPackage.Text == "") cmbPackage.Text = "Common";
//프로젝트 번호 확인(프로젝트번호가 바뀌면 데이터를 업데이트 해준다)
if (dr.IspidxNull())
{
tbProjectIndex.Tag = -1;
tbProjectIndex.Text = "-1";
}
else
{
tbProjectIndex.Tag = dr.pidx;
tbProjectIndex.Text = dr.pidx.ToString();
}
this.Show();
Application.DoEvents();
tbProject.Focus();
tbProject.SelectAll();
}
void ctl_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
Control ctl = sender as Control;
string nm = ctl.Name.ToLower();
string search = ctl.Text.Trim();
Console.WriteLine("inner keydown " + nm + ":" + search);
switch (nm)
{
//case "cmbrequest":
// //요청자가 마지막으로 입력한 자료의 process 를 찾아서 기입해준다.
// var lastprocess = FCOMMON.DBM.getFirstValue("process", "purchase", "request like '%" + this.cmbUser.Text + "%'", "pdate desc");
// if (lastprocess != "") cbProcess.Text = lastprocess;
// tbSID.Focus();
// break;
case "tbdescription":
if(e.Control)
{
btSave.Focus();
}
break;
case "tbproject":
if (search != "")
{
FCM0000.fLovProject f = new FCM0000.fLovProject("%" + search + "%");
if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
this.tbProject.Text = f.Title;
this.tbProjectIndex.Text = f.Index.ToString();
tbHrs.Focus();
tbHrs.SelectAll();
if(tbProjectIndex.Tag.ToString() != f.Index.ToString())
{
//마지막 데이터를 찾아서 공정등의 정보를 업데이트한다.
var uid = cmbUser.SelectedValue.ToString();
var lastDt = FCOMMON.DBM.getLastJobReportData(uid,f.Index);
if(lastDt != null && lastDt.Rows.Count > 0)
{
var predr = lastDt.Rows[0];
if (predr["requestpart"] != DBNull.Value)
this.cmbRequest.Text = predr["requestpart"].ToString(); //190506
if (predr["package"] != DBNull.Value)
this.cmbPackage.Text = predr["package"].ToString(); //190506
if (predr["type"] != DBNull.Value)
this.cmbType.Text = predr["type"].ToString(); //190506
if (predr["process"] != DBNull.Value)
cmbProcess.Text = predr["process"].ToString(); //190506
}
}
}
else
{
//이름만 사용한다.
tbProjectIndex.Text = "-1";
cmbRequest.Focus();
}
}
else
{
FCOMMON.Util.MsgE("프로젝트 혹은 아이템이름은 반드시 입력되어야 합니다.");
var tb = sender as TextBox;
tb.SelectAll();
tb.Focus();
}
break;
default:
SendKeys.Send("{TAB}");
break;
}
}
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
FCM0000.fSelectDate f = new FCM0000.fSelectDate(pdateTextBox.Text);
FCM0000.fSelectDate f = new FCM0000.fSelectDate(this.dtPdate.Value.ToShortDateString());
if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
pdateTextBox.Text = f.dtSelect.ToShortDateString();
dtPdate.Value = f.dtSelect;
}
private void button1_Click(object sender, EventArgs e)
{
this.Invalidate();
//if(tbProject.Text.Trim() == "")
//{
// FCOMMON.Util.MsgE("프로젝트(아이템) 명칭이 없습니다.");
// tbProject.Focus();
// return;
//}
if(cmbType.Text != "휴가" && tbDescription.Text.Trim()=="")
{
FCOMMON.Util.MsgE("진행 내용이 없습니다.");
tbDescription.Focus();
return;
}
float hour = Single.Parse(tbHrs.Text) + Single.Parse(tbOt.Text);
if(hour == 0)
{
FCOMMON.Util.MsgE("근무시간/초과시간이 입력되지 않았습니다.");
if (tbHrs.Enabled) tbHrs.Focus();
else tbOt.Focus();
return;
}
if (cmbType.Text.Trim() == "")
{
FCOMMON.Util.MsgE("업무형태를 선택하세요");
cmbType.Focus();
return;
}
if (cmbProcess.Text.Trim() == "")
{
FCOMMON.Util.MsgE("공정을 선택하세요");
cmbProcess.Focus();
return;
}
if(cmbUser.SelectedIndex <0)
{
FCOMMON.Util.MsgE("담당자가 선택되지 않았습니다.");
cmbUser.Focus();
return;
}
///휴일체크
var taQ = new dsQueryTableAdapters.QueriesTableAdapter();
var freeday = taQ.CheckHoliday(dtPdate.Value.ToShortDateString());
if(freeday != null && freeday ==true)
{
var hrs = float.Parse(tbHrs.Text);
if(hrs > 0)
{
FCOMMON.Util.MsgI("입력일자는 휴일로 등록되어 있습니다.\n\n근무시간은 OT에 입력하시기 바랍니다.");
//tbOt.Text = tbHrs.Text;
tbHrs.Text = "0";
tbHrs.Focus();
return;
}
}
this.dr.uid = this.cmbUser.SelectedValue.ToString();
this.dr.pdate = dtPdate.Value.ToShortDateString();
this.dr.status = cmbState.Text;
this.dr.projectName = tbProject.Text;
if (tbProjectIndex.Text != "") dr.pidx = int.Parse(tbProjectIndex.Text);
else dr.SetpidxNull();
this.dr.requestpart = cmbRequest.Text;
this.dr.package = cmbPackage.Text;
this.dr.type = cmbType.Text;
this.dr.process = cmbProcess.Text;
if (tbHrs.Text != "") this.dr.hrs = double.Parse(tbHrs.Text);
else this.dr.hrs = 0;
if (tbOt.Text != "") this.dr.ot = double.Parse(tbOt.Text);
else this.dr.ot = 0;
this.dr.description = tbDescription.Text.Trim();
this.bs.EndEdit();
DialogResult = System.Windows.Forms.DialogResult.OK;
}
private void cmbType_SelectedIndexChanged(object sender, EventArgs e)
{
if(cmbType.Text.Trim() != "" &&
cmbType.SelectedIndex >= 0 &&
cmbProcess.SelectedIndex < 0 &&
cmbUser.SelectedValue != null)
{
//공정을 자동선택해준다.
//마지막 데이터를 찾아서 공정등의 정보를 업데이트한다.
var uid = cmbUser.SelectedValue.ToString();
var lastDt = FCOMMON.DBM.getLastJobReportData(uid,cmbType.Text.Trim());
if (lastDt != null && lastDt.Rows.Count > 0)
{
var predr = lastDt.Rows[0];// as dsPRJ.JobReportRow;
if(predr["process"] != DBNull.Value)
cmbProcess.Text = predr["process"].ToString(); //190506
}
}
}
private void dtPdate_ValueChanged(object sender, EventArgs e)
{
var myCI = new System.Globalization.CultureInfo("ko-KR");
var myCal = myCI.Calendar;
var myCWR = myCI.DateTimeFormat.CalendarWeekRule;
DayOfWeek myFirstDOW = myCI.DateTimeFormat.FirstDayOfWeek;
var dat = myCal.GetWeekOfYear(dtPdate.Value, myCWR, myFirstDOW);
tbWW.Text = "ww"+dat.ToString();
UpdateWOrkTime();
//공휴일이면 시간을 초기화한다.
if (tbHrs.Text == "") tbHrs.Text = "0";
if (tbOt.Text == "") tbOt.Text = "0";
float hrs = float.Parse(tbHrs.Text);
if (dtPdate.Value.DayOfWeek == DayOfWeek.Saturday || dtPdate.Value.DayOfWeek == DayOfWeek.Sunday)
{
tbHrs.Enabled = false;
if (hrs != 0)
{
FCOMMON.Util.MsgI("공휴일에는 근무시간을 입력할 수 없습니다.\n초과시간에 입력하세요.\n\n해당 값은 삭제 됩니다.");
tbHrs.Text = "0";
if (hrs != 8) tbOt.Text = hrs.ToString();
tbOt.Focus();
}
}
else tbHrs.Enabled = true;
}
void UpdateWOrkTime()
{
//이번달 근무시간 및 초과시간 구하기
if (cmbUser.SelectedValue != null)
{
int work, ot, total;
FCOMMON.DBM.getWorkTime(cmbUser.SelectedValue.ToString(), dtPdate.Value.ToString("yyyy-MM"), out work, out total, out ot);
string msg = "금월 근무시간 : {0:N1}h / {1:N0}h\n금월 초과시간 : {2:N1}h";
lbSummary.Text = string.Format(msg, work, total, ot);
}
else
{
lbSummary.Text = "--";
}
}
private void cmbUser_SelectedIndexChanged(object sender, EventArgs e)
{
if(cmbUser.SelectedIndex >=0)
UpdateWOrkTime();;
}
}
}

View File

@@ -117,21 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="groupLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="uidLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="memoLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="hrsLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="projectLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="typeLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
@@ -141,19 +129,37 @@
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="dsPRJ.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<metadata name="projectLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="stateLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>100, 17</value>
</metadata>
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>100, 17</value>
</metadata>
<metadata name="dsPRJ.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="dsPRJ.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>299, 17</value>
</metadata>
<metadata name="ta.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>164, 17</value>
</metadata>
<metadata name="tam.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>226, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>299, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,89 @@
namespace FPJ0000.JobReport
{
partial class rJobReport
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
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.ta = new FPJ0000.dsReportTableAdapters.jobReportTableAdapter();
((System.ComponentModel.ISupportInitialize)(this.dsReport)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
this.SuspendLayout();
//
// reportViewer1
//
this.reportViewer1.Dock = System.Windows.Forms.DockStyle.Fill;
reportDataSource1.Name = "DataSet1";
reportDataSource1.Value = this.bs;
this.reportViewer1.LocalReport.DataSources.Add(reportDataSource1);
this.reportViewer1.LocalReport.ReportEmbeddedResource = "FPJ0000.JobReport.rJobReport.rdlc";
this.reportViewer1.Location = new System.Drawing.Point(0, 0);
this.reportViewer1.Name = "reportViewer1";
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;
//
// rJobReport
//
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.Name = "rJobReport";
this.Text = "rJobReport";
this.Load += new System.EventHandler(this.rJobReport_Load);
((System.ComponentModel.ISupportInitialize)(this.dsReport)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit();
this.ResumeLayout(false);
}
#endregion
private Microsoft.Reporting.WinForms.ReportViewer reportViewer1;
private System.Windows.Forms.BindingSource bs;
private dsReport dsReport;
private dsReportTableAdapters.jobReportTableAdapter ta;
}
}

View File

@@ -0,0 +1,28 @@
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 rJobReport : Form
{
public rJobReport()
{
InitializeComponent();
this.WindowState = FormWindowState.Maximized;
}
private void rJobReport_Load(object sender, EventArgs e)
{
this.ta.Fill(this.dsReport.jobReport, DateTime.Now.Year.ToString("0000"));
this.reportViewer1.SetDisplayMode( Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
this.reportViewer1.RefreshReport();
}
}
}

View File

@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>119, 17</value>
</metadata>
<metadata name="dsReport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ta.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>183, 17</value>
</metadata>
</root>