diff --git a/unimarc/unimarc/Skill.cs b/unimarc/unimarc/Skill.cs index 3169d21..bad5b26 100644 --- a/unimarc/unimarc/Skill.cs +++ b/unimarc/unimarc/Skill.cs @@ -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; } } diff --git a/unimarc/unimarc/홈/Home_User_manage.cs b/unimarc/unimarc/홈/Home_User_manage.cs index 399d873..3f5deb1 100644 --- a/unimarc/unimarc/홈/Home_User_manage.cs +++ b/unimarc/unimarc/홈/Home_User_manage.cs @@ -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;