示例#1
0
        private void bt_TroVe_Click(object sender, EventArgs e)
        {
            MHDSComment mhDSComment = new MHDSComment();

            this.Hide();
            mhDSComment.ShowDialog();
        }
示例#2
0
        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");
                }
            }
        }
示例#3
0
 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!");
     }
 }