internal void DeleteLoaiSP(string id)
        {
            LoaiSP loai = db.LoaiSPs.Find(id);

            db.LoaiSPs.Remove(loai);
            db.SaveChanges();
        }
 internal string ThemLoaiSP(LoaiSP loai)
 {
     loai.MaLoai = TaoMa();
     db.LoaiSPs.Add(loai);
     db.SaveChanges();
     return(loai.MaLoai);
 }
        internal void EditLoaiSP(LoaiSP loai)
        {
            LoaiSP lsp = db.LoaiSPs.Find(loai.MaLoai);

            lsp.TenLoai         = loai.TenLoai;
            db.Entry(lsp).State = EntityState.Modified;
            db.SaveChanges();
        }