마크정리에서 목록선택하면 나오는 목록창 바인딩소스 연결

This commit is contained in:
2026-01-22 21:38:11 +09:00
parent 409317c099
commit d40ffda4fd
4 changed files with 38 additions and 2 deletions

View File

@@ -378,6 +378,7 @@
<Compile Include="마크\Marc.designer.cs"> <Compile Include="마크\Marc.designer.cs">
<DependentUpon>Marc.cs</DependentUpon> <DependentUpon>Marc.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="마크\MarcPlanItem.cs" />
<Compile Include="마크\Marc_FillBlank.cs"> <Compile Include="마크\Marc_FillBlank.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace UniMarc.
{
public class MarcPlanItem
{
public string Idx { get; set; }
public string ListName { get; set; }
public string Date { get; set; }
public string User { get; set; }
public string ColCheck { get; set; } = "F";
}
}

View File

@@ -220,24 +220,28 @@ namespace UniMarc.마크
// idx // idx
// //
this.idx.HeaderText = "idx"; this.idx.HeaderText = "idx";
this.idx.DataPropertyName = "Idx";
this.idx.Name = "idx"; this.idx.Name = "idx";
this.idx.Visible = false; this.idx.Visible = false;
// //
// list_name // list_name
// //
this.list_name.HeaderText = "목록명"; this.list_name.HeaderText = "목록명";
this.list_name.DataPropertyName = "ListName";
this.list_name.Name = "list_name"; this.list_name.Name = "list_name";
this.list_name.Width = 500; this.list_name.Width = 500;
// //
// date // date
// //
this.date.HeaderText = "등록일시"; this.date.HeaderText = "등록일시";
this.date.DataPropertyName = "Date";
this.date.Name = "date"; this.date.Name = "date";
this.date.Width = 130; this.date.Width = 130;
// //
// user // user
// //
this.user.HeaderText = "등록자"; this.user.HeaderText = "등록자";
this.user.DataPropertyName = "User";
this.user.Name = "user"; this.user.Name = "user";
this.user.Width = 80; this.user.Width = 80;
// //
@@ -245,6 +249,7 @@ namespace UniMarc.마크
// //
this.colCheck.FalseValue = "F"; this.colCheck.FalseValue = "F";
this.colCheck.HeaderText = "V"; this.colCheck.HeaderText = "V";
this.colCheck.DataPropertyName = "ColCheck";
this.colCheck.IndeterminateValue = "F"; this.colCheck.IndeterminateValue = "F";
this.colCheck.Name = "colCheck"; this.colCheck.Name = "colCheck";
this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True;

View File

@@ -57,7 +57,7 @@ namespace UniMarc.마크
public void btn_Search_Click(object sender, EventArgs e) public void btn_Search_Click(object sender, EventArgs e)
{ {
dataGridView1.Rows.Clear(); // dataGridView1.Rows.Clear();
string gu = cb_gu.Text; // 검색 필터 string gu = cb_gu.Text; // 검색 필터
string text = tb_Search.Text; // 검색어 DB LIKE 검색 string text = tb_Search.Text; // 검색어 DB LIKE 검색
@@ -73,6 +73,7 @@ namespace UniMarc.마크
#region Search_Sub #region Search_Sub
private void Input_Grid(string[] ary) private void Input_Grid(string[] ary)
{ {
List<MarcPlanItem> dataList = new List<MarcPlanItem>();
string[] grid = { "", "", "", "", "F" }; string[] grid = { "", "", "", "", "F" };
for(int a = 0; a < ary.Length; a++) for(int a = 0; a < ary.Length; a++)
{ {
@@ -81,9 +82,22 @@ namespace UniMarc.마크
if (a % 4 == 2) grid[2] = ary[a]; if (a % 4 == 2) grid[2] = ary[a];
if (a % 4 == 3) { if (a % 4 == 3) {
grid[3] = ary[a]; grid[3] = ary[a];
dataGridView1.Rows.Add(grid);
MarcPlanItem item = new MarcPlanItem
{
Idx = grid[0],
ListName = grid[1],
Date = grid[2],
User = grid[3],
ColCheck = "F"
};
dataList.Add(item);
//dataGridView1.Rows.Add(grid);
} }
} }
bs1.DataSource = dataList;
dataGridView1.AutoGenerateColumns = false;
dataGridView1.DataSource = bs1;
} }
#endregion #endregion