Пример #1
0
        private void car_display()
        {
            function func = new function();

            String car_sql = "SELECT * FROM THRM_BAS_PJH," +
                             "(SELECT car_com,car_region, car_yyyymm_f, car_yyyymm_t,car_pos,car_dept,car_job,car_reason FROM THRM_CAR_PJH)" +
                             "WHERE bas_empno = car_region and car_region = '" + car_region.Text + "'";
            OracleCommand cmd = new OracleCommand();

            cmd.Connection  = pgOraConn;
            cmd.CommandText = car_sql;

            OracleDataReader rd = cmd.ExecuteReader();


            if (rd.Read())
            {
                car_com.Text    = rd["car_com"].ToString();
                car_region.Text = rd["car_region"].ToString();
                func.insertdatetime(car_yyyymm_f, rd["car_yyyymm_f"].ToString());
                func.insertdatetime(car_yyyymm_t, rd["car_yyyymm_t"].ToString());
                car_pos.Text    = rd["car_pos"].ToString();
                car_dept.Text   = rd["car_dept"].ToString();
                car_job.Text    = rd["car_job"].ToString();
                car_reason.Text = rd["car_reason"].ToString();
            }
        } // 경력사항
Пример #2
0
        private void sabun_display()  //인사기본사항 데이터 리스트 불러오기
        {
            function func = new function();

            //data 읽어오기
            String sabun_sql = "select * from THRM_BAS_pjh where BAS_EMPNO='" + bas_empno.Text + "'";
            //MessageBox.Show(sabun_sql);
            OracleCommand cmd = new OracleCommand();

            cmd.Connection  = pgOraConn;
            cmd.CommandText = sabun_sql;

            OracleDataReader rd = cmd.ExecuteReader();

            if (rd.Read()) // select 했을때 data 가 있는 경우 data 값을 텍스트박스안에 넣는다.
            {
                bas_empno.Text     = rd["bas_empno"].ToString();
                bas_resno.Text     = rd["bas_resno"].ToString();
                bas_name.Text      = rd["bas_name"].ToString();
                bas_cname.Text     = rd["bas_cname"].ToString();
                bas_ename.Text     = rd["bas_ename"].ToString();
                bas_fix.Text       = rd["bas_fix"].ToString();
                bas_zip.Text       = rd["bas_zip"].ToString();
                bas_addr.Text      = rd["bas_addr"].ToString();
                bas_residence.Text = rd["bas_residence"].ToString();
                bas_hdpno.Text     = rd["bas_hdpno"].ToString();
                bas_telno.Text     = rd["bas_telno"].ToString();
                bas_email.Text     = rd["bas_email"].ToString();
                bas_mil_sta.Text   = rd["bas_mil_sta"].ToString();
                bas_mil_mil.Text   = rd["bas_mil_mil"].ToString();
                bas_mil_rnk.Text   = rd["bas_mil_rnk"].ToString();
                bas_mar.Text       = rd["bas_mar"].ToString();
                bas_acc_bank1.Text = rd["bas_acc_bank1"].ToString();
                bas_acc_name1.Text = rd["bas_acc_name1"].ToString();
                bas_acc_no1.Text   = rd["bas_acc_no1"].ToString();
                bas_acc_no1.Text   = rd["bas_acc_bank2"].ToString();
                bas_acc_name2.Text = rd["bas_acc_name2"].ToString();
                bas_acc_no2.Text   = rd["bas_acc_no2"].ToString();
                bas_cont.Text      = rd["bas_cont"].ToString();
                bas_intern.Text    = rd["bas_intern"].ToString();
                bas_intern_no.Text = rd["bas_intern_no"].ToString();
                func.insertdatetime(bas_emp_sdate, rd["bas_emp_sdate"].ToString());
                func.insertdatetime(bas_emp_edate, rd["bas_emp_edate"].ToString());
                func.insertdatetime(bas_entdate, rd["bas_entdate"].ToString());
                func.insertdatetime(bas_resdate, rd["bas_resdate"].ToString());
                func.insertdatetime(bas_levdate, rd["bas_levdate"].ToString());
                func.insertdatetime(bas_reidate, rd["bas_reidate"].ToString());
                bas_wsta.Text   = rd["bas_wsta"].ToString();
                p_bas_sts.Text  = rd["bas_sts"].ToString();
                p_bas_pos.Text  = rd["bas_pos"].ToString();
                p_bas_dut.Text  = rd["bas_dut"].ToString();
                p_bas_dept.Text = rd["bas_dept"].ToString();
                bas_rmk.Text    = rd["bas_rmk"].ToString();
                func.insertdatetime(bas_pos_dt, rd["bas_pos_dt"].ToString());
                func.insertdatetime(bas_dut_dt, rd["bas_dut_dt"].ToString());
                func.insertdatetime(bas_dept_dt, rd["bas_dept_dt"].ToString());
                func.insertdatetime(bas_intern_dt, rd["bas_intern_dt"].ToString());



                edu_empno.Text  = rd["bas_empno"].ToString();
                edu_name.Text   = rd["bas_name"].ToString();
                edu_pos.Text    = rd["bas_pos"].ToString();
                edu_dept_e.Text = rd["bas_dept"].ToString();

                award_empno.Text  = rd["bas_empno"].ToString();
                award_name.Text   = rd["bas_name"].ToString();
                award_pos_a.Text  = rd["bas_pos"].ToString();
                award_dept_a.Text = rd["bas_dept"].ToString();

                lic_empno.Text = rd["bas_empno"].ToString();
                lic_name.Text  = rd["bas_name"].ToString();
                lic_pos.Text   = rd["bas_pos"].ToString();
                lic_dept.Text  = rd["bas_dept"].ToString();
            }
            else
            {
                MessageBox.Show("입력하신 사원번호가 없습니다.");
                return;
            }
            string sql1 = "select cd_code,cd_codnms from TIEAS_CD_PJH where cd_grpcd = 'STS' and cd_code = (select bas_sts from thrm_bas_pjh where bas_empno ='" + bas_empno.Text + "')";

            cmd             = new OracleCommand();
            cmd.Connection  = pgOraConn;
            cmd.CommandText = sql1;
            rd = cmd.ExecuteReader();

            while (rd.Read())
            {
                p_bas_sts.Text = (rd["cd_code"] as string + ":" + rd["cd_codnms"] as string);
            }

            sql1            = "select cd_code,cd_codnms from TIEAS_CD_PJH where cd_grpcd = 'POS' and cd_code = (select bas_sts from thrm_bas_pjh where bas_empno ='" + bas_empno.Text + "')";
            cmd             = new OracleCommand();
            cmd.Connection  = pgOraConn;
            cmd.CommandText = sql1;
            rd = cmd.ExecuteReader();

            while (rd.Read())
            {
                p_bas_pos.Text = (rd["cd_code"] as string + ":" + rd["cd_codnms"] as string);
            }
            sql1            = "select cd_code,cd_codnms from TIEAS_CD_PJH where cd_grpcd = 'DUT' and cd_code = (select bas_sts from thrm_bas_pjh where bas_empno ='" + bas_empno.Text + "')";
            cmd             = new OracleCommand();
            cmd.Connection  = pgOraConn;
            cmd.CommandText = sql1;
            rd = cmd.ExecuteReader();

            while (rd.Read())
            {
                p_bas_dut.Text = (rd["cd_code"] as string + ":" + rd["cd_codnms"] as string);
            }
            sql1 = "select dept_name from THRM_DEPT_PJH where dept_code = '" + p_bas_code.Text + "'";

            cmd             = new OracleCommand();
            cmd.Connection  = pgOraConn;
            cmd.CommandText = sql1;
            OracleDataReader rd1 = cmd.ExecuteReader();

            while (rd1.Read())
            {
                p_bas_dept.Text = rd1["dept_name"].ToString();
            }

            string sql7 = "select cd_code,cd_codnms from TIEAS_CD_PJH where cd_grpcd = 'POS' and cd_code = (select bas_pos from thrm_bas_pjh where bas_empno ='" +
                          bas_empno.Text + "')"; //가족직급

            cmd             = new OracleCommand();
            cmd.Connection  = pgOraConn;
            cmd.CommandText = sql7;
            OracleDataReader rddddddd = cmd.ExecuteReader();

            while (rddddddd.Read())
            {
                bas_pos_f.Text = (rddddddd["cd_code"].ToString() + ":" + rddddddd["cd_codnms"].ToString());
            }

            string sql8 = "select dept_name from THRM_DEPT_PJH where dept_code = '" + bas_dept_f.Text + "'"; //가족부서

            cmd             = new OracleCommand();
            cmd.Connection  = pgOraConn;
            cmd.CommandText = sql8;
            OracleDataReader rdd = cmd.ExecuteReader();

            while (rdd.Read())
            {
                bas_dept_f.Text = rdd["dept_name"].ToString();
            }

            string sql9 = "select cd_code,cd_codnms from TIEAS_CD_PJH where cd_grpcd = 'POS' and cd_code = (select bas_pos from thrm_bas_pjh where bas_empno ='" +
                          bas_empno.Text + "')"; //학력직급

            cmd             = new OracleCommand();
            cmd.Connection  = pgOraConn;
            cmd.CommandText = sql9;
            OracleDataReader rrd = cmd.ExecuteReader();

            while (rrd.Read())
            {
                award_pos_a.Text = (rrd["cd_code"].ToString() + ":" + rrd["cd_codnms"].ToString());
            }

            string sql10 = "select dept_name from THRM_DEPT_PJH where dept_code = '" + award_dept_a.Text + "'"; //학력부서

            cmd             = new OracleCommand();
            cmd.Connection  = pgOraConn;
            cmd.CommandText = sql10;
            OracleDataReader rrrd = cmd.ExecuteReader();

            while (rrrd.Read())
            {
                award_dept_a.Text = rrrd["dept_name"].ToString();
            }
        }