public void setValue(string masp) { SanPham_BLL_DAL qlsp = new SanPham_BLL_DAL(); QL_SanPham sp = qlsp.laySP(masp); lbTen.Text = sp.TenSanPham; lbGia.Text = ChucNang.convertGia((int)sp.Gia); lbTongTien.Text = ChucNang.convertGia((int)sp.Gia); soluong = (int)btnTangGiam.Value; dongia = (int)sp.Gia; TongTien = dongia * soluong; }
public void setValueSP(int gia, string path, string ten) { lbgia.Text = ChucNang.convertGia(gia); try { this.pictureBox1.Image = Image.FromFile(path); } catch { this.pictureBox1.Image = Image.FromFile("../../img/img_sanpham/" + "sandwich.jpg"); } pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; pnLine.BackgroundImage = Image.FromFile(path); pnLine.Click += pnLine_Click; lbTenSanPham.Text = ten; }
public void capnhapTongTien(int soluong) { TongTien = dongia * soluong; this.lbTongTien.Text = ChucNang.convertGia(TongTien); }