Example #1
0
        private void Button_subTTCN_add_Click(object sender, EventArgs e)
        {
            SubFormNhanVien f = new SubFormNhanVien(-1);

            f.D += new SubFormNhanVien.MyDel(ShowDTGV);
            f.ShowDialog();
        }
Example #2
0
        private void Button_subTTCN_update_Click(object sender, EventArgs e)
        {
            DataGridViewSelectedRowCollection r = dataGridView1.SelectedRows;

            if (r.Count == 1)
            {
                int             NVID = Convert.ToInt32(r[0].Cells["nvID"].Value.ToString());
                SubFormNhanVien f    = new SubFormNhanVien(NVID);
                f.D += new SubFormNhanVien.MyDel(ShowDTGV);
                f.ShowDialog();
            }
            if (r.Count == 0)
            {
                MessageBox.Show("Vui lòng chọn 1 nhân viên để chỉnh sửa");
            }
            if (r.Count > 1)
            {
                MessageBox.Show("Chỉ có thể cập nhật 1 nhân viên. ");
            }
        }