public bool AddQuestioner(Questioner org) { try { entities.Questioners.Add(org); entities.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool DeleteQuestioner(int mCustID) { try { Questioner data = entities.Questioners.Where(m => m.QuestionerID == mCustID).FirstOrDefault(); entities.Questioners.Remove(data); entities.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool UpdateQuestioner(Questioner org) { try { Questioner data = entities.Questioners.Where(m => m.QuestionerID == org.QuestionerID).FirstOrDefault(); data.Type = org.Type; data.Name = org.Name; data.Value = org.Value; data.Status = org.Status; entities.SaveChanges(); return(true); } catch (Exception) { return(false); } }