주문내역 엑셀 업로드기능에서 공백제거 추가, 주문내역에서 품목정보 생성하는 기능 추가(관리자)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user