public bool InsertBulletinD(BulletinD bulletindData) { if (bulletindData == null) { return(false); } db.BulletinD.Add(bulletindData); db.SaveChanges(); return(true); }
public bool DeleteBulletinDBy(Guid Bulletindtsno) { BulletinD OldData = db.BulletinD.Find(Bulletindtsno); if (OldData == null) { return(false); } db.BulletinD.Remove(OldData); db.SaveChanges(); return(true); }
public bool UpdateBulletinDBy(BulletinD bulletindData) { BulletinD OldData = db.BulletinD.Find(bulletindData.Bulletindtsno); if (OldData == null) { return(false); } OldData.Name = bulletindData.Name; OldData.Sort = bulletindData.Sort; OldData.IsEnable = bulletindData.IsEnable; OldData.IsImage = bulletindData.IsImage; OldData.Url = bulletindData.Url; OldData.Alt = bulletindData.Alt; OldData.Href = bulletindData.Href; OldData.Modifydt = DateTime.Now; db.SaveChanges(); return(true); }
public ActionResult AddBulletinD(BulletinDViewModel AddData) { if (!ModelState.IsValid) { return(View(AddData)); } BulletinD Data = new BulletinD(); Data.Bulletindtsno = Guid.NewGuid(); Data.Bulletinsno = AddData.Bulletinsno; Data.Name = AddData.Name; Data.Sort = BulletinD_P.BulletinDmaxSort() + 1; Data.IsEnable = AddData.IsEnable; Data.IsImage = AddData.IsImage; Data.Url = AddData.Url; Data.Alt = AddData.Alt; Data.Href = AddData.Href; Data.Createdt = DateTime.Now; BulletinD_P.InsertBulletinD(Data); return(RedirectToAction("DetailSet")); }
public BulletinD BulletinDFillBy(Guid Bulletindtsno) { BulletinD SearchData = db.BulletinD.Find(Bulletindtsno); return(SearchData); }
public bool UpdateBulletinDBy(BulletinD bulletindData) { return(Repository_BulletinD_P.UpdateBulletinDBy(bulletindData)); }
public bool InsertBulletinD(BulletinD bulletindData) { return(Repository_BulletinD_P.InsertBulletinD(bulletindData)); }