This commit is contained in:
chi
2023-01-26 09:16:01 +09:00
parent 3775d2ba91
commit 3a1fd6401c
31 changed files with 1565 additions and 733 deletions

View File

@@ -134,7 +134,7 @@ namespace FCM0000
{
if (item.Trim().Equals("")) continue;
if(this.dsMSSQL.Common.Where(t=>t.memo == item.Trim()).Any()==false)
if (this.dsMSSQL.Common.Where(t => t.memo == item.Trim()).Any() == false)
{
var newdr = this.dsMSSQL.Common.NewCommonRow();
newdr.memo = item;
@@ -162,7 +162,7 @@ namespace FCM0000
int r = 0;
foreach (var item in lines)
{
if(r < this.dsMSSQL.Common.Count)
if (r < this.dsMSSQL.Common.Count)
this.dsMSSQL.Common.Rows[r]["svalue"] = item;
r += 1;
@@ -180,5 +180,38 @@ namespace FCM0000
}
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
//누락된 목록을 생성합니다
var gcode = FCOMMON.info.Login.gcode;
var uid = FCOMMON.info.Login.no;
if (cmbList.SelectedIndex <= 0)
{
if (FCOMMON.Util.MsgQ("없는 목록을 기본값에서 생성 할까요?") != DialogResult.Yes) return;
var sql = "insert into Common(gcode,grp,code,svalue,ivalue,fvalue,memo,wuid,wdate)" +
$" select '{gcode}',grp,code,svalue,ivalue,fvalue,memo,'{uid}',getdate() from Common where gcode = 'EET1P' and grp = '99'" +
$" and code not in (select code from Common where gcode = '{gcode}' and grp = '99')";
var cnt = FCOMMON.DBM.ExecuteNonQuery(sql);
FCOMMON.Util.MsgI($"{cnt}건의 목록이 생성 되었습니다");
RefreshCodeList();
}
else
{
string grp = "99";
var title = cmbList.Text.Split(']');
grp = title[0].Substring(1);
if (FCOMMON.Util.MsgQ($"[{cmbList.Text}] 세부항목을 기본값에서 생성 할까요?") != DialogResult.Yes) return;
var sql = "insert into Common(gcode,grp,code,svalue,ivalue,fvalue,memo,wuid,wdate)" +
$" select '{gcode}',grp,code,svalue,ivalue,fvalue,memo,'{uid}',getdate() from Common where gcode = 'EET1P' and grp = '{grp}'" +
$" and code not in (select code from Common where gcode = '{gcode}' and grp = '{grp}')";
var cnt = FCOMMON.DBM.ExecuteNonQuery(sql);
FCOMMON.Util.MsgI($"{cnt}건의 목록이 생성 되었습니다");
RefreshCodeData();
}
}
}
}