Beispiel #1
0
        public void ChinhSuaSL(string tensp, int SL)
        {
            DSGH dh = db.DSGHs.FirstOrDefault(s => s.TenSP.Equals(tensp));

            dh.Số_Lượng = SL;
            db.SubmitChanges();
        }
Beispiel #2
0
        public void XoaSPGH(string tensp)
        {
            DSGH e = db.DSGHs.FirstOrDefault(p => p.TenSP.Equals(tensp));

            db.DSGHs.DeleteOnSubmit(e);
            db.SubmitChanges();
        }
Beispiel #3
0
        public void ThemSLsanpham(string tensp)
        {
            DSGH dh = db.DSGHs.FirstOrDefault(s => s.TenSP.Equals(tensp));

            dh.Số_Lượng = (dh.Số_Lượng + 1);
            db.SubmitChanges();
        }
        public void ThemVaoDSGH(string tensp, int giasanpham, int soluong)
        {
            DSGH DS = new DSGH();

            DS.TenSP    = tensp;
            DS.GiaBan   = giasanpham;
            DS.Số_Lượng = soluong;
            da.ThemSPVB(DS);
        }
Beispiel #5
0
 public void ThemSPVB(DSGH DS)
 {
     db.DSGHs.InsertOnSubmit(DS);
     db.SubmitChanges();
 }