public bool AddWalktrough(Walktrough org) { try { entities.Walktroughs.Add(org); entities.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool DeleteWalktrough(int mCustID) { try { Walktrough data = entities.Walktroughs.Where(m => m.WalktroughID == mCustID).FirstOrDefault(); entities.Walktroughs.Remove(data); entities.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool UpdateWalktrough(Walktrough org) { try { Walktrough data = entities.Walktroughs.Where(m => m.WalktroughID == org.WalktroughID).FirstOrDefault(); data.ActivityID = org.ActivityID; data.PreliminaryID = org.PreliminaryID; data.Date_Start = org.Date_Start; data.Date_End = org.Date_End; data.Remarks = org.Remarks; data.Status = org.Status; entities.SaveChanges(); return(true); } catch (Exception) { return(false); } }