Example #1
0
 public bool AddQuestioner(Questioner org)
 {
     try
     {
         entities.Questioners.Add(org);
         entities.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Example #2
0
 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);
     }
 }
Example #3
0
        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);
            }
        }