public void DeletePOTW(int potwID) { POTW targetPOTW = context.POTWs.Find(potwID); if (targetPOTW != null) { context.POTWs.Remove(targetPOTW); } }
public void UpdatePOTW(POTW potw) { POTW targetPOTW = context.POTWs.Find(potw.POTWID); if (targetPOTW != null) { targetPOTW.StartDate = potw.StartDate; } }
public void SetPOTW(AppUser user) { POTW potw = new POTW(); potw.AppUser = user; potw.StartDate = DateTime.Today; potw.StartDate.AddHours(15); siteRepository.InsertPOTW(potw); unitOfWork.Save(); }
public void AddPOTW(POTW potw) { siteRepository.InsertPOTW(potw); unitOfWork.Save(); }
public void EditPOTW(POTW potw) { siteRepository.UpdatePOTW(potw); unitOfWork.Save(); }
public AddEditPOTWViewModel() { POTW = new POTW(); }
public void InsertPOTW(POTW potw) { context.POTWs.Add(potw); }