| "); + sb.AppendLine(" | "); + sb.AppendLine(" | "); + sb.AppendLine(" | "); + sb.AppendLine(" | "); + sb.AppendLine(" | "); + sb.AppendLine(" | TOTAL | "); + sb.AppendLine("{금액} | "); + sb.AppendLine(""); + sb.AppendLine(" | "); + sb.AppendLine(" | |||||
| SC | "); + sb.AppendLine("자재번호 | "); + sb.AppendLine("청구자 | "); + sb.AppendLine("품목 | "); + sb.AppendLine("규격 | "); + sb.AppendLine("수량 | "); + sb.AppendLine("단가 | "); + sb.AppendLine("금액 | "); + sb.AppendLine("공급업체 | "); + sb.AppendLine("용도 | "); + sb.AppendLine("요청부서 | "); + sb.AppendLine("||||
| " + getmaxstr(sSC) + " | "); + sb.AppendLine("" + getmaxstr(sSID) + " | "); + sb.AppendLine("" + getmaxstr(s요청) + " | "); + sb.AppendLine("" + getmaxstr(s품명) + " | "); + sb.AppendLine("" + getmaxstr(s규격) + " | "); + sb.AppendLine("" + qty.ToString("N0") + " | "); + sb.AppendLine("" + price.ToString("N0") + " | "); + sb.AppendLine("" + amt.ToString("N0") + " | "); + sb.AppendLine("" + getmaxstr(s공급) + " | "); + sb.AppendLine("" + s비고 + " | "); + sb.AppendLine("전자실 | "); + + if (sheet != null) + { + col = 0; + sheet.setRow(row, 23); + sheet.writeStr(row, col++, sSC, fDataStr); + sheet.writeStr(row, col++, sSID, fDataStr); + sheet.writeStr(row, col++, s요청, fDataStr); + sheet.writeStr(row, col++, s품명, fDataStr); + sheet.writeStr(row, col++, s규격, fDataStr); + sheet.writeNum(row, col++, qty, fDataNum); + sheet.writeNum(row, col++, (int)price, fDataNum); + sheet.writeNum(row, col++, (int)amt, fDataNum); + sheet.writeStr(row, col++, s공급, fDataStr); + sheet.writeStr(row, col++, s비고, fDataStr); + sheet.writeStr(row, col++, "전자실", fDataStr); + row += 1; + } + + ////sb.AppendLine("" + getmaxstr(sSTIE) + " | "); + //''sb.AppendLine("" + getmaxstr(s분류) + " | "); + //sb.AppendLine("" + getmaxstr(sCRCF) + " | "); + //sb.AppendLine("" + getmaxstr(s수령) + " | "); + + + + sb.AppendLine("
| "); + sb.AppendLine(" | "); + sb.AppendLine(" | "); + sb.AppendLine(" | "); + sb.AppendLine(" | "); + sb.AppendLine(" | "); + sb.AppendLine(" | TOTAL | "); + sb.AppendLine("{금액} | "); + sb.AppendLine(""); + sb.AppendLine(" | ||||||
| 신청 | "); - sb.AppendLine("요청 | "); - sb.AppendLine("CR/CF | "); - sb.AppendLine("수령 | "); - sb.AppendLine("SID | "); - sb.AppendLine("품명 | "); - sb.AppendLine("규격 | "); - sb.AppendLine("수량 | "); - sb.AppendLine("단가 | "); - sb.AppendLine("금액 | "); - sb.AppendLine("공급 | "); - sb.AppendLine(""); - sb.AppendLine(""); - - var col_신청 = fpSpread1_Sheet1.Columns["pdate"].Index; - var col_요청 = fpSpread1_Sheet1.Columns["requestName"].Index; - var col_CRLF = fpSpread1_Sheet1.Columns["crcf"].Index; - - var col_수령 = fpSpread1_Sheet1.Columns["receiveName"].Index; - var col_SID = fpSpread1_Sheet1.Columns["sid"].Index; - var col_품명 = fpSpread1_Sheet1.Columns["pumname"].Index; - var col_규격 = fpSpread1_Sheet1.Columns["pumscale"].Index; - var col_수량 = fpSpread1_Sheet1.Columns["pumqty"].Index; - var col_단가 = fpSpread1_Sheet1.Columns["pumprice"].Index; - var col_금액 = fpSpread1_Sheet1.Columns["pumamt"].Index; - var col_공급 = fpSpread1_Sheet1.Columns["supply"].Index; - var col_비고 = fpSpread1_Sheet1.Columns["bigo"].Index; - - - for (int i = 0; i < this.fpSpread1_Sheet1.RowCount; i++) - { - var v신청 = fpSpread1_Sheet1.Cells[i, col_신청].Value; - var v요청 = fpSpread1_Sheet1.Cells[i, col_요청].Value; - var vCRCF = fpSpread1_Sheet1.Cells[i, col_CRLF].Value; - - var v수령 = fpSpread1_Sheet1.Cells[i, col_수령].Value; - var vSID = fpSpread1_Sheet1.Cells[i, col_SID].Value; - var v품명 = fpSpread1_Sheet1.Cells[i, col_품명].Value; - var v규격 = fpSpread1_Sheet1.Cells[i, col_규격].Value; - var v수량 = fpSpread1_Sheet1.Cells[i, col_수량].Value; - var v단가 = fpSpread1_Sheet1.Cells[i, col_단가].Value; - var v금액 = fpSpread1_Sheet1.Cells[i, col_금액].Value; - var v공급 = fpSpread1_Sheet1.Cells[i, col_공급].Value; - var v비고 = fpSpread1_Sheet1.Cells[i, col_비고].Value; - - var s신청 = String.Empty; - var s요청 = String.Empty; - var sCRCF = String.Empty; - var s수령 = String.Empty; - var sSID = String.Empty; - var s품명 = String.Empty; - var s규격 = String.Empty; - var s수량 = "0"; - var s단가 = "0"; - var s금액 = "0"; - var s입고 = String.Empty; - var s공급 = String.Empty; - var s비고 = String.Empty; - - if (v신청 != null) s신청 = v신청.ToString(); - if (v요청 != null) s요청 = v요청.ToString(); - if (vCRCF != null) sCRCF = vCRCF.ToString(); - if (v수령 != null) s수령 = v수령.ToString(); - if (vSID != null) sSID = vSID.ToString(); - if (v품명 != null) s품명 = v품명.ToString(); - if (v규격 != null) s규격 = v규격.ToString(); - if (v수량 != null) s수량 = v수량.ToString(); - if (v단가 != null) s단가 = v단가.ToString(); - if (v금액 != null) s금액 = v금액.ToString(); - if (v공급 != null) s공급 = v공급.ToString(); - - sb.AppendLine("
| " + getmaxstr(s신청) + " | "); - sb.AppendLine("" + getmaxstr(s요청) + " | "); - sb.AppendLine("" + getmaxstr(sCRCF) + " | "); - sb.AppendLine("" + getmaxstr(s수령) + " | "); - sb.AppendLine("" + getmaxstr(sSID) + " | "); - sb.AppendLine("" + getmaxstr(s품명) + " | "); - sb.AppendLine("" + getmaxstr(s규격) + " | "); - sb.AppendLine("" + int.Parse(s수량).ToString("N0") + " | "); - sb.AppendLine("" + int.Parse(s단가).ToString("N0") + " | "); - sb.AppendLine("" + int.Parse(s금액).ToString("N0") + " | "); - sb.AppendLine("" + getmaxstr(s공급) + " | "); - - sb.AppendLine("
| "); + // sb.AppendLine(" | "); + // sb.AppendLine(" | "); + // sb.AppendLine(" | "); + // sb.AppendLine(" | "); + // sb.AppendLine(" | "); + // sb.AppendLine(" | TOTAL | "); + // sb.AppendLine("{금액} | "); + // sb.AppendLine(""); + // sb.AppendLine(" | ||||||
| SC | "); + // sb.AppendLine("자재번호 | "); + // sb.AppendLine("청구자 | "); + // sb.AppendLine("품목 | "); + // sb.AppendLine("규격 | "); + // sb.AppendLine("수량 | "); + // sb.AppendLine("단가 | "); + // sb.AppendLine("금액 | "); + // sb.AppendLine("공급업체 | "); + // sb.AppendLine("용도 | "); + // sb.AppendLine("요청부서 | "); + // sb.AppendLine("SC | "); + // //sb.AppendLine("자재번호 | "); + // //sb.AppendLine("청구자 | "); + // //sb.AppendLine("품목 | "); + // //sb.AppendLine("규격 | "); + // //sb.AppendLine("수량 | "); + // //sb.AppendLine("단가 | "); + // //sb.AppendLine("금액 | "); + // //sb.AppendLine("공급업체 | "); + // //sb.AppendLine("요청부서 | "); + + + // var qty = int.Parse(s수량); + // var price = int.Parse(s단가); + // var amt = int.Parse(s금액); + // totalamt += amt; + + // sb.AppendLine("
| " + getmaxstr(sSC) + " | "); + // sb.AppendLine("" + getmaxstr(sSID) + " | "); + // sb.AppendLine("" + getmaxstr(s요청) + " | "); + // sb.AppendLine("" + getmaxstr(s품명) + " | "); + // sb.AppendLine("" + getmaxstr(s규격) + " | "); + // sb.AppendLine("" + qty.ToString("N0") + " | "); + // sb.AppendLine("" + price.ToString("N0") + " | "); + // sb.AppendLine("" + amt.ToString("N0") + " | "); + // sb.AppendLine("" + getmaxstr(s공급) + " | "); + // sb.AppendLine("" + s비고 + " | "); + // sb.AppendLine("전자실 | "); + + // if (sheet != null) + // { + // col = 0; + // sheet.setRow(row, 23); + // sheet.writeStr(row, col++, sSC, fDataStr); + // sheet.writeStr(row, col++, sSID, fDataStr); + // sheet.writeStr(row, col++, s요청, fDataStr); + // sheet.writeStr(row, col++, s품명, fDataStr); + // sheet.writeStr(row, col++, s규격, fDataStr); + // sheet.writeNum(row, col++, qty, fDataNum); + // sheet.writeNum(row, col++, price, fDataNum); + // sheet.writeNum(row, col++, amt, fDataNum); + // sheet.writeStr(row, col++, s공급, fDataStr); + // sheet.writeStr(row, col++, s비고, fDataStr); + // sheet.writeStr(row, col++, "전자실", fDataStr); + // row += 1; + // } + + // ////sb.AppendLine("" + getmaxstr(sSTIE) + " | "); + // //''sb.AppendLine("" + getmaxstr(s분류) + " | "); + // //sb.AppendLine("" + getmaxstr(sCRCF) + " | "); + // //sb.AppendLine("" + getmaxstr(s수령) + " | "); + + + + // sb.AppendLine("
| "); + // sb.AppendLine(" | "); + // sb.AppendLine(" | "); + // sb.AppendLine(" | "); + // sb.AppendLine(" | "); + // sb.AppendLine(" | "); + // sb.AppendLine(" | TOTAL | "); + // sb.AppendLine("{금액} | "); + // sb.AppendLine(""); + // sb.AppendLine(" | ||||||
| {col.HeaderText} | "); - } - sb.AppendLine(""); - sb.AppendLine(""); - - for (int i = 0; i < this.dataGridView1.RowCount; i++) - { - - sb.AppendLine("||||
| {ivalue:N0} | "); - } - else if (col.ValueType == typeof(decimal)) - { - var ivalue = (decimal)v; - sb.AppendLine($"{ivalue:N0} | "); - } - else if (col.ValueType == typeof(float)) - { - var ivalue = (float)v; - sb.AppendLine($"{ivalue:N1} | "); - } - else if (col.ValueType == typeof(double)) - { - var ivalue = (double)v; - sb.AppendLine($"{ivalue:N1} | "); - } - else sb.AppendLine($"{getmaxstr(value)} | "); - } - sb.AppendLine("