Ejemplo n.º 1
0
 private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (e.RowIndex < 0)
     {
         return;
     }
     try
     {
         int             rowIndex    = this.dataGridView1.CurrentCell.RowIndex;
         DataGridViewRow row         = this.dataGridView1.Rows[rowIndex];
         INFO            currentInfo = row.DataBoundItem as INFO;
         if (currentInfo != null)
         {
             Reference_Print rf = new Reference_Print();
             rf.empno = currentInfo.bas_empno;
             rf.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 2
0
 private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     main_P.setInsertButton(false, Properties.Resources.insert_);
     main_P.setUpdateButton(true, Properties.Resources.update);
     main_P.setDeleteButton(true, Properties.Resources.delete);
     main_P.setCancelButton(true, Properties.Resources.cancel);
     if (e.RowIndex < 0)
     {
         return;
     }
     try
     {
         int             rowIndex    = this.dataGridView1.CurrentCell.RowIndex;
         DataGridViewRow row         = this.dataGridView1.Rows[rowIndex];
         INFO            currentInfo = row.DataBoundItem as INFO;
         if (currentInfo != null)
         {
             Information inf = (Information)tabControl1.TabPages[0].Controls[0];
             inf.bas_empno.Text = currentInfo.bas_empno;
             Empno = currentInfo.bas_empno;
             inf.bas_resno1.Text = currentInfo.bas_resno1;
             inf.bas_resno2.Text = currentInfo.bas_resno2;
             inf.bas_name.Text   = currentInfo.bas_name;
             inf.bas_cname.Text  = currentInfo.bas_cname;
             inf.bas_ename.Text  = currentInfo.bas_ename;
             if (currentInfo.bas_fix == "남")
             {
                 inf.radioButton1.Checked = true;
             }
             else if (currentInfo.bas_fix == "여")
             {
                 inf.radioButton2.Checked = true;
             }
             inf.bas_zip.Text       = currentInfo.bas_zip;
             inf.bas_addr.Text      = currentInfo.bas_addr;
             inf.bas_residence.Text = currentInfo.bas_residence;
             inf.bas_hdpno.Text     = currentInfo.bas_hdpno;
             inf.bas_telno.Text     = currentInfo.bas_telno;
             inf.bas_email.Text     = currentInfo.bas_email;
             inf.bas_mil_sta.Text   = currentInfo.bas_mil_sta;
             inf.bas_mil_mil.Text   = currentInfo.bas_mil_mil;
             inf.bas_mil_rnk.Text   = currentInfo.bas_mil_rnk;
             inf.bas_mar.Text       = currentInfo.bas_mar;
             inf.bas_acc_bank1.Text = currentInfo.bas_acc_bank1;
             inf.bas_acc_name1.Text = currentInfo.bas_acc_name1;
             inf.bas_acc_no1.Text   = currentInfo.bas_acc_no1;
             inf.bas_acc_bank2.Text = currentInfo.bas_acc_bank2;
             inf.bas_acc_name2.Text = currentInfo.bas_acc_name2;
             inf.bas_acc_no2.Text   = currentInfo.bas_acc_no2;
             inf.bas_cont.Text      = currentInfo.bas_cont;
             inf.bas_intern.Text    = currentInfo.bas_intern;
             inf.bas_intern_no.Text = currentInfo.bas_intern_no;
             inf.bas_emp_sdate.Text = currentInfo.bas_emp_sdate;
             inf.bas_emp_edate.Text = currentInfo.bas_emp_edate;
             inf.bas_entdate.Text   = currentInfo.bas_entdate;
             inf.bas_resdate.Text   = currentInfo.bas_resdate;
             inf.bas_levdate.Text   = currentInfo.bas_levdate;
             inf.bas_reidate.Text   = currentInfo.bas_reidate;
             inf.bas_wsta.Text      = currentInfo.bas_wsta;
             inf.bas_sts.Text       = currentInfo.bas_sts;
             inf.bas_pos.Text       = currentInfo.bas_pos;
             inf.bas_dut.Text       = currentInfo.bas_dut;
             inf.bas_dept.Text      = currentInfo.bas_dept;
             inf.bas_rmk.Text       = currentInfo.bas_rmk;
             inf.bas_pos_dt.Text    = currentInfo.bas_pos_dt;
             inf.bas_dut_dt.Text    = currentInfo.bas_dut_dt;
             inf.bas_dept_dt.Text   = currentInfo.bas_dept_dt;
             inf.bas_intern_dt.Text = currentInfo.bas_intern_dt;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     dataSelect("DataLoad");
 }
Ejemplo n.º 3
0
        private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            if (comboBox1.Text == "선택")
            {
                MessageBox.Show("증명서 구분을 선택해 주세요.");
                return;
            }
            if (String.IsNullOrWhiteSpace(textBox1.Text))
            {
                MessageBox.Show("사용 용도를 입력해 주세요.");
                return;
            }
            try
            {
                int             rowIndex    = this.dataGridView1.CurrentCell.RowIndex;
                DataGridViewRow row         = this.dataGridView1.Rows[rowIndex];
                INFO            currentInfo = row.DataBoundItem as INFO;
                if (currentInfo != null)
                {
                    if (comboBox1.Text == "재직증명서")
                    {
                        Emp_cert ec      = new Emp_cert();
                        string[] result  = currentInfo.bas_dut.Split(new string[] { ":" }, StringSplitOptions.None);
                        string   dut     = result[1];
                        string[] result2 = currentInfo.bas_dept.Split(new string[] { ":" }, StringSplitOptions.None);
                        string   dept    = result2[1];
                        ec.name.Text    = currentInfo.bas_name;
                        ec.birth.Text   = currentInfo.bas_resno1;
                        ec.address.Text = currentInfo.bas_addr;
                        ec.phone.Text   = currentInfo.bas_hdpno;
                        ec.dept.Text    = dept;
                        ec.entdate.Text = currentInfo.bas_entdate;
                        ec.dut.Text     = dut;
                        ec.use.Text     = textBox1.Text;
                        ec.year.Text    = DateTime.Now.ToString("yyyy");
                        ec.month.Text   = DateTime.Now.ToString("MM");
                        ec.day.Text     = DateTime.Now.ToString("dd");
                        ec.empno        = currentInfo.bas_empno;
                        ec.user         = User;
                        ec.ShowDialog();
                    }
                    if (comboBox1.Text == "경력증명서")
                    {
                        if (dBManager.GetConnection() == true)
                        {
                            using (OracleCommand cmd = new OracleCommand())
                            {
                                cmd.Connection  = dBManager.Connection;
                                cmd.CommandText = "select * from thrm_car_ljm where car_empno = '" + currentInfo.bas_empno + "'";
                                reader          = cmd.ExecuteReader();

                                Career_cert cc      = new Career_cert();
                                string[]    result  = currentInfo.bas_dut.Split(new string[] { ":" }, StringSplitOptions.None);
                                string      dut     = result[1];
                                string[]    result2 = currentInfo.bas_dept.Split(new string[] { ":" }, StringSplitOptions.None);
                                string      dept    = result2[1];
                                cc.name.Text    = currentInfo.bas_name;
                                cc.birth.Text   = currentInfo.bas_resno1;
                                cc.address.Text = currentInfo.bas_addr;
                                cc.dept.Text    = dept;
                                cc.dut.Text     = dut;
                                cc.use.Text     = textBox1.Text;
                                cc.year.Text    = DateTime.Now.ToString("yyyy");
                                cc.month.Text   = DateTime.Now.ToString("MM");
                                cc.day.Text     = DateTime.Now.ToString("dd");
                                cc.empno        = currentInfo.bas_empno;
                                cc.user         = User;
                                if (reader.Read())
                                {
                                    cc.car_dept.Text = reader["car_dept"].ToString();
                                    cc.car_job.Text  = reader["car_job"].ToString();
                                    cc.f_date.Text   = reader["car_yyyymm_f"].ToString();
                                    cc.t_date.Text   = reader["car_yyyymm_t"].ToString();
                                }
                                else
                                {
                                    cc.car_dept.Text = "";
                                    cc.car_job.Text  = "";
                                    cc.f_date.Text   = "";
                                    cc.t_date.Text   = "";
                                }
                                cc.ShowDialog();
                            }
                        }
                    }
                    if (comboBox1.Text == "영문증명서")
                    {
                        Eng_cert enc     = new Eng_cert();
                        string[] result  = currentInfo.bas_dut.Split(new string[] { ":" }, StringSplitOptions.None);
                        string   dut     = result[1];
                        string[] result2 = currentInfo.bas_dept.Split(new string[] { ":" }, StringSplitOptions.None);
                        string   dept    = result2[1];


                        enc.name.Text    = Papago(currentInfo.bas_name);
                        enc.birth.Text   = currentInfo.bas_resno1;
                        enc.address.Text = Papago(currentInfo.bas_addr);
                        enc.phone.Text   = currentInfo.bas_hdpno;
                        enc.dept.Text    = Papago(dept);
                        enc.entdate.Text = currentInfo.bas_entdate;
                        enc.dut.Text     = Papago(dut);
                        enc.use.Text     = Papago(textBox1.Text);
                        CultureInfo culture = new CultureInfo("en-US");
                        enc.year.Text = DateTime.Now.ToString("MMMM/dd/yyyy", culture);
                        enc.empno     = currentInfo.bas_empno;
                        enc.user      = User;
                        enc.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }