Пример #1
0
        private void employeeToolStripMenuItem1_Click_1(object sender, EventArgs e)
        {
            frmEmpProfile obj = new frmEmpProfile();

            obj.MdiParent = this;
            obj.Show();
        }
Пример #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            frmEmpProfile obj = new frmEmpProfile();

            obj.Show();
            this.Hide();
        }
Пример #3
0
        private void profileEntryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmEmpProfile obj = new frmEmpProfile();

            obj.MdiParent = this;
            obj.Show();
        }
Пример #4
0
        private void employeeDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                frmEmpProfile obj = new frmEmpProfile();
                this.Hide();
                obj.Show();

                obj.EbtnUpdate.Enabled = true;
                obj.EbtnDelete.Enabled = true;
                obj.EID.Text           = employeeDataGridView.SelectedRows[0].Cells[0].Value.ToString();
                obj.EName.Text         = employeeDataGridView.SelectedRows[0].Cells[1].Value.ToString();
                obj.CitizenNo.Text     = employeeDataGridView.SelectedRows[0].Cells[2].Value.ToString();

                if (employeeDataGridView.SelectedRows[0].Cells[3].Value.ToString() == "Male")
                {
                    obj.radioButton1.Checked = true;
                    obj.radioButton2.Checked = false;
                    obj.radioButton3.Checked = false;
                }

                if (employeeDataGridView.SelectedRows[0].Cells[3].Value.ToString() == "Female")
                {
                    obj.radioButton1.Checked = false;
                    obj.radioButton2.Checked = true;
                    obj.radioButton3.Checked = false;
                }

                if (employeeDataGridView.SelectedRows[0].Cells[3].Value.ToString() == "Not Specified")
                {
                    obj.radioButton1.Checked = false;
                    obj.radioButton2.Checked = false;
                    obj.radioButton3.Checked = true;
                }

                obj.MStatus.Text       = employeeDataGridView.SelectedRows[0].Cells[4].Value.ToString();
                obj.DOB.Text           = employeeDataGridView.SelectedRows[0].Cells[5].Value.ToString();
                obj.EFName.Text        = employeeDataGridView.SelectedRows[0].Cells[6].Value.ToString();
                obj.EMName.Text        = employeeDataGridView.SelectedRows[0].Cells[7].Value.ToString();
                obj.EPAdd.Text         = employeeDataGridView.SelectedRows[0].Cells[8].Value.ToString();
                obj.ETAdd.Text         = employeeDataGridView.SelectedRows[0].Cells[9].Value.ToString();
                obj.EContact.Text      = employeeDataGridView.SelectedRows[0].Cells[10].Value.ToString();
                obj.EReligion.Text     = employeeDataGridView.SelectedRows[0].Cells[11].Value.ToString();
                obj.EDept.Text         = employeeDataGridView.SelectedRows[0].Cells[12].Value.ToString();
                obj.Dateofjoining.Text = employeeDataGridView.SelectedRows[0].Cells[13].Value.ToString();

                obj.EExperience.Text    = employeeDataGridView.SelectedRows[0].Cells[14].Value.ToString();
                obj.EEmail.Text         = employeeDataGridView.SelectedRows[0].Cells[15].Value.ToString();
                obj.EPost.Text          = employeeDataGridView.SelectedRows[0].Cells[16].Value.ToString();
                obj.EBankAcc.Text       = employeeDataGridView.SelectedRows[0].Cells[17].Value.ToString();
                obj.EBSalary.Text       = employeeDataGridView.SelectedRows[0].Cells[18].Value.ToString();
                obj.EQualification.Text = employeeDataGridView.SelectedRows[0].Cells[19].Value.ToString();
                obj.EComment.Text       = employeeDataGridView.SelectedRows[0].Cells[20].Value.ToString();

                obj.EPhoto.ImageLocation = System.Windows.Forms.Application.StartupPath + "\\images\\" + obj.EID.Text + ".jpg";
            }
            catch (Exception)
            {
                // throw;
            }
        }
Пример #5
0
        private void frmEmployeeDataGridView_FormClosing(object sender, FormClosingEventArgs e)
        {
            frmEmpProfile obj = new frmEmpProfile();

            obj.Show();
        }