public bool deleteActiveNhaSX(string mnsx) { try { nhasx n = db.nhasxes.Single(m => m.mansx == mnsx); n.Active = false; db.SubmitChanges(); return(true); } catch { return(false); } }
public bool updateNhaSX(string mnsx, string ten, string diachi, string hinh) { try { nhasx n = db.nhasxes.Single(m => m.mansx == mnsx); n.ten = ten; n.diachi = diachi; n.hinh = hinh; db.SubmitChanges(); return(true); } catch { return(false); } }
public bool insertNhaSX(string mnsx, string ten, string diachi, string hinh) { try { nhasx n = new nhasx(); n.mansx = mnsx; n.ten = ten; n.diachi = diachi; n.hinh = hinh; n.Active = true; db.nhasxes.InsertOnSubmit(n); db.SubmitChanges(); return(true); } catch { return(false); } }