Beispiel #1
0
        public void HienThiHV(int vitri)
        {
            CHocVien hv = (CHocVien)arrHV[vitri];

            txtMHV.Text    = hv.MHV;
            txtHT.Text     = hv.HT;
            dtpNS.Value    = hv.NS;
            chkGT.Checked  = hv.GT;
            txtD1.Text     = Convert.ToString(hv.D1);
            txtD2.Text     = hv.D2.ToString();
            txtKetQua.Text = hv.KetQua();
        }
Beispiel #2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            CHocVien hv = (CHocVien)arrHV[ipos];

            hv.MHV         = txtMHV.Text;
            hv.HT          = txtHT.Text;
            hv.NS          = dtpNS.Value;
            hv.GT          = chkGT.Checked;
            hv.D1          = Convert.ToSingle(txtD1.Text);
            hv.D2          = Convert.ToSingle(txtD2.Text);
            txtKetQua.Text = hv.KetQua();
            HienThiListHV();
        }
Beispiel #3
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            //Nhập 1 hv vào Mảng:
            CHocVien hv = new CHocVien();

            hv.MHV         = txtMHV.Text;
            hv.HT          = txtHT.Text;
            hv.NS          = dtpNS.Value;
            hv.GT          = chkGT.Checked;
            hv.D1          = Convert.ToSingle(txtD1.Text);
            hv.D2          = Convert.ToSingle(txtD2.Text);
            txtKetQua.Text = hv.KetQua();
            arrHV.Add(hv);
            ipos++;
            Clear();
            HienThiListHV();
        }