예제 #1
0
        private void ts_btn_clear_Click(object sender, EventArgs e)
        {
            frm_add_employee f = new frm_add_employee();

            f.txt_id.Text = this.txt_id.Text;
            f.ShowDialog();
            this.Close();
        }
예제 #2
0
        private void dgv_employee_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            frm_add_employee frm = new frm_add_employee();

            frm.txt_id.Text      = dgv_employee.CurrentRow.Cells[0].Value.ToString();
            frm.txt_name.Text    = dgv_employee.CurrentRow.Cells[1].Value.ToString();
            frm.txt_address.Text = dgv_employee.CurrentRow.Cells[2].Value.ToString();
            frm.txt_phone.Text   = dgv_employee.CurrentRow.Cells[3].Value.ToString();

            frm.cb_status.SelectedItem = dgv_employee.CurrentRow.Cells[4].Value.ToString();
            frm.txt_email.Text         = dgv_employee.CurrentRow.Cells[5].Value.ToString();
            frm.cb_sex.SelectedItem    = dgv_employee.CurrentRow.Cells[6].Value.ToString();
            frm.dtp_birthDate.Text     = dgv_employee.CurrentRow.Cells[7].Value.ToString();

            frm.cb_religion.SelectedItem    = dgv_employee.CurrentRow.Cells[8].Value.ToString();
            frm.txt_birthPlace.Text         = dgv_employee.CurrentRow.Cells[9].Value.ToString();
            frm.cb_nationality.SelectedItem = dgv_employee.CurrentRow.Cells[10].Value.ToString();
            frm.txt_card_id.Text            = dgv_employee.CurrentRow.Cells[11].Value.ToString();

            frm.txt_cardReleasePlace.Text     = dgv_employee.CurrentRow.Cells[12].Value.ToString();
            frm.dtp_card_realease_date.Text   = dgv_employee.CurrentRow.Cells[13].Value.ToString();
            frm.cb_qualification.SelectedItem = dgv_employee.CurrentRow.Cells[14].Value.ToString();
            frm.dtp_qualification_date.Text   = dgv_employee.CurrentRow.Cells[15].Value.ToString();

            frm.nupd__years_of_experience.Value = int.Parse(dgv_employee.CurrentRow.Cells[16].Value.ToString());
            frm.txt_experience.Text             = dgv_employee.CurrentRow.Cells[17].Value.ToString();
            frm.cb_prevoius_jobs.SelectedItem   = dgv_employee.CurrentRow.Cells[18].Value.ToString();
            frm.dtp_hiring_date.Text            = dgv_employee.CurrentRow.Cells[19].Value.ToString();

            frm.txt_totalSalary.Value        = int.Parse(dgv_employee.CurrentRow.Cells[20].Value.ToString());
            frm.cb_career_level.SelectedItem = dgv_employee.CurrentRow.Cells[21].Value.ToString();
            //frm.c.SelectedItem = dgv_employee.CurrentRow.Cells[22].Value.ToString();
            frm.txt_depCode.Text = dgv_employee.CurrentRow.Cells[23].Value.ToString();
            if (dgv_employee.CurrentRow.Cells[24].Value.ToString() == "Emp")
            {
                frm.rdb_Emp.Checked = true;
                frm.cb_career_name1.SelectedItem = dgv_employee.CurrentRow.Cells[22].Value.ToString();
            }
            else if (dgv_employee.CurrentRow.Cells[24].Value.ToString() == "Doc")
            {
                frm.rdb_doc.Checked = true;
                frm.cb_career_name2.SelectedItem = dgv_employee.CurrentRow.Cells[22].Value.ToString();
            }
            frm.cb_bloodType.SelectedItem = dgv_employee.CurrentRow.Cells[25].Value.ToString();

            frm.ts_btn_clear.Visible = false;
            frm.ts_btn_save.Visible  = false;
            frm.groupBox1.Enabled    = false;
            frm.groupBox2.Enabled    = false;
            frm.groupBox3.Enabled    = false;
            frm.groupBox4.Enabled    = false;
            frm.groupBox5.Enabled    = false;


            frm.ShowDialog();
            this.frm_employee_Load(sender, e);
        }
예제 #3
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            frm_add_employee frm = new frm_add_employee();

            frm.Text        = "اضافة موظف جديد";
            frm.Name        = "add_emp";
            frm.txt_id.Text = cls_validate.increasekey(emp_code, 4);
            frm.ShowDialog();
            this.frm_employee_Load(sender, e);
        }
예제 #4
0
 public frm_department(frm_add_employee frm)
 {
     this.op = frm;
     InitializeComponent();
     loadPriv();
 }