..
This commit is contained in:
		| @@ -23,7 +23,7 @@ namespace FPJ0000.JobReport_ | ||||
|  | ||||
|         private void rJobReport_Load(object sender, EventArgs e) | ||||
|         { | ||||
|            | ||||
|  | ||||
|             this.fpSpread1_Sheet2.AddSelection(2, 3, 4, 3); | ||||
|             // fpSpread1_Sheet2.Columns[1, 0].AllowAutoSort = true; | ||||
|             //this.fpSpread1_Sheet2.ColumnHeader.AutoTextIndex = 1; | ||||
| @@ -51,14 +51,14 @@ namespace FPJ0000.JobReport_ | ||||
|  | ||||
|             //refrehData(); | ||||
|             binit = true; | ||||
|              | ||||
|  | ||||
|             FarPoint.Win.Spread.GridLine black = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Black); | ||||
|             fpSpread1_Sheet2.VerticalGridLine = black; | ||||
|             fpSpread1_Sheet2.HorizontalGridLine = black; | ||||
|         } | ||||
|         private void SetFreezeRowCount_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             | ||||
|  | ||||
|         } | ||||
|         void UpdateUserList() | ||||
|         { | ||||
| @@ -73,12 +73,12 @@ namespace FPJ0000.JobReport_ | ||||
|             if (tbProcess.SelectedIndex <= 0) | ||||
|             { | ||||
|                 //공정구분없이 전체사용자를 가져온다 | ||||
|                 userlist = ta.GetData(FCOMMON.info.Login.gcode,"%"); | ||||
|                 userlist = ta.GetData(FCOMMON.info.Login.gcode, "%"); | ||||
|                 //  db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode).OrderBy(t => t.name).GroupBy(t => t.name); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 userlist = ta.GetData(FCOMMON.info.Login.gcode, tbProcess.Text);  | ||||
|                 userlist = ta.GetData(FCOMMON.info.Login.gcode, tbProcess.Text); | ||||
|                 //db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.userProcess == tbProcess.Text).OrderBy(t => t.name).GroupBy(t => t.name); | ||||
|             } | ||||
|  | ||||
| @@ -160,7 +160,7 @@ namespace FPJ0000.JobReport_ | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 baseData = taJobReportForUser.GetByDate(FCOMMON.info.Login.gcode,  vSD, vED); | ||||
|                 baseData = taJobReportForUser.GetByDate(FCOMMON.info.Login.gcode, vSD, vED); | ||||
|                 //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) | ||||
| @@ -206,7 +206,7 @@ namespace FPJ0000.JobReport_ | ||||
|  | ||||
|             col = 0; | ||||
|             row = 0; | ||||
|             fpSpread1.Sheets[1].RowCount = baseData.GroupBy(t => t.id).Count() ; | ||||
|             fpSpread1.Sheets[1].RowCount = baseData.GroupBy(t => t.id).Count(); | ||||
|             foreach (var item in baseData.GroupBy(t => t.id)) //사용자별로 그룹을 해서 | ||||
|             { | ||||
|                 var dr = item.FirstOrDefault(); | ||||
| @@ -229,7 +229,7 @@ namespace FPJ0000.JobReport_ | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.name; | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.pdate; | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.userProcess; | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.process; | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.type; | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.svalue; | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.hrs; | ||||
|                 this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.ot; | ||||
| @@ -240,7 +240,7 @@ namespace FPJ0000.JobReport_ | ||||
|  | ||||
|             //인원분석보고용타입설1 | ||||
|             col = 2; | ||||
|             var orTypeName = baseData.Where(t => t.svalue != "휴가").OrderBy(t => t.svalue).GroupBy(t => t.svalue); | ||||
|             var orTypeName = baseData.Where(t => t.svalue != "휴가" && string.IsNullOrEmpty(t.svalue) == false).OrderBy(t => t.svalue).GroupBy(t => t.svalue); | ||||
|             this.fpSpread1.ActiveSheetIndex = 0; | ||||
|             foreach (var item in orTypeName) | ||||
|             { | ||||
| @@ -264,17 +264,17 @@ namespace FPJ0000.JobReport_ | ||||
|             //var orProcess = baseData.OrderBy(t => t.process).GroupBy(t => t.process); | ||||
|  | ||||
|             //프로세스목록은 전체로 사용한다. | ||||
|             var prclist = taCommon.GetData(FCOMMON.info.Login.gcode, "16"); | ||||
|             var prclist = taCommon.GetData(FCOMMON.info.Login.gcode, "15"); | ||||
|             // db.Common.Where(t => t.gcode == FCOMMON.info.Login.gcode &&  t.grp == "16").OrderBy(t => t.code).ToList(); | ||||
|             this.progressBar2.Maximum = prclist.Count; | ||||
|             this.progressBar2.Value = 0; | ||||
|             foreach(var prcitem in prclist) | ||||
|             foreach (var prcitem in prclist) | ||||
|             { | ||||
|                 this.progressBar2.Value += 1; | ||||
|                 var item = baseData.Where(t => t.process == prcitem.memo); //해당 프로세스에 해당하는 아이템을 가져온다 | ||||
|                 var item = baseData.Where(t => t.type == prcitem.memo); //해당 프로세스에 해당하는 아이템을 가져온다 | ||||
|                                                                            //} | ||||
|                 if (prcitem.memo == null) prcitem.memo = string.Empty; | ||||
|                 if(prcitem.memo.StartsWith("ASM Feeder Center")) | ||||
|                 if (prcitem.memo.StartsWith("ASM Feeder Center")) | ||||
|                     Console.WriteLine("sdf"); | ||||
|  | ||||
|                 //foreach (var item in orProcess) | ||||
| @@ -288,7 +288,7 @@ namespace FPJ0000.JobReport_ | ||||
|                 int coldata = 2; | ||||
|                 for (int i = 2; i <= 6; i++) | ||||
|                 { | ||||
|                     if(item.Any()==false) | ||||
|                     if (item.Any() == false) | ||||
|                     { | ||||
|                         //자료가없다면 0으로 채운다 | ||||
|                         fpSpread1.Sheets[0].Cells[row, coldata].Value = null; | ||||
| @@ -302,7 +302,7 @@ namespace FPJ0000.JobReport_ | ||||
|                         //이 이름에 해당하는 데이터의 시간을 가져온다 | ||||
|                         double ot = 0.0; | ||||
|                         double hrs = 0.0; | ||||
|                         if (colName != "*" && String.IsNullOrEmpty(colName)==false) | ||||
|                         if (colName != "*" && String.IsNullOrEmpty(colName) == false) | ||||
|                         { | ||||
|                             //double holytime = 0.0; | ||||
|                             var timeList = item.Where(t => t.svalue == colName); | ||||
| @@ -316,7 +316,7 @@ namespace FPJ0000.JobReport_ | ||||
|                         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; | ||||
|                 } | ||||
| @@ -539,13 +539,13 @@ namespace FPJ0000.JobReport_ | ||||
|  | ||||
|         private void fpSpread1_AutoSortingColumn(object sender, FarPoint.Win.Spread.AutoSortingColumnEventArgs e) | ||||
|         { | ||||
|             | ||||
|  | ||||
|         } | ||||
|  | ||||
|         private void fpSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e) | ||||
|         { | ||||
|              | ||||
|             | ||||
|  | ||||
|  | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 chi
					chi