protected void btnCong_Click(object sender, ImageClickEventArgs e) { PhanSo ps1 = PhanSo.Parse(txtPhanSo1.Text); PhanSo ps2 = PhanSo.Parse(txtPhanSo2.Text); PhanSo psKq = ps1.Cong(ps2); txtKetQua.Text = psKq.Xuat(); }
protected void btnCong_Click(object sender, ImageClickEventArgs e) { try { PhanSo p1 = PhanSo.Parse(txtPhanSo1.Text); PhanSo p2 = PhanSo.Parse(txtPhanSo2.Text); PhanSo kq = p1.Cong(p2); txtKetQua.Text = kq.Xuat(); } catch (Exception ex) { lblBaoLoi.Text = "Báo lổi:" + ex.Message; } }