This commit is contained in:
chi
2021-02-18 16:23:34 +09:00
parent f942419d52
commit b61d444bd2
17 changed files with 621 additions and 89 deletions

View File

@@ -59,6 +59,7 @@
this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ta = new FCM0000.dsMSSQLTableAdapters.CommonTableAdapter();
this.tam = new FCM0000.dsMSSQLTableAdapters.TableAdapterManager();
this.title가져오기ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
this.bn.SuspendLayout();
@@ -75,7 +76,7 @@
this.panel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.panel1.Name = "panel1";
this.panel1.Padding = new System.Windows.Forms.Padding(5);
this.panel1.Size = new System.Drawing.Size(685, 48);
this.panel1.Size = new System.Drawing.Size(706, 48);
this.panel1.TabIndex = 0;
//
// cmbList
@@ -87,7 +88,7 @@
this.cmbList.Location = new System.Drawing.Point(5, 5);
this.cmbList.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cmbList.Name = "cmbList";
this.cmbList.Size = new System.Drawing.Size(675, 37);
this.cmbList.Size = new System.Drawing.Size(696, 37);
this.cmbList.TabIndex = 0;
this.cmbList.SelectedIndexChanged += new System.EventHandler(this.cmbList_SelectedIndexChanged);
//
@@ -114,14 +115,14 @@
this.commonBindingNavigatorSaveItem,
this.toolStripSeparator1,
this.toolStripButton1});
this.bn.Location = new System.Drawing.Point(0, 576);
this.bn.Location = new System.Drawing.Point(0, 522);
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
this.bn.MoveNextItem = this.bindingNavigatorMoveNextItem;
this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
this.bn.Name = "bn";
this.bn.PositionItem = this.bindingNavigatorPositionItem;
this.bn.Size = new System.Drawing.Size(685, 25);
this.bn.Size = new System.Drawing.Size(706, 25);
this.bn.TabIndex = 1;
this.bn.Text = "bindingNavigator1";
//
@@ -192,6 +193,7 @@
//
this.bindingNavigatorPositionItem.AccessibleName = "위치";
this.bindingNavigatorPositionItem.AutoSize = false;
this.bindingNavigatorPositionItem.Font = new System.Drawing.Font("맑은 고딕", 9F);
this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
this.bindingNavigatorPositionItem.Text = "0";
@@ -241,7 +243,8 @@
// toolStripButton1
//
this.toolStripButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem});
this.ToolStripMenuItem,
this.title가져오기ToolStripMenuItem});
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
@@ -274,7 +277,7 @@
this.commonDataGridView.Location = new System.Drawing.Point(0, 48);
this.commonDataGridView.Name = "commonDataGridView";
this.commonDataGridView.RowTemplate.Height = 23;
this.commonDataGridView.Size = new System.Drawing.Size(685, 528);
this.commonDataGridView.Size = new System.Drawing.Size(706, 474);
this.commonDataGridView.TabIndex = 3;
//
// dataGridViewTextBoxColumn3
@@ -331,11 +334,18 @@
this.tam.StaffTableAdapter = null;
this.tam.UpdateOrder = FCM0000.dsMSSQLTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete;
//
// title가져오기ToolStripMenuItem
//
this.title가져오기ToolStripMenuItem.Name = "title가져오기ToolStripMenuItem";
this.title가져오기ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.title가져오기ToolStripMenuItem.Text = "Title 가져오기";
this.title가져오기ToolStripMenuItem.Click += new System.EventHandler(this.title가져오기ToolStripMenuItem_Click);
//
// fCode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(685, 601);
this.ClientSize = new System.Drawing.Size(706, 547);
this.Controls.Add(this.commonDataGridView);
this.Controls.Add(this.bn);
this.Controls.Add(this.panel1);
@@ -390,5 +400,6 @@
private System.Windows.Forms.ToolStripDropDownButton toolStripButton1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripLabel toolStripLabel6;
private System.Windows.Forms.ToolStripMenuItem title가져오기ToolStripMenuItem;
}
}

View File

@@ -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);
}
}
}
}
}
}
}