Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. public void UpdateTextAnswerText(questions question, int textAnswerId, string newText)
  2. {
  3. List<text_answers> textAnswers = GetTextAnswers(question);
  4. using (surveyDBcontext = new surveysdbEntities1())
  5. {
  6. text_answers textAnswer = textAnswers.Where(x => x.Id == textAnswerId).FirstOrDefault();
  7. textAnswer.Answer = newText;
  8. surveyDBcontext.SaveChanges();
  9. }
  10. }
  11. public void UpdateUserPassword(string userName, string newPassword)
  12. {
  13. users user = GetUserByName(userName);
  14. using (surveyDBcontext = new surveysdbEntities1())
  15. {
  16. user.User_password = newPassword;
  17. surveyDBcontext.SaveChanges();
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement