Ejemplo n.º 1
0
        private void btnsua_Click(object sender, EventArgs e)
        {
            //double sohs = double.Parse( dgv_thisinh.CurrentRow.Cells[0].Value.ToString());
            //MessageBox.Show(sohs.ToString());
            //Suathisinh sua = new Suathisinh(sohs);
            //sua.DataAvailable += new EventHandler(child_DataAvaiable);
            //sua.Show();

            //Suathisinh sua = new Suathisinh();
            //sua.sohs = dgv_thisinh.CurrentRow.Cells[0].Value.ToString();
            //sua.hoten = dgv_thisinh.CurrentRow.Cells[1].Value.ToString();
            //sua.gioitinh = dgv_thisinh.CurrentRow.Cells[2].Value.ToString();
            //sua.ngaysinh = DateTime.Parse(dgv_thisinh.CurrentRow.Cells[3].Value.ToString());

            //sua.noisinh = dgv_thisinh.CurrentRow.Cells[4].Value.ToString();
            //sua.cmnd = dgv_thisinh.CurrentRow.Cells[5].Value.ToString();
            //sua.ngaycap = DateTime.Parse(dgv_thisinh.CurrentRow.Cells[6].Value.ToString());
            //sua.noicap = dgv_thisinh.CurrentRow.Cells[7].Value.ToString();
            //sua.hktt = dgv_thisinh.CurrentRow.Cells[8].Value.ToString();
            //sua.sdt = dgv_thisinh.CurrentRow.Cells[9].Value.ToString();
            //if (dgv_thisinh.CurrentRow.Cells[10].Value != null)
            //{
            //    sua.dtcd = dgv_thisinh.CurrentRow.Cells[10].Value.ToString();
            //}
            //else
            //{
            //    sua.dtcd = "";
            //}
            //sua.email = dgv_thisinh.CurrentRow.Cells[11].Value.ToString();
            //sua.namtn = float.Parse(dgv_thisinh.CurrentRow.Cells[12].Value.ToString());
            //sua.lephi = dgv_thisinh.CurrentRow.Cells[13].Value.ToString();
            //sua.Show();
            //String masv = dgv_thisinh.CurrentRow.Cells[0].Value.ToString();
            //Suathisinh up = new Suathisinh(masv);
            //up.DataAvailable += new EventHandler(child_DataAvaiable);
            //up.Show();
            SuaThiSinh sua = new SuaThiSinh();
            sua.sohs = dgv_thisinh.CurrentRow.Cells[0].Value.ToString();
            sua.hoten = dgv_thisinh.CurrentRow.Cells[1].Value.ToString();
            sua.gioitinh = dgv_thisinh.CurrentRow.Cells[2].Value.ToString();
            sua.ngaysinh = DateTime.Parse(dgv_thisinh.CurrentRow.Cells[3].Value.ToString());

            sua.noisinh = dgv_thisinh.CurrentRow.Cells[4].Value.ToString();
            sua.cmnd = dgv_thisinh.CurrentRow.Cells[5].Value.ToString();
            sua.ngaycap = DateTime.Parse(dgv_thisinh.CurrentRow.Cells[6].Value.ToString());
            sua.noicap = dgv_thisinh.CurrentRow.Cells[7].Value.ToString();
            sua.hktt = dgv_thisinh.CurrentRow.Cells[8].Value.ToString();
            sua.sdt = dgv_thisinh.CurrentRow.Cells[9].Value.ToString();
            if (dgv_thisinh.CurrentRow.Cells[10].Value != null)
            {
                sua.dtcd = dgv_thisinh.CurrentRow.Cells[10].Value.ToString();
            }
            else
            {
                sua.dtcd = "";
            }
            sua.email = dgv_thisinh.CurrentRow.Cells[11].Value.ToString();
            sua.namtn = float.Parse(dgv_thisinh.CurrentRow.Cells[12].Value.ToString());
            sua.lephi = dgv_thisinh.CurrentRow.Cells[13].Value.ToString();
            sua.Show();
        }
Ejemplo n.º 2
0
        //private void dgv_thisinh_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        //{
        //    Suathisinh sua = new Suathisinh();
        //    sua.sohs = dgv_thisinh.CurrentRow.Cells[0].Value.ToString();
        //    sua.hoten = dgv_thisinh.CurrentRow.Cells[1].Value.ToString();
        //    sua.gioitinh = dgv_thisinh.CurrentRow.Cells[2].Value.ToString();
        //    sua.ngaysinh = DateTime.Parse(dgv_thisinh.CurrentRow.Cells[3].Value.ToString());
        //    sua.noisinh = dgv_thisinh.CurrentRow.Cells[4].Value.ToString();
        //    sua.cmnd = dgv_thisinh.CurrentRow.Cells[5].Value.ToString();
        //    sua.ngaycap = DateTime.Parse(dgv_thisinh.CurrentRow.Cells[6].Value.ToString());
        //    sua.noicap = dgv_thisinh.CurrentRow.Cells[7].Value.ToString();
        //    sua.hktt = dgv_thisinh.CurrentRow.Cells[8].Value.ToString();
        //    sua.sdt = dgv_thisinh.CurrentRow.Cells[9].Value.ToString();
        //    if (dgv_thisinh.CurrentRow.Cells[10].Value != null)
        //    {
        //        sua.dtcd = dgv_thisinh.CurrentRow.Cells[10].Value.ToString();
        //    }
        //    else
        //    {
        //        sua.dtcd = "";
        //    }
        //    sua.email = dgv_thisinh.CurrentRow.Cells[11].Value.ToString();
        //    sua.namtn = float.Parse(dgv_thisinh.CurrentRow.Cells[12].Value.ToString());
        //    sua.lephi = dgv_thisinh.CurrentRow.Cells[13].Value.ToString();
        //    sua.Show();
        //}
        private void dgv_thisinh_CellDoubleClick_1(object sender, DataGridViewCellEventArgs e)
        {
            SuaThiSinh sua = new SuaThiSinh();
            sua.sohs = dgv_thisinh.CurrentRow.Cells[0].Value.ToString();
            sua.hoten = dgv_thisinh.CurrentRow.Cells[1].Value.ToString();
            sua.gioitinh = dgv_thisinh.CurrentRow.Cells[2].Value.ToString();
            sua.ngaysinh = DateTime.Parse(dgv_thisinh.CurrentRow.Cells[3].Value.ToString());

            sua.noisinh = dgv_thisinh.CurrentRow.Cells[4].Value.ToString();
            sua.cmnd = dgv_thisinh.CurrentRow.Cells[5].Value.ToString();
            sua.ngaycap = DateTime.Parse(dgv_thisinh.CurrentRow.Cells[6].Value.ToString());
            sua.noicap = dgv_thisinh.CurrentRow.Cells[7].Value.ToString();
            sua.hktt = dgv_thisinh.CurrentRow.Cells[8].Value.ToString();
            sua.sdt = dgv_thisinh.CurrentRow.Cells[9].Value.ToString();
            if (dgv_thisinh.CurrentRow.Cells[10].Value != null)
            {
                sua.dtcd = dgv_thisinh.CurrentRow.Cells[10].Value.ToString();
            }
            else
            {
                sua.dtcd = "";
            }
            sua.email = dgv_thisinh.CurrentRow.Cells[11].Value.ToString();
            sua.namtn = float.Parse(dgv_thisinh.CurrentRow.Cells[12].Value.ToString());
            sua.lephi = dgv_thisinh.CurrentRow.Cells[13].Value.ToString();
            sua.Show();
        }