// EDIT UPDATE
        public frm_AddEmployee(string RecordType, frm_Employees frm_Employees)
        {
            //: this(RecordType)
            InitializeComponent();
            this.RecordType    = RecordType;
            this.frm_Employees = frm_Employees;
            this.btnSave.Text  = "Update";

            txtEmployeeName.Text = frm_Employees.dgvEmployeeList.CurrentRow.Cells[1].Value.ToString();
            txtContactNo.Text    = frm_Employees.dgvEmployeeList.CurrentRow.Cells[2].Value.ToString();
            if (frm_Employees.dgvEmployeeList.CurrentRow.Cells[3].Value.ToString() == "Male")
            {
                comboGender.SelectedIndex = 1;
            }
            if (frm_Employees.dgvEmployeeList.CurrentRow.Cells[3].Value.ToString() == "Female")
            {
                comboGender.SelectedIndex = 2;
            }
            if (frm_Employees.dgvEmployeeList.CurrentRow.Cells[3].Value.ToString() == "Other")
            {
                comboGender.SelectedIndex = 3;
            }
            dtpDateOfJoin.Value = Convert.ToDateTime(frm_Employees.dgvEmployeeList.CurrentRow.Cells[4].Value.ToString());
            txtSalary.Text      = frm_Employees.dgvEmployeeList.CurrentRow.Cells[5].Value.ToString();
        }
Example #2
0
        private void employeeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_Employees frm = new frm_Employees();

            frm.ShowDialog();
        }