Пример #1
0
        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;
        }
Пример #2
0
        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;
        }
Пример #3
0
 public void capnhapTongTien(int soluong)
 {
     TongTien             = dongia * soluong;
     this.lbTongTien.Text = ChucNang.convertGia(TongTien);
 }