,,
This commit is contained in:
@@ -24,7 +24,7 @@ namespace FCM0000
|
||||
e.Row["wuid"] = FCOMMON.info.Login.no;
|
||||
e.Row["wdate"] = DateTime.Now;
|
||||
string grp = "99";
|
||||
if (this.cmbList.SelectedIndex > 0 )
|
||||
if (this.cmbList.SelectedIndex > 0)
|
||||
{
|
||||
var title = cmbList.Text.Split(']');
|
||||
grp = title[0].Substring(1);
|
||||
@@ -36,8 +36,10 @@ namespace FCM0000
|
||||
{
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
// this.TopMost=true;
|
||||
// this.Activate();
|
||||
|
||||
toolStripButton1.Visible = FCOMMON.info.Login.no == "dev";
|
||||
// this.TopMost=true;
|
||||
// this.Activate();
|
||||
cmbList_SelectedIndexChanged(null, null);
|
||||
}
|
||||
void RefreshCodeList()
|
||||
@@ -61,7 +63,7 @@ namespace FCM0000
|
||||
}
|
||||
try
|
||||
{
|
||||
this.ta.Fill(this.dsMSSQL.Common, grp,FCOMMON.info.Login.gcode );
|
||||
this.ta.Fill(this.dsMSSQL.Common, grp, FCOMMON.info.Login.gcode);
|
||||
this.dsMSSQL.Common.AcceptChanges();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -85,7 +87,7 @@ namespace FCM0000
|
||||
|
||||
private void cmbList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if(this.dsMSSQL.HasChanges())
|
||||
if (this.dsMSSQL.HasChanges())
|
||||
{
|
||||
var dlg = FCOMMON.Util.MsgQ(
|
||||
"변경된 자료가 손실됩니다.\n\n" +
|
||||
@@ -96,18 +98,47 @@ namespace FCM0000
|
||||
{
|
||||
RefreshCodeList();
|
||||
RefreshCodeData();
|
||||
}
|
||||
else if(cmbList.SelectedIndex > 0)
|
||||
}
|
||||
else if (cmbList.SelectedIndex > 0)
|
||||
RefreshCodeData();
|
||||
}
|
||||
|
||||
private void 코드일괄생성ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var drows = this.dsMSSQL.Common.Select(this.bs.Filter,"memo");
|
||||
for (int i = 1; i<= drows.Length;i++)
|
||||
var drows = this.dsMSSQL.Common.Select(this.bs.Filter, "memo");
|
||||
for (int i = 1; i <= drows.Length; i++)
|
||||
{
|
||||
drows[i - 1]["code"] = i.ToString("000");
|
||||
}
|
||||
}
|
||||
|
||||
private void title가져오기ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var f = new FCOMMON.fInputTextBox();
|
||||
if (f.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var data = f.textBox1.Text.Trim();
|
||||
data = data.Replace("\r", "");
|
||||
var lines = data.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
var dlg = FCOMMON.Util.MsgQ(lines.Count().ToString() + "건의 자료가 있습니다. 입력할까요?");
|
||||
if (dlg == DialogResult.Yes)
|
||||
{
|
||||
foreach (var item in lines)
|
||||
{
|
||||
if (item.Trim().Equals("")) continue;
|
||||
|
||||
if(this.dsMSSQL.Common.Where(t=>t.memo == item.Trim()).Any()==false)
|
||||
{
|
||||
var newdr = this.dsMSSQL.Common.NewCommonRow();
|
||||
newdr.memo = item;
|
||||
this.dsMSSQL.Common.AddCommonRow(newdr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user