示例#1
0
        private void btnXemchitiet_Click(object sender, EventArgs e)
        {
            Form_SanPham f = new Form_SanPham(DgvLSGD.SelectedRows[0].Cells[3].Value.ToString(), this, 1);

            f.bunifuButton1.Visible = f.bunifuButton2.Visible = false;
            f.ShowDialog();
        }
示例#2
0
        public void Click(object sender, EventArgs e)
        {
            Form_SanPham frmspx = new Form_SanPham(_masp, this.parent)
            {
                TopLevel = false, TopMost = true
            };

            this.parent.fpnlChiTiet.Controls.Clear();
            this.parent.fpnlChiTiet.Controls.Add(frmspx);
            this.parent.fpnlProduct.Visible = false;
            this.parent.fpnlChiTiet.Visible = true;
            frmspx.Show();
        }
        private void picProduct_Click(object sender, EventArgs e)
        {
            Form_SanPham frmspx = new Form_SanPham(_masp, this.parent)
            {
                TopLevel = false, TopMost = true
            };

            this.parent.fpnlChiTiet.Controls.Clear();
            this.parent.fpnlChiTiet.Controls.Add(frmspx);
            this.parent.fpnlProduct.Visible = false;
            this.parent.fpnlChiTiet.Visible = true;
            this.parent.fpnlChiTiet.BringToFront();
            this.parent.pnlChiTietChange.Visible = true;
            Data_gioHang.Instance.AddDaXem(_masp);
            frmspx.Show();
        }
示例#4
0
        public ucNhanXet(Form_SanPham parent, string id, string name, int vote, string danhGiaChinh, string danhGiaChiTiet,
                         List <string> link_image)
        {
            InitializeComponent();
            this.parent            = parent;
            lblName.Text           = name;
            rating.Value           = vote;
            lblDanhGia.Text        = danhGiaChinh;
            lblDanhGiaChiTiet.Text = danhGiaChiTiet;
            string idAvar = Data.Instance.loadImageAvarFromID(id);

            if (idAvar != "")
            {
                picAnhDaiDien.Image = Picture.LoadImage_by_ID(idAvar);
            }
            switch (link_image.Count)
            {
            case 0:
                this.Size = new Size(1231, 237);
                break;

            case 1:
                pic1.Visible = true;
                pic1.Image   = Picture.LoadImage_by_ID(link_image[0]);
                break;

            case 2:
                pic1.Visible = true;
                pic1.Image   = Picture.LoadImage_by_ID(link_image[0]);
                pic2.Visible = true;
                pic2.Image   = Picture.LoadImage_by_ID(link_image[1]);
                break;

            case 3:
                pic1.Visible = true;
                pic1.Image   = Picture.LoadImage_by_ID(link_image[0]);
                pic2.Visible = true;
                pic2.Image   = Picture.LoadImage_by_ID(link_image[1]);
                pic3.Visible = true;
                pic3.Image   = Picture.LoadImage_by_ID(link_image[2]);
                break;

            case 4:
                pic1.Visible = true;
                pic1.Image   = Picture.LoadImage_by_ID(link_image[0]);
                pic2.Visible = true;
                pic2.Image   = Picture.LoadImage_by_ID(link_image[1]);
                pic3.Visible = true;
                pic3.Image   = Picture.LoadImage_by_ID(link_image[2]);
                pic4.Visible = true;
                pic4.Image   = Picture.LoadImage_by_ID(link_image[3]);
                break;

            case 5:
                pic1.Visible = true;
                pic1.Image   = Picture.LoadImage_by_ID(link_image[0]);
                pic2.Visible = true;
                pic2.Image   = Picture.LoadImage_by_ID(link_image[1]);
                pic3.Visible = true;
                pic3.Image   = Picture.LoadImage_by_ID(link_image[2]);
                pic4.Visible = true;
                pic4.Image   = Picture.LoadImage_by_ID(link_image[3]);
                pic5.Visible = true;
                pic5.Image   = Picture.LoadImage_by_ID(link_image[4]);
                break;
            }
            //hinh de sau
        }