//사번검색 #region 사번검색(고정) -- 기본화면 //인사정보검색 private void insaSearch_Click(object sender, EventArgs e) { try { oHelper = new DBOracle_Helper(); sabunDataGridView.Rows.Clear(); string searchsql = "select bas_empno, bas_name, bas_pos, cd_codnms, bas_dept, dept_name" + " from thrm_bas_psy," + " (select cd_grpcd, cd_code, cd_codnms from tieas_cd_psy where cd_grpcd = 'POS')," + " thrm_dept_psy" + " where bas_pos = cd_code" + " and bas_dept = dept_code" + " and bas_empno like '" + qry_empno.Text + "%'" + " and bas_name like '" + qry_name.Text + "%'" + " and dept_name like '" + qry_dept.Text + "%'" + " order by bas_empno asc"; DataTable sabunSearch = oHelper.GetData(searchsql); int cnt = 0; foreach (DataRow item in sabunSearch.Rows) { sabunDataGridView.Rows.Add(item["BAS_EMPNO"].ToString(), item["BAS_NAME"].ToString(), item["cd_codnms"].ToString(), item["dept_name"].ToString()); cnt++; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void CallingEmployeeFamInfo() { if (bas_empno_fam.Text == "") { MessageBox.Show("조회할 사원정보를 선택하세요"); //enablefalse 들어가야함 return; } InsaManagement.Mode = "BlockIUD"; string fam_sql = "select fam_empno, fam_codnms as fam_rel, fam_name, fam_bth, fam_ltg" + " from thrm_bas_psy, " + " thrm_fam_psy," + " (select cd_grpcd, cd_code, cd_codnms as fam_codnms " + " from tieas_cd_psy where cd_grpcd = 'REL') " + " where bas_empno = fam_empno(+) and fam_rel = cd_code" + " and bas_empno = '" + bas_empno_fam.Text + "'"; DataTable FamInfo = oHelper.GetData(fam_sql); foreach (DataRow Row in FamInfo.Rows) { if (Row == null) { MessageBox.Show("등록되어있지 않는 가족정보입니다."); return; } bas_empno_fam.Text = Row["fam_empno"] as string; fam_rel_code.Text = Row["fam_rel"] as string; fam_name.Text = Row["fam_name"] as string; fam_bth.Text = Row["fam_bth"] as string; fam_ltg.Text = Row["fam_ltg"] as string; } }
private void CallingEmployeeForlInfo() { if (bas_empno_forl.Text == "") { MessageBox.Show("조회할 사원정보를 선택하세요"); return; } InsaManagement.Mode = "BlockIUD"; string forl_sql = "";//sql문 작성해야함 DataTable ForlInfo = oHelper.GetData(forl_sql); foreach (DataRow Row in ForlInfo.Rows) { if (Row == null) { MessageBox.Show("등록되어있지 않는 경력정보입니다."); return; } //불러들일 정보 } }
public bool LoginCheck(string id, string password) { try { oHelper = new DBOracle_Helper(); { string sql = "select login_empno, login_password from thrm_login_psy where login_empno = '" + id + "' and login_password = '******'"; DataTable loginInfo = oHelper.GetData(sql); using (DataTableReader reader = new DataTableReader(loginInfo)) { if (reader.HasRows) { return(true); } } } } catch (OracleException ex) { MessageBox.Show(ex.Message); } return(false); }