示例#1
0
        private void btnDetail_Click(object sender, EventArgs e)
        {
            DataRow          selectedRow  = gridContentTeacher.GetDataRow(gridContentTeacher.FocusedRowHandle);
            SimpleButton     btnDetails   = (SimpleButton)sender;
            frmAddNewTeacher frmDeTeacher = new frmAddNewTeacher();

            frmDeTeacher.btnSender = btnDetails.Text;
            int    ids     = int.Parse(selectedRow["GIV_ID"].ToString());
            string Codes   = selectedRow["GIV_Code"].ToString();
            string NamesF  = selectedRow["GIV_Name"].ToString();
            string Fones   = selectedRow["GIV_Phone"].ToString();
            string DiaChis = selectedRow["GIV_Address"].ToString();
            string Khoas   = selectedRow["GIV_Khoa"].ToString();

            frmDeTeacher.sId        = ids;
            frmDeTeacher.sCode      = Codes;
            frmDeTeacher.sName      = NamesF;
            frmDeTeacher.sDienThoai = Fones;
            frmDeTeacher.sDiaChi    = DiaChis;
            frmDeTeacher.sKhoa      = Khoas;

            DialogResult result = frmDeTeacher.ShowDialog();

            loadTrainerList();
        }
示例#2
0
        private void btnAddNew_Click_1(object sender, EventArgs e)
        {
            SimpleButton     btnAddNews   = (SimpleButton)sender;
            frmAddNewTeacher frmDeTeacher = new frmAddNewTeacher();

            frmDeTeacher.btnSender         = btnAddNews.Text;
            frmDeTeacher.sGetGridViewIndex = gridContentTeacher.RowCount + 1;
            DialogResult result = frmDeTeacher.ShowDialog();

            loadTrainerList();
        }