주문내역 엑셀 업로드기능에서 공백제거 추가, 주문내역에서 품목정보 생성하는 기능 추가(관리자)

This commit is contained in:
chi
2024-01-26 11:33:04 +09:00
parent 5d7945d5c9
commit d2c5ed6bd4
39 changed files with 1198 additions and 968 deletions

View File

@@ -1,5 +1,6 @@
using FarPoint.Win.Spread;
using FCOMMON;
using NetOffice.OutlookApi;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -237,9 +238,17 @@ namespace FEQ0000
//string userNo = this.cmbRequest.Text.Substring(cmbRequest.Text.LastIndexOf('(') + 1);
//userNo = userNo.Substring(0, userNo.Length - 1);
//part 목록을 조회해서 NR에 등록해줘야 함
var dlg2 = FCOMMON.Util.MsgQ($"해당 파트리스트를 ({crmode})구매 목록에 등록 하시겠습니까?\n" +
listView1.CheckedItems.Count.ToString() + "건");
if (dlg2 != System.Windows.Forms.DialogResult.Yes) return;
//체크안된 데이터를 dr에서 삭제한다.
decimal itemAmt = 0;
var itemCount = 0;
var totalcnt = listView1.CheckedItems.Count;
foreach (ListViewItem lv in this.listView1.Items)
{
if (crmode == eImporttype.CR)
@@ -260,11 +269,12 @@ namespace FEQ0000
dr.AcceptChanges();
dr.SetAdded();
itemAmt += dr.pumamt;
taCR.Update(dr);
}
}
else if (crmode == eImporttype.NR)
{
var dr = lv.Tag as dsPurchase.EETGW_PurchaseEBRow;
var dr = lv.Tag as dsPurchase.PurchaseRow;
if (lv.Checked == false) dr.AcceptChanges();
else
{
@@ -280,6 +290,10 @@ namespace FEQ0000
dr.AcceptChanges();
dr.SetAdded();
itemAmt += dr.pumamt;
taNR.Update(dr);
}
}
else if (crmode == eImporttype.EB)
@@ -300,15 +314,15 @@ namespace FEQ0000
dr.AcceptChanges();
dr.SetAdded();
itemAmt += dr.pumamt;
taEB.Update(dr);
}
}
this.Text = $"데이터 입력중({itemCount}/{totalcnt})";
if (itemCount % 10 == 0) System.Windows.Forms.Application.DoEvents();
}
//part 목록을 조회해서 NR에 등록해줘야 함
var dlg2 = FCOMMON.Util.MsgQ($"해당 파트리스트를 ({crmode})구매 목록에 등록 하시겠습니까?\n" +
itemCount.ToString() + "건 " + itemAmt.ToString("N0") + "원");
if (dlg2 != System.Windows.Forms.DialogResult.Yes) return;
if (crmode == eImporttype.CR)
taCR.Update(this.dsPRJ.EETGW_PurchaseCR);
@@ -411,7 +425,7 @@ namespace FEQ0000
{
book.load(textBox1.Text);
}
catch (Exception ex)
catch (System.Exception ex)
{
FCOMMON.Util.MsgE(ex.Message);
return;
@@ -546,12 +560,13 @@ namespace FEQ0000
if (cf_입고일 == libxl.CellType.CELLTYPE_STRING)
{
= sheet.readStr(r, (int)nudInDate.Value - 1).Trim();
if(DateTime.TryParse(,out DateTime indatevalue)==false)
if (DateTime.TryParse(, out DateTime indatevalue) == false)
{
sb.AppendLine("입고일을 확인할 수 없어 입력하지 않습니다\n" +
$"줄번호:{r},입고일자료:{입고일}");
continue;
} else
}
else
{
= indatevalue.ToShortDateString();
}
@@ -639,7 +654,20 @@ namespace FEQ0000
if (.Length >= 500) = .Substring(0, 500 - 4) + "...";
if (.Length >= 200) = .Substring(0, 200 - 4) + "...";
= (.Replace(" ", ""));
= (.Replace(" ", ""));
SID = (SID.Replace(" ", ""));
= (.Replace(" ", ""));
v_공급처 = (v_공급처.Replace(" ", ""));
PO = (PO.Replace(" ", ""));
SC = (SC.Replace(" ", ""));
CRCF = (CRCF.Replace(" ", ""));
= (.Replace(" ", ""));
= (.Replace(" ", ""));
CostCode = (CostCode.Replace(" ", ""));
LIneCode = (LIneCode.Replace(" ", ""));
= (.Replace(" ", ""));
= (.Replace(" ", ""));
//리스트뷰에 추가
var newitem = this.listView1.Items.Add();
@@ -763,12 +791,12 @@ namespace FEQ0000
}
//this.dsPRJ.ProjectsPart.AcceptChanges();
if(sb.Length > 0)
if (sb.Length > 0)
{
Util.MsgE(sb.ToString());
}
}
catch (Exception ex)
catch (System.Exception ex)
{
FCOMMON.Util.MsgE("불러오는 중 오류 발생\n" + ex.Message);
}
@@ -787,7 +815,7 @@ namespace FEQ0000
{
FCOMMON.Util.MsgE("입력된 자료가 없습니다.\n\n지정된 엑셀의 1번째 칸에 값이 없다면 입력되지 않습니다.");
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)