[사용자목록] 소속그룹의사용자만 보이도록 수정, 소속그룹을 변경할 수 없도록 함, 권한정보가 없는 경우 발생되는 오류 수정

This commit is contained in:
Arin(asus)
2025-07-18 10:35:04 +09:00
parent 3500c5e06f
commit 76011a9e04
2 changed files with 20 additions and 9 deletions

View File

@@ -23,6 +23,7 @@ using System.Drawing.Text;
using System.Globalization;
using System.Threading;
using System.Data.SqlTypes;
using AR;
namespace WindowsFormsApp1
{
@@ -2962,16 +2963,21 @@ namespace WindowsFormsApp1
public string VersionInfo()
{
string version = "";
StreamReader sr = new StreamReader(Application.StartupPath + "\\update.inf");
while (!sr.EndOfStream)
var fn = Application.StartupPath + "\\update.inf";
if(System.IO.File.Exists(fn))
{
string line = sr.ReadLine();
if (line.IndexOf("count=", 0) != -1)
StreamReader sr = new StreamReader(fn);
while (!sr.EndOfStream)
{
version = line.Replace("count=", "");
break;
string line = sr.ReadLine();
if (line.IndexOf("count=", 0) != -1)
{
version = line.Replace("count=", "");
break;
}
}
}
return version;
}
}

View File

@@ -76,7 +76,11 @@ namespace WindowsFormsApp1.Home
{
dataGridView1.Rows.Clear();
string Area = "`name`, `position`, `Phone`, `ID`, `PW`,`affil`";
string cmd = mDB.DB_Select_Search(Area, "User_Data");//, "affil", comp_name);
//여기서 모든 사용자를 가져온다
//사용자그룹의 데이터만 오게하려면 affil을 적용해야함 250718
//사용자그룹을 선택하는것이 맞는가?
string cmd = mDB.DB_Select_Search(Area, "User_Data", "affil", comp_name);
string db_res = mDB.DB_Send_CMD_Search(cmd);
string[] data = db_res.Split('|');
string[] grid = { "", "", "", "", "", "", "" };
@@ -163,7 +167,8 @@ namespace WindowsFormsApp1.Home
{
int row = e.RowIndex;
if (dataGridView1.CurrentCell == null || dataGridView1.CurrentCell.RowIndex < 0 || dataGridView1.SelectedRows.Count == 0) return;
cbCompany.Text = dataGridView1.Rows[row].Cells["affil"].Value.ToString(); ;
cbCompany.Text = dataGridView1.Rows[row].Cells["affil"].Value.ToString();
cbCompany.Enabled = false;
tb_ID.Text = dataGridView1.Rows[row].Cells["ID"].Value.ToString();
tb_PW.Text = dataGridView1.Rows[row].Cells["PW"].Value.ToString();
tb_Name.Text = dataGridView1.Rows[row].Cells["Per_Name"].Value.ToString();
@@ -205,7 +210,7 @@ namespace WindowsFormsApp1.Home
for (int a = 0; a < chkBox.Length; a++)
{
if (IsCheck[a] == "1")
if (a <= IsCheck.Length && IsCheck[a] == "1") //정보가없더라도 진행하게
chkBox[a].Checked = true;
else
chkBox[a].Checked = false;