..
This commit is contained in:
		
							
								
								
									
										373
									
								
								SubProject/FPJ0000/JobReport/fJobChartMenu.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										373
									
								
								SubProject/FPJ0000/JobReport/fJobChartMenu.Designer.cs
									
									
									
										generated
									
									
									
								
							| @@ -1,144 +1,231 @@ | ||||
| namespace FPJ0000.JobReport | ||||
| { | ||||
|     partial class fJobChartMenu | ||||
|     { | ||||
|         /// <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() | ||||
|         { | ||||
|             System.Windows.Forms.Label label1; | ||||
|             System.Windows.Forms.Label label2; | ||||
|             System.Windows.Forms.Label label3; | ||||
|             this.tbName = new System.Windows.Forms.TextBox(); | ||||
|             this.tbUID = new System.Windows.Forms.TextBox(); | ||||
|             this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); | ||||
|             this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker(); | ||||
|             this.btOK = new System.Windows.Forms.Button(); | ||||
|             label1 = new System.Windows.Forms.Label(); | ||||
|             label2 = new System.Windows.Forms.Label(); | ||||
|             label3 = new System.Windows.Forms.Label(); | ||||
|             this.SuspendLayout(); | ||||
|             //  | ||||
|             // label1 | ||||
|             //  | ||||
|             label1.AutoSize = true; | ||||
|             label1.Location = new System.Drawing.Point(26, 22); | ||||
|             label1.Name = "label1"; | ||||
|             label1.Size = new System.Drawing.Size(41, 12); | ||||
|             label1.TabIndex = 0; | ||||
|             label1.Text = "사용자"; | ||||
|             //  | ||||
|             // label2 | ||||
|             //  | ||||
|             label2.AutoSize = true; | ||||
|             label2.Location = new System.Drawing.Point(26, 51); | ||||
|             label2.Name = "label2"; | ||||
|             label2.Size = new System.Drawing.Size(41, 12); | ||||
|             label2.TabIndex = 3; | ||||
|             label2.Text = "시작일"; | ||||
|             //  | ||||
|             // label3 | ||||
|             //  | ||||
|             label3.AutoSize = true; | ||||
|             label3.Location = new System.Drawing.Point(26, 78); | ||||
|             label3.Name = "label3"; | ||||
|             label3.Size = new System.Drawing.Size(41, 12); | ||||
|             label3.TabIndex = 5; | ||||
|             label3.Text = "종료일"; | ||||
|             //  | ||||
|             // tbName | ||||
|             //  | ||||
|             this.tbName.Location = new System.Drawing.Point(79, 18); | ||||
|             this.tbName.Name = "tbName"; | ||||
|             this.tbName.Size = new System.Drawing.Size(123, 21); | ||||
|             this.tbName.TabIndex = 1; | ||||
|             //  | ||||
|             // tbUID | ||||
|             //  | ||||
|             this.tbUID.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); | ||||
|             this.tbUID.Location = new System.Drawing.Point(208, 18); | ||||
|             this.tbUID.Name = "tbUID"; | ||||
|             this.tbUID.Size = new System.Drawing.Size(123, 21); | ||||
|             this.tbUID.TabIndex = 2; | ||||
|             this.tbUID.TabStop = false; | ||||
|             this.tbUID.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; | ||||
|             //  | ||||
|             // dateTimePicker1 | ||||
|             //  | ||||
|             this.dateTimePicker1.Location = new System.Drawing.Point(79, 45); | ||||
|             this.dateTimePicker1.Name = "dateTimePicker1"; | ||||
|             this.dateTimePicker1.Size = new System.Drawing.Size(252, 21); | ||||
|             this.dateTimePicker1.TabIndex = 4; | ||||
|             //  | ||||
|             // dateTimePicker2 | ||||
|             //  | ||||
|             this.dateTimePicker2.Location = new System.Drawing.Point(79, 72); | ||||
|             this.dateTimePicker2.Name = "dateTimePicker2"; | ||||
|             this.dateTimePicker2.Size = new System.Drawing.Size(252, 21); | ||||
|             this.dateTimePicker2.TabIndex = 6; | ||||
|             //  | ||||
|             // btOK | ||||
|             //  | ||||
|             this.btOK.Location = new System.Drawing.Point(79, 101); | ||||
|             this.btOK.Name = "btOK"; | ||||
|             this.btOK.Size = new System.Drawing.Size(252, 27); | ||||
|             this.btOK.TabIndex = 7; | ||||
|             this.btOK.Text = "확인"; | ||||
|             this.btOK.UseVisualStyleBackColor = true; | ||||
|             this.btOK.Click += new System.EventHandler(this.btOK_Click); | ||||
|             //  | ||||
|             // fJobChartMenu | ||||
|             //  | ||||
|             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); | ||||
|             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | ||||
|             this.ClientSize = new System.Drawing.Size(356, 146); | ||||
|             this.Controls.Add(this.btOK); | ||||
|             this.Controls.Add(label3); | ||||
|             this.Controls.Add(this.dateTimePicker2); | ||||
|             this.Controls.Add(label2); | ||||
|             this.Controls.Add(this.dateTimePicker1); | ||||
|             this.Controls.Add(this.tbUID); | ||||
|             this.Controls.Add(this.tbName); | ||||
|             this.Controls.Add(label1); | ||||
|             this.MaximizeBox = false; | ||||
|             this.MinimizeBox = false; | ||||
|             this.Name = "fJobChartMenu"; | ||||
|             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | ||||
|             this.Text = "작업 분포 확인"; | ||||
|             this.Load += new System.EventHandler(this.fJobChartMenu_Load); | ||||
|             this.ResumeLayout(false); | ||||
|             this.PerformLayout(); | ||||
|  | ||||
|         } | ||||
|  | ||||
|         #endregion | ||||
|  | ||||
|         private System.Windows.Forms.TextBox tbName; | ||||
|         private System.Windows.Forms.TextBox tbUID; | ||||
|         private System.Windows.Forms.DateTimePicker dateTimePicker1; | ||||
|         private System.Windows.Forms.DateTimePicker dateTimePicker2; | ||||
|         private System.Windows.Forms.Button btOK; | ||||
|     } | ||||
| namespace FPJ0000.JobReport | ||||
| { | ||||
|     partial class fJobChartMenu | ||||
|     { | ||||
|         /// <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.panel1 = new System.Windows.Forms.Panel(); | ||||
|             this.cmbUser = new System.Windows.Forms.ComboBox(); | ||||
|             this.label4 = new System.Windows.Forms.Label(); | ||||
|             this.label3 = new System.Windows.Forms.Label(); | ||||
|             this.dte = new System.Windows.Forms.DateTimePicker(); | ||||
|             this.label2 = new System.Windows.Forms.Label(); | ||||
|             this.dts = new System.Windows.Forms.DateTimePicker(); | ||||
|             this.tbProcess = new System.Windows.Forms.ComboBox(); | ||||
|             this.label1 = new System.Windows.Forms.Label(); | ||||
|             this.btRefresh = new System.Windows.Forms.Button(); | ||||
|             this.fpSpread1 = new FarPoint.Win.Spread.FpSpread(); | ||||
|             this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView(); | ||||
|             this.btSave = new System.Windows.Forms.Button(); | ||||
|             this.panel1.SuspendLayout(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).BeginInit(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).BeginInit(); | ||||
|             this.SuspendLayout(); | ||||
|             //  | ||||
|             // panel1 | ||||
|             //  | ||||
|             this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); | ||||
|             this.panel1.Controls.Add(this.btSave); | ||||
|             this.panel1.Controls.Add(this.cmbUser); | ||||
|             this.panel1.Controls.Add(this.label4); | ||||
|             this.panel1.Controls.Add(this.label3); | ||||
|             this.panel1.Controls.Add(this.dte); | ||||
|             this.panel1.Controls.Add(this.label2); | ||||
|             this.panel1.Controls.Add(this.dts); | ||||
|             this.panel1.Controls.Add(this.tbProcess); | ||||
|             this.panel1.Controls.Add(this.label1); | ||||
|             this.panel1.Controls.Add(this.btRefresh); | ||||
|             this.panel1.Dock = System.Windows.Forms.DockStyle.Top; | ||||
|             this.panel1.Location = new System.Drawing.Point(0, 0); | ||||
|             this.panel1.Name = "panel1"; | ||||
|             this.panel1.Padding = new System.Windows.Forms.Padding(5); | ||||
|             this.panel1.Size = new System.Drawing.Size(888, 58); | ||||
|             this.panel1.TabIndex = 1; | ||||
|             //  | ||||
|             // cmbUser | ||||
|             //  | ||||
|             this.cmbUser.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; | ||||
|             this.cmbUser.FormattingEnabled = true; | ||||
|             this.cmbUser.Location = new System.Drawing.Point(289, 32); | ||||
|             this.cmbUser.Name = "cmbUser"; | ||||
|             this.cmbUser.Size = new System.Drawing.Size(180, 20); | ||||
|             this.cmbUser.TabIndex = 11; | ||||
|             //  | ||||
|             // label4 | ||||
|             //  | ||||
|             this.label4.AutoSize = true; | ||||
|             this.label4.Location = new System.Drawing.Point(254, 36); | ||||
|             this.label4.Name = "label4"; | ||||
|             this.label4.Size = new System.Drawing.Size(29, 12); | ||||
|             this.label4.TabIndex = 10; | ||||
|             this.label4.Text = "사원"; | ||||
|             //  | ||||
|             // label3 | ||||
|             //  | ||||
|             this.label3.AutoSize = true; | ||||
|             this.label3.Location = new System.Drawing.Point(261, 12); | ||||
|             this.label3.Name = "label3"; | ||||
|             this.label3.Size = new System.Drawing.Size(14, 12); | ||||
|             this.label3.TabIndex = 9; | ||||
|             this.label3.Text = "~"; | ||||
|             //  | ||||
|             // dte | ||||
|             //  | ||||
|             this.dte.Location = new System.Drawing.Point(289, 8); | ||||
|             this.dte.Name = "dte"; | ||||
|             this.dte.Size = new System.Drawing.Size(180, 21); | ||||
|             this.dte.TabIndex = 8; | ||||
|             //  | ||||
|             // label2 | ||||
|             //  | ||||
|             this.label2.AutoSize = true; | ||||
|             this.label2.Location = new System.Drawing.Point(10, 12); | ||||
|             this.label2.Name = "label2"; | ||||
|             this.label2.Size = new System.Drawing.Size(53, 12); | ||||
|             this.label2.TabIndex = 7; | ||||
|             this.label2.Text = "검색기간"; | ||||
|             //  | ||||
|             // dts | ||||
|             //  | ||||
|             this.dts.Location = new System.Drawing.Point(68, 8); | ||||
|             this.dts.Name = "dts"; | ||||
|             this.dts.Size = new System.Drawing.Size(180, 21); | ||||
|             this.dts.TabIndex = 6; | ||||
|             //  | ||||
|             // tbProcess | ||||
|             //  | ||||
|             this.tbProcess.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; | ||||
|             this.tbProcess.FormattingEnabled = true; | ||||
|             this.tbProcess.Location = new System.Drawing.Point(68, 32); | ||||
|             this.tbProcess.Name = "tbProcess"; | ||||
|             this.tbProcess.Size = new System.Drawing.Size(180, 20); | ||||
|             this.tbProcess.TabIndex = 5; | ||||
|             this.tbProcess.SelectedIndexChanged += new System.EventHandler(this.tbProcess_SelectedIndexChanged); | ||||
|             //  | ||||
|             // label1 | ||||
|             //  | ||||
|             this.label1.AutoSize = true; | ||||
|             this.label1.Location = new System.Drawing.Point(34, 36); | ||||
|             this.label1.Name = "label1"; | ||||
|             this.label1.Size = new System.Drawing.Size(29, 12); | ||||
|             this.label1.TabIndex = 3; | ||||
|             this.label1.Text = "공정"; | ||||
|             //  | ||||
|             // btRefresh | ||||
|             //  | ||||
|             this.btRefresh.Dock = System.Windows.Forms.DockStyle.Right; | ||||
|             this.btRefresh.Location = new System.Drawing.Point(808, 5); | ||||
|             this.btRefresh.Name = "btRefresh"; | ||||
|             this.btRefresh.Size = new System.Drawing.Size(75, 48); | ||||
|             this.btRefresh.TabIndex = 2; | ||||
|             this.btRefresh.Text = "새로고침"; | ||||
|             this.btRefresh.UseVisualStyleBackColor = true; | ||||
|             this.btRefresh.Click += new System.EventHandler(this.btRefresh_Click); | ||||
|             //  | ||||
|             // fpSpread1 | ||||
|             //  | ||||
|             this.fpSpread1.AccessibleDescription = ""; | ||||
|             this.fpSpread1.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.fpSpread1.Location = new System.Drawing.Point(0, 58); | ||||
|             this.fpSpread1.Name = "fpSpread1"; | ||||
|             this.fpSpread1.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] { | ||||
|             this.fpSpread1_Sheet1}); | ||||
|             this.fpSpread1.Size = new System.Drawing.Size(888, 638); | ||||
|             this.fpSpread1.TabIndex = 4; | ||||
|             //  | ||||
|             // 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.ColumnFooter.DefaultStyle.BackColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.ColumnFooter.DefaultStyle.ForeColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.ColumnFooterSheetCornerStyle.BackColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.ColumnFooterSheetCornerStyle.ForeColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.ColumnHeader.DefaultStyle.BackColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.ColumnHeader.DefaultStyle.ForeColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.DefaultStyle.BackColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.DefaultStyle.ForeColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.FilterBar.DefaultStyle.BackColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.FilterBar.DefaultStyle.ForeColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.FilterBarHeaderStyle.BackColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.FilterBarHeaderStyle.ForeColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.RowHeader.DefaultStyle.BackColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.RowHeader.DefaultStyle.ForeColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.SheetCornerStyle.BackColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.SheetCornerStyle.ForeColor = System.Drawing.Color.Empty; | ||||
|             this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1; | ||||
|             //  | ||||
|             // btSave | ||||
|             //  | ||||
|             this.btSave.Dock = System.Windows.Forms.DockStyle.Right; | ||||
|             this.btSave.Location = new System.Drawing.Point(733, 5); | ||||
|             this.btSave.Name = "btSave"; | ||||
|             this.btSave.Size = new System.Drawing.Size(75, 48); | ||||
|             this.btSave.TabIndex = 13; | ||||
|             this.btSave.Text = "파일저장"; | ||||
|             this.btSave.UseVisualStyleBackColor = true; | ||||
|             this.btSave.Click += new System.EventHandler(this.btSave_Click); | ||||
|             //  | ||||
|             // fJobChartMenu | ||||
|             //  | ||||
|             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); | ||||
|             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | ||||
|             this.ClientSize = new System.Drawing.Size(888, 696); | ||||
|             this.Controls.Add(this.fpSpread1); | ||||
|             this.Controls.Add(this.panel1); | ||||
|             this.Name = "fJobChartMenu"; | ||||
|             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | ||||
|             this.Text = "작업 분포 확인"; | ||||
|             this.WindowState = System.Windows.Forms.FormWindowState.Maximized; | ||||
|             this.Load += new System.EventHandler(this.fJobChartMenu_Load); | ||||
|             this.panel1.ResumeLayout(false); | ||||
|             this.panel1.PerformLayout(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).EndInit(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).EndInit(); | ||||
|             this.ResumeLayout(false); | ||||
|  | ||||
|         } | ||||
|  | ||||
|         #endregion | ||||
|  | ||||
|         private System.Windows.Forms.Panel panel1; | ||||
|         private System.Windows.Forms.ComboBox cmbUser; | ||||
|         private System.Windows.Forms.Label label4; | ||||
|         private System.Windows.Forms.Label label3; | ||||
|         private System.Windows.Forms.DateTimePicker dte; | ||||
|         private System.Windows.Forms.Label label2; | ||||
|         private System.Windows.Forms.DateTimePicker dts; | ||||
|         private System.Windows.Forms.ComboBox tbProcess; | ||||
|         private System.Windows.Forms.Label label1; | ||||
|         private System.Windows.Forms.Button btRefresh; | ||||
|         private FarPoint.Win.Spread.FpSpread fpSpread1; | ||||
|         private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1; | ||||
|         private System.Windows.Forms.Button btSave; | ||||
|     } | ||||
| } | ||||
| @@ -1,4 +1,5 @@ | ||||
| using System; | ||||
| using FarPoint.Win; | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.ComponentModel; | ||||
| using System.Data; | ||||
| @@ -11,25 +12,353 @@ namespace FPJ0000.JobReport | ||||
| { | ||||
|     public partial class fJobChartMenu : Form | ||||
|     { | ||||
|         public fJobChartMenu(string name, string no) | ||||
|         Boolean binit = false; | ||||
|  | ||||
|         public fJobChartMenu() | ||||
|         { | ||||
|             InitializeComponent(); | ||||
|             this.tbName.Text = name; | ||||
|             this.tbUID.Text = no; | ||||
|             this.dts.Value = DateTime.Parse(DateTime.Now.AddMonths(-1).ToString("yyyy-MM-01")); | ||||
|             this.dte.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-01")).AddDays(-1); | ||||
|         } | ||||
|  | ||||
|         private void btOK_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             var f = new JobReport.rJobChart(tbUID.Text,dateTimePicker1.Value.ToShortDateString(),dateTimePicker2.Value.ToShortDateString()); | ||||
|             f.Show(); | ||||
|         } | ||||
|  | ||||
|         private void fJobChartMenu_Load(object sender, EventArgs e) | ||||
|         { | ||||
|            // this.tbUID.Text = FCOMMON.info.Login.no; | ||||
|             //this.tbName.Text = FCOMMON.info.Login.nameK; | ||||
|             this.dateTimePicker1.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-01")); | ||||
|             this.dateTimePicker2.Value = this.dateTimePicker1.Value.AddMonths(1).AddDays(-1); | ||||
|             this.tbProcess.Items.Clear(); | ||||
|  | ||||
|             tbProcess.Items.Add("--전체--"); | ||||
|             var taProcess = new dsReportTableAdapters.ProcessListTableAdapter(); | ||||
|             var dtProcessList = taProcess.GetData(FCOMMON.info.Login.gcode); | ||||
|             foreach (dsReport.ProcessListRow dr in dtProcessList.Rows) | ||||
|                 tbProcess.Items.Add(dr.processs); | ||||
|  | ||||
|             //사용자의 공정명을 선택해준다 | ||||
|             this.tbProcess.Text = FCOMMON.info.Login.process; | ||||
|  | ||||
|             //프로세스가 선택되지 않았다면 전체를 선택해준다. | ||||
|             if (tbProcess.SelectedIndex < 0) tbProcess.SelectedIndex = 0; | ||||
|  | ||||
|             //사용자 목록을 선택한다 | ||||
|             UpdateUserList(); | ||||
|  | ||||
|             //엑셀파일불러오기 | ||||
|             var file = FCOMMON.Util.CurrentPath + "ReportProjectSummary.xlsx"; | ||||
|             this.fpSpread1.OpenExcel(file); | ||||
|             if (this.fpSpread1.Sheets.Count > 1) this.fpSpread1.ActiveSheetIndex = 0; | ||||
|  | ||||
|             //refrehData(); | ||||
|             binit = true; | ||||
|         } | ||||
|         void UpdateUserList() | ||||
|         { | ||||
|             var db = new EEEntities(); | ||||
|  | ||||
|             cmbUser.Items.Clear(); | ||||
|             cmbUser.Items.Add("--전체--"); | ||||
|  | ||||
|  | ||||
|             //일반사용자 목록 가져온다 | ||||
|             IQueryable<IGrouping<String, vJobReportForUser>> userlist; | ||||
|  | ||||
|             if (tbProcess.SelectedIndex <= 0) | ||||
|             { | ||||
|                 //공정구분없이 전체사용자를 가져온다 | ||||
|                 userlist = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode).OrderBy(t => t.name).GroupBy(t => t.name); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 userlist = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.userProcess == tbProcess.Text).OrderBy(t => t.name).GroupBy(t => t.name); | ||||
|             } | ||||
|  | ||||
|             //if (tbProcess.SelectedIndex != 0) userlist = userlist.Where(t => t.processs == tbProcess.Text); //해당 공정의 인원만 처리한다 | ||||
|  | ||||
|             foreach (var item in userlist) | ||||
|             { | ||||
|                 var dr = item.First(); | ||||
|                 cmbUser.Items.Add(String.Format("[{0}] {1}", dr.id, dr.name)); | ||||
|             } | ||||
|             if (tbProcess.SelectedIndex > 0) | ||||
|                 cmbUser.Text = string.Format("[{0}] {1}", FCOMMON.info.Login.no, FCOMMON.info.Login.nameK); | ||||
|  | ||||
|             if (cmbUser.SelectedIndex < 0) cmbUser.SelectedIndex = 0;  //기본전체로 선택해준다. | ||||
|         } | ||||
|  | ||||
|         void refrehData() | ||||
|         { | ||||
|             var db = new EEEntities(); | ||||
|  | ||||
|  | ||||
|             //조회공정 | ||||
|             this.fpSpread1.Sheets[0].Cells[3, 2].Value = tbProcess.Text; | ||||
|  | ||||
|             //담당자 | ||||
|             this.fpSpread1.Sheets[0].Cells[3, 3].Value = cmbUser.Text; | ||||
|  | ||||
|             //시작일:F4 | ||||
|             this.fpSpread1.Sheets[0].Cells[3, 4].Value = dts.Value; | ||||
|  | ||||
|             //종료일:G4                        | ||||
|             this.fpSpread1.Sheets[0].Cells[3, 5].Value = dte.Value; | ||||
|  | ||||
|             //근문일수,시간 | ||||
|             var vSD = dts.Value.ToShortDateString(); | ||||
|             var vED = dte.Value.ToShortDateString(); | ||||
|  | ||||
|             //휴가일수확인 | ||||
|             var drDays = db.HolidayLIst.Where(t => t.free == false && t.pdate.CompareTo(vSD) >= 0 && t.pdate.CompareTo(vED) <= 0); | ||||
|  | ||||
|             //근무일수적용 | ||||
|             if (drDays == null || drDays.Count() < 1) this.fpSpread1.Sheets[0].Cells[3, 6].Value = 0; | ||||
|             else this.fpSpread1.Sheets[0].Cells[3, 6].Value = drDays.Count(); | ||||
|  | ||||
|  | ||||
|             ComplexBorderSide left = new ComplexBorderSide(Color.Gray, 1); | ||||
|             ComplexBorderSide top = new ComplexBorderSide(Color.Gray, 1); | ||||
|             ComplexBorderSide right = new ComplexBorderSide(Color.Gray, 1); | ||||
|             ComplexBorderSide bottom = new ComplexBorderSide(Color.Gray, 1); | ||||
|  | ||||
|             //사용자목록을 가져온다 | ||||
|             List<vJobReportForUser> baseData; | ||||
|             if (cmbUser.SelectedIndex > 0) | ||||
|             { | ||||
|                 //사용자번호  | ||||
|                 var UserNo = cmbUser.Text.Substring(1, cmbUser.Text.IndexOf(']') - 1); | ||||
|                 baseData = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.id == UserNo).OrderBy(t => t.name).ToList(); | ||||
|             } | ||||
|             else if (tbProcess.SelectedIndex > 0) | ||||
|             { | ||||
|                 baseData = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.userProcess == tbProcess.Text).OrderBy(t => t.name).ToList(); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 baseData = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode).OrderBy(t => t.name).ToList(); | ||||
|             } | ||||
|  | ||||
|  | ||||
|             //사용자로 그룹해서 수량을 세명 , 사용자 숫자가 된다. | ||||
|             this.fpSpread1.Sheets[0].Cells[3, 7].Value = baseData.GroupBy(t => t.id).Count(); //인원수 | ||||
|  | ||||
|             var col = 0; | ||||
|             var row = 0; | ||||
|  | ||||
|  | ||||
|             //해당 그룹의 기간데이터를 가져온다 | ||||
|             if (cmbUser.SelectedIndex > 0) | ||||
|             { | ||||
|                 //사용자번호  | ||||
|                 var UserNo = cmbUser.Text.Substring(1, cmbUser.Text.IndexOf(']') - 1); | ||||
|                 baseData = db.vJobReportForUser | ||||
|                     .Where(t => t.gcode == FCOMMON.info.Login.gcode && t.id == UserNo && t.pdate.CompareTo(vSD) >= 0 && t.pdate.CompareTo(vED) <= 0) | ||||
|                     .OrderBy(t => t.name) | ||||
|                     .OrderBy(t => t.pdate) | ||||
|                     .ToList(); | ||||
|             } | ||||
|             else if (tbProcess.SelectedIndex > 0) | ||||
|             { | ||||
|                 baseData = db.vJobReportForUser | ||||
|                     .Where(t => t.gcode == FCOMMON.info.Login.gcode && t.pdate.CompareTo(vSD) >= 0 && t.pdate.CompareTo(vED) <= 0 && t.userProcess == tbProcess.Text) | ||||
|                     .OrderBy(t => t.name) | ||||
|                     .OrderBy(t => t.pdate) | ||||
|                     .ToList(); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 baseData = db.vJobReportForUser | ||||
|                     .Where(t => t.gcode == FCOMMON.info.Login.gcode && t.pdate.CompareTo(vSD) >= 0 && t.pdate.CompareTo(vED) <= 0) | ||||
|                     .OrderBy(t => t.name) | ||||
|                     .OrderBy(t => t.pdate) | ||||
|                     .ToList(); | ||||
|             } | ||||
|  | ||||
|             col = 0; | ||||
|             row = 1; | ||||
|             fpSpread1.Sheets[1].RowCount = baseData.GroupBy(t => t.id).Count() + 1; | ||||
|             foreach (var item in baseData.GroupBy(t => t.id)) //사용자별로 그룹을 해서 | ||||
|             { | ||||
|                 var dr = item.FirstOrDefault(); | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, 0].Value = dr.name; | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, 1].Value = dr.id; | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, 2].Value = item.Sum(t => t.hrs); | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, 3].Value = item.Sum(t => t.ot); | ||||
|                 row += 1; | ||||
|             } | ||||
|             fpSpread1.Sheets[1].ColumnCount = 5; | ||||
|             fpSpread1.Sheets[1].RowCount = row + 1; | ||||
|  | ||||
|             //Raw dat a표시 | ||||
|             row = 1; | ||||
|             this.fpSpread1.Sheets[2].RowCount = baseData.Count + 1; | ||||
|             foreach (var item in baseData) | ||||
|             { | ||||
|                 col = 0; | ||||
|                 this.fpSpread1.Sheets[3].Cells[row, col++].Value = item.id; | ||||
|                 this.fpSpread1.Sheets[3].Cells[row, col++].Value = item.name; | ||||
|                 this.fpSpread1.Sheets[3].Cells[row, col++].Value = item.pdate; | ||||
|                 this.fpSpread1.Sheets[3].Cells[row, col++].Value = item.userProcess; | ||||
|                 this.fpSpread1.Sheets[3].Cells[row, col++].Value = item.process; | ||||
|                 this.fpSpread1.Sheets[3].Cells[row, col++].Value = item.svalue; | ||||
|                 this.fpSpread1.Sheets[3].Cells[row, col++].Value = item.hrs; | ||||
|                 this.fpSpread1.Sheets[3].Cells[row, col++].Value = item.ot; | ||||
|                 this.fpSpread1.Sheets[3].Cells[row, col++].Value = item.requestpart; | ||||
|                 this.fpSpread1.Sheets[3].Cells[row, col++].Value = item.package; | ||||
|                 row += 1; | ||||
|             } | ||||
|  | ||||
|             // var dtRaw = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.pdate.CompareTo(vSD) >= 0 && t.pdate.CompareTo(vED) <= 0); | ||||
|  | ||||
|             //공정목록(우측으로 전개함) | ||||
|             col = 2; | ||||
|             var orTypeName = baseData.Where(t => t.svalue != "휴가").OrderBy(t => t.process).GroupBy(t => t.process); | ||||
|             this.fpSpread1.ActiveSheetIndex = 0; | ||||
|             foreach (var item in orTypeName) | ||||
|             { | ||||
|                 var dr = item.FirstOrDefault(); | ||||
|                 this.fpSpread1.Sheets[0].Cells[6, col++].Value = dr.process; | ||||
|                 if (col == 11) break; //목록개수를 넘었으니 더이상 진행하지 못한다 이것들은 모두 ETC에 넣는다 | ||||
|                 //col += 1; | ||||
|             } | ||||
|  | ||||
|             //나머지 열을 * 로 채운다 | ||||
|             for (int i = col; i < 11; i++) | ||||
|                 this.fpSpread1.Sheets[0].Cells[6, i].Value = "*"; | ||||
|  | ||||
|             System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("ko-KR", false); | ||||
|             FarPoint.Win.Spread.CellType.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType(); | ||||
|             numberCellType1.NegativeRed = true; | ||||
|             numberCellType1.NullDisplay = "--"; | ||||
|  | ||||
|  | ||||
|             //프로세스목록을 먼저 기록한다 | ||||
|             row = 7;             | ||||
|             var orProcess = baseData.OrderBy(t => t.requestpart).GroupBy(t => t.requestpart); | ||||
|             this.fpSpread1.Sheets[0].RowCount = 7+ orProcess.Count() + 1; | ||||
|  | ||||
|             foreach (var item in orProcess) | ||||
|             { | ||||
|                 var RequestPart = item.FirstOrDefault().requestpart; | ||||
|                 this.fpSpread1.Sheets[0].Cells[row, 1].Value = RequestPart; | ||||
|  | ||||
|                 //2번부터는 데이터를 넣어야 한다 | ||||
|                 double sumOt = 0.0; | ||||
|                 double holytime = 0.0; | ||||
|                 int coldata = 2; | ||||
|                 for (int i = 2; i < 11; i++) | ||||
|                 { | ||||
|                     var colName = fpSpread1.Sheets[0].Cells[6, i].Value.ToString(); | ||||
|  | ||||
|                     //이 이름에 해당하는 데이터의 시간을 가져온다 | ||||
|                     double ot = 0.0; | ||||
|                     double hrs = 0.0; | ||||
|                     if (colName != "*") | ||||
|                     { | ||||
|                         //double holytime = 0.0; | ||||
|                         var timeList = item.Where(t => t.process == colName); | ||||
|                         if (timeList != null) | ||||
|                         { | ||||
|                             hrs = (double)timeList.Sum(t => t.hrs); | ||||
|                             ot = (double)timeList.Sum(t => t.ot); | ||||
|                             sumOt += ot; | ||||
|                         } | ||||
|                     } | ||||
|                     if (ot + hrs == 0.0) fpSpread1.Sheets[0].Cells[row, coldata].Value = null; | ||||
|                     else fpSpread1.Sheets[0].Cells[row, coldata].Value = ot + hrs; //없음으로한다 | ||||
|  | ||||
|                     coldata += 1; | ||||
|                 } | ||||
|  | ||||
|                 //ETC영역계산 | ||||
|                 { | ||||
|                     //전체합산데이터와, 2~10까지의 데이터가 일치하지 않으면 그것이 ETC이다 | ||||
|                     var etchr = item.Sum(t => t.hrs); | ||||
|                     var etcot = item.Sum(t => t.ot); | ||||
|  | ||||
|                     //현재데이터의  hrs의 합 | ||||
|                     var subtotal = 0.0; | ||||
|                     for(int i = 2; i <11;i++) | ||||
|                     { | ||||
|                         var ivalue = fpSpread1.Sheets[0].Cells[row, i].Value; | ||||
|                         if (ivalue != null) subtotal += (double)ivalue; | ||||
|                     } | ||||
|                     var etcval = (etchr + etcot) - subtotal; | ||||
|                     fpSpread1.Sheets[0].Cells[row, 11].Value = etcval; | ||||
|                 } | ||||
|  | ||||
|                 fpSpread1.Sheets[0].Cells[row, 12].CellType = numberCellType1; | ||||
|                 fpSpread1.Sheets[0].Cells[row, 12].ParseFormatString = "N1"; | ||||
|                 fpSpread1.Sheets[0].Cells[row, 12].Formula = string.Format("SUM(C{0}:G{0})+L{0}", row + 1); | ||||
|                  | ||||
|                 //H8 /$I$4 | ||||
|                 if (sumOt == 0.0) fpSpread1.Sheets[0].Cells[row, 13].Value = null; //OT합계 | ||||
|                 else fpSpread1.Sheets[0].Cells[row, 13].Value = sumOt; //OT합계 | ||||
|  | ||||
|                 // process 의 휴가시간을 다시 계산한다. | ||||
|                 var 휴가데이터 = baseData.Where(t => t.requestpart == RequestPart && t.svalue == "휴가"); | ||||
|                 if (휴가데이터 == null || 휴가데이터.Count() < 1) | ||||
|                 { | ||||
|                     fpSpread1.Sheets[0].Cells[row, 14].Value = null;// 0.0; //휴가시간 | ||||
|                 } | ||||
|                 else fpSpread1.Sheets[0].Cells[row, 14].Value = 휴가데이터.Sum(t => t.hrs); //휴가시간 | ||||
|  | ||||
|                 for (int i = 1; i <= 14; i++) | ||||
|                 { | ||||
|                     if(i == 12) fpSpread1.Sheets[0].Cells[row, i].BackColor = Color.LightGray; | ||||
|                     else fpSpread1.Sheets[0].Cells[row, i].BackColor = Color.White; | ||||
|                     fpSpread1.Sheets[0].Cells[row, i].Border = new ComplexBorder(left, top, right, bottom); | ||||
|                     fpSpread1.Sheets[0].Cells[row, i].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; | ||||
|                     fpSpread1.Sheets[0].Cells[row, i].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; | ||||
|                 } | ||||
|  | ||||
|  | ||||
|                 row += 1; | ||||
|             } | ||||
|  | ||||
|             //합계데이터 | ||||
|             fpSpread1.Sheets[0].Cells[row, 1].Value = "합계"; | ||||
|             fpSpread1.Sheets[0].Cells[row, 1].BackColor = Color.LightGray; | ||||
|             fpSpread1.Sheets[0].Cells[row, 1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; | ||||
|             fpSpread1.Sheets[0].Cells[row, 1].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; | ||||
|             fpSpread1.Sheets[0].Cells[row, 1].Border = new ComplexBorder(left, top, right, bottom); | ||||
|             for (int i = 2; i <= 14; i++) | ||||
|             { | ||||
|                 char basec = 'C'; | ||||
|                 char newc = (char)(basec + (i - 2)); | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].Formula = "SUM(" + newc.ToString() + "8:" + newc.ToString() + row.ToString() + ")"; | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].BackColor = Color.LightGray; | ||||
|  | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].CellType = numberCellType1; | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].ParseFormatString = "N1"; | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].CellType = numberCellType1; | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].ParseFormatString = "N1"; | ||||
|  | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].Border = new ComplexBorder(left, top, right, bottom); | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; | ||||
|             } | ||||
|  | ||||
|             this.fpSpread1.Sheets[0].RowCount = row + 1; | ||||
|         } | ||||
|  | ||||
|         private void tbProcess_SelectedIndexChanged(object sender, EventArgs e) | ||||
|         { | ||||
|             if (binit == false) return; | ||||
|             UpdateUserList(); | ||||
|             //if (tbProcess.SelectedIndex >= 0) refrehData(); | ||||
|         } | ||||
|  | ||||
|         private void btRefresh_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             refrehData(); | ||||
|         } | ||||
|  | ||||
|         private void btSave_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             var sd = new SaveFileDialog(); | ||||
|             sd.Filter = "excel(*.xls)|*.xls"; | ||||
|             sd.FilterIndex = 0; | ||||
|             sd.FileName = "작업분포.xls"; | ||||
|             if (sd.ShowDialog() == DialogResult.OK) | ||||
|             { | ||||
|                 fpSpread1.SaveExcel(sd.FileName); | ||||
|                 FCOMMON.Util.MsgE("파일저장완료\n" + sd.FileName); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,129 +1,126 @@ | ||||
| <?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="label1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||||
|     <value>False</value> | ||||
|   </metadata> | ||||
|   <metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||||
|     <value>False</value> | ||||
|   </metadata> | ||||
|   <metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||||
|     <value>False</value> | ||||
|   </metadata> | ||||
| <?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="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||
|     <value>17, 17</value> | ||||
|   </metadata> | ||||
|   <metadata name="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||
|     <value>17, 17</value> | ||||
|   </metadata> | ||||
| </root> | ||||
| @@ -548,7 +548,7 @@ namespace FPJ0000 | ||||
|             string request = cmbUser.Text.Substring(cmbUser.Text.LastIndexOf('(') + 1); | ||||
|             request = request.Substring(0, request.Length - 1); | ||||
|             string name = cmbUser.Text.Substring(0, cmbUser.Text.IndexOf('(')); | ||||
|             var f = new JobReport.fJobChartMenu(name, request); | ||||
|             var f = new JobReport.fJobChartMenu(); | ||||
|             f.ShowDialog(); | ||||
|         } | ||||
|  | ||||
|   | ||||
| @@ -44,6 +44,7 @@ | ||||
|             this.ta = new FPJ0000.dsReportTableAdapters.JobReportDayTableAdapter(); | ||||
|             this.fpSpread1 = new FarPoint.Win.Spread.FpSpread(); | ||||
|             this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView(); | ||||
|             this.btSave = new System.Windows.Forms.Button(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.dsReport)).BeginInit(); | ||||
|             this.panel1.SuspendLayout(); | ||||
| @@ -63,6 +64,8 @@ | ||||
|             //  | ||||
|             // panel1 | ||||
|             //  | ||||
|             this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); | ||||
|             this.panel1.Controls.Add(this.btSave); | ||||
|             this.panel1.Controls.Add(this.cmbUser); | ||||
|             this.panel1.Controls.Add(this.label4); | ||||
|             this.panel1.Controls.Add(this.label3); | ||||
| @@ -180,6 +183,17 @@ | ||||
|             this.fpSpread1_Sheet1.Reset(); | ||||
|             this.fpSpread1_Sheet1.SheetName = "Sheet1"; | ||||
|             //  | ||||
|             // btSave | ||||
|             //  | ||||
|             this.btSave.Dock = System.Windows.Forms.DockStyle.Right; | ||||
|             this.btSave.Location = new System.Drawing.Point(903, 5); | ||||
|             this.btSave.Name = "btSave"; | ||||
|             this.btSave.Size = new System.Drawing.Size(75, 48); | ||||
|             this.btSave.TabIndex = 12; | ||||
|             this.btSave.Text = "파일저장"; | ||||
|             this.btSave.UseVisualStyleBackColor = true; | ||||
|             this.btSave.Click += new System.EventHandler(this.btSave_Click); | ||||
|             //  | ||||
|             // rJobReportUser | ||||
|             //  | ||||
|             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); | ||||
| @@ -216,5 +230,6 @@ | ||||
|         private System.Windows.Forms.Label label4; | ||||
|         private FarPoint.Win.Spread.FpSpread fpSpread1; | ||||
|         private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1; | ||||
|         private System.Windows.Forms.Button btSave; | ||||
|     } | ||||
| } | ||||
| @@ -40,8 +40,6 @@ namespace FPJ0000.JobReport | ||||
|             //사용자 목록을 선택한다 | ||||
|             UpdateUserList(); | ||||
|  | ||||
|  | ||||
|  | ||||
|             //엑셀파일불러오기 | ||||
|             var file = FCOMMON.Util.CurrentPath + "ReportForUser.xlsx"; | ||||
|             this.fpSpread1.OpenExcel(file); | ||||
| @@ -49,8 +47,6 @@ namespace FPJ0000.JobReport | ||||
|  | ||||
|             //refrehData(); | ||||
|             binit = true; | ||||
|  | ||||
|  | ||||
|         } | ||||
|  | ||||
|         void UpdateUserList() | ||||
| @@ -278,8 +274,8 @@ namespace FPJ0000.JobReport | ||||
|                 fpSpread1.Sheets[0].Cells[row, 7].Formula = string.Format("SUM(C{0}:G{0})+K{0}", row + 1); | ||||
|                 fpSpread1.Sheets[0].Cells[row, 8].Formula = string.Format("H{0}/$I$4", row + 1); | ||||
|                 //H8 /$I$4 | ||||
|                 if(sumOt == 0.0) fpSpread1.Sheets[0].Cells[row, 9].Value = null; //OT합계 | ||||
|                 else fpSpread1.Sheets[0].Cells[row, 9].Value = sumOt ; //OT합계 | ||||
|                 if (sumOt == 0.0) fpSpread1.Sheets[0].Cells[row, 9].Value = null; //OT합계 | ||||
|                 else fpSpread1.Sheets[0].Cells[row, 9].Value = sumOt; //OT합계 | ||||
|  | ||||
|  | ||||
|  | ||||
| @@ -298,7 +294,7 @@ namespace FPJ0000.JobReport | ||||
|                     fpSpread1.Sheets[0].Cells[row, i].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; | ||||
|                     fpSpread1.Sheets[0].Cells[row, i].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; | ||||
|                 } | ||||
|                      | ||||
|  | ||||
|  | ||||
|                 row += 1; | ||||
|             } | ||||
| @@ -323,7 +319,7 @@ namespace FPJ0000.JobReport | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].CellType = numberCellType1; | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].ParseFormatString = "N1"; | ||||
|  | ||||
|              | ||||
|  | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].Border = new ComplexBorder(left, top, right, bottom); | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; | ||||
|                 fpSpread1.Sheets[0].Cells[row, i].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; | ||||
| @@ -453,5 +449,18 @@ namespace FPJ0000.JobReport | ||||
|         { | ||||
|  | ||||
|         } | ||||
|  | ||||
|         private void btSave_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             var sd = new SaveFileDialog(); | ||||
|             sd.Filter = "excel(*.xls)|*.xls"; | ||||
|             sd.FilterIndex = 0; | ||||
|             sd.FileName = "적정인원관리.xls"; | ||||
|             if (sd.ShowDialog() == DialogResult.OK) | ||||
|             { | ||||
|                 fpSpread1.SaveExcel(sd.FileName); | ||||
|                 FCOMMON.Util.MsgE("파일저장완료\n" + sd.FileName); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -132,4 +132,7 @@ | ||||
|   <metadata name="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||
|     <value>245, 17</value> | ||||
|   </metadata> | ||||
|   <metadata name="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||
|     <value>245, 17</value> | ||||
|   </metadata> | ||||
| </root> | ||||
		Reference in New Issue
	
	Block a user
	 chi
					chi