Exemple #1
0
        private void btnThemDo_Click(object sender, EventArgs e)
        {
            frmThemDo frm = new frmThemDo();

            frm.ShowDialog();
            LoadDo();
        }
Exemple #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            int       ID        = int.Parse(gvDo.GetRowCellValue(gvDo.FocusedRowHandle, "ID").ToString());
            string    tenDo     = gvDo.GetRowCellValue(gvDo.FocusedRowHandle, "TenDo").ToString();
            int       ID_LoaiDo = int.Parse(gvDo.GetRowCellValue(gvDo.FocusedRowHandle, "IDLoai").ToString());
            float     donGia    = float.Parse(gvDo.GetRowCellValue(gvDo.FocusedRowHandle, "DonGia").ToString());
            frmThemDo frm       = new frmThemDo(ID, tenDo, ID_LoaiDo, donGia);

            frm.ShowDialog();
            LoadDo();
        }