private void bt_TroVe_Click(object sender, EventArgs e) { MHDSComment mhDSComment = new MHDSComment(); this.Hide(); mhDSComment.ShowDialog(); }
private void bt_ThemComment_Click(object sender, EventArgs e) { int pMaCMT = (int)CommentBUS.Instance.AutoID(); string pTrangThai = "đã đăng"; if (cb_Sao.SelectedItem == null) { MessageBox.Show("Bạn cần đánh giá sao!"); } else { Comment cmt = new Comment(pMaCMT, DateTime.Now, int.Parse(cb_Sao.Text), tb_NoiDung.Text, null, int.Parse(MHDangNhap.pTaiKhoan), int.Parse(MHTimSP.pMaSP), pTrangThai.ToString()); if (CommentBUS.Instance.Them(cmt)) { MessageBox.Show("Thêm thành công"); MHDSComment mhDSComment = new MHDSComment(); this.Hide(); mhDSComment.ShowDialog(); } else { MessageBox.Show("Lỗi"); } } }
private void button1_Click(object sender, EventArgs e) { if (txbGiaThiTruong.Text != String.Empty) { MHDSComment mhdscmt = new MHDSComment(); this.Hide(); mhdscmt.ShowDialog(); } else { MessageBox.Show("Bạn chưa chọn sản phẩm!"); } }