This commit is contained in:
chi
2020-09-03 20:44:39 +09:00
parent d88b1e1909
commit 31941ae90f
54 changed files with 4184 additions and 1604 deletions

View File

@@ -219,6 +219,8 @@ namespace FCM0000
int err = 0;
//12,13
var dtTarget = new dsMSSQL.ItemsDataTable();
try
{
var sheet = book.getSheet((int)nudSheetNo.Value);
@@ -226,14 +228,16 @@ namespace FCM0000
var MaxRow = (int)nudE.Value;
for (int r = MinRow; r <= MaxRow; r++)
{
cnt += 1;
if (this.progressBar1.Value < this.progressBar1.Maximum)
this.progressBar1.Value += 1;
//화면 업데이트
this.Text = string.Format("{0}/{1} : {2:N2}% 추가:{3},오류:{4},넘김:{5}", progressBar1.Value, progressBar1.Maximum, ((progressBar1.Value * 1.0) / progressBar1.Maximum) * 100.0,add,err,dup);
this.Text = string.Format("{0}/{1} : {2:N2}% 추가:{3},오류:{4},넘김:{5}", r, MaxRow, ((progressBar1.Value * 1.0) / progressBar1.Maximum) * 100.0,add,err,dup);
Application.DoEvents();
//if(cnt % 10 == 0)
Application.DoEvents();
var v_sid = sheet.readStr(r, 0);
v_sid = v_sid.Replace("_", "").Replace("-", "").Replace(" ", "").Replace(".", "");
@@ -263,7 +267,11 @@ namespace FCM0000
//중복은 처리하지 않는다.
if (ta.ExistSID("EET1P", v_sid) > 0)
{
dup += 1;
//해당 sid데이터가 잇으므로 업데이트를 한다
Boolean disable = v_del == "X" ? true : false;
dup += ta.UpdateMatrial(v_name, v_model, v_cate, disable, "EET1P", v_sid);
// dup += 1;
continue;
}
@@ -299,9 +307,11 @@ namespace FCM0000
newdr.wdate = DateTime.Now;
//newdr.unit = "--";
newdr.import = textBox2.Text;
ta.Update(newdr);
newdr.Delete();
add += 1;
dt.Rows.Add(newdr);
add += ta.Update(newdr);
newdr.Delete();
dtTarget.AcceptChanges();
//add += 1;
}
catch (Exception ex)
{
@@ -309,7 +319,7 @@ namespace FCM0000
}
Application.DoEvents();
//Application.DoEvents();