public IActionResult GetDisLikersByQuestionAnswerId(long TutorQuestionAnswerId = 0) { QAResponse <List <TQuestionAnswerDisliker> > response = new QAResponse <List <TQuestionAnswerDisliker> >(); response = TutorQuestionDB.GetDisLikersByQuestionAnswerId(TutorQuestionAnswerId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(response)); }
public IActionResult GetTutorQuestionAnswers(long UID = 0, long TQuestionId = 0) { QAResponse <List <TQuestionAnswer> > response = new QAResponse <List <TQuestionAnswer> >(); response = TutorQuestionDB.GetAllTutorQuestionAnswers(UID, TQuestionId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(response)); }
public IActionResult GetCommentsByQuestionId(long TQuestionId = 0) { QAResponse <List <TQuestionComment> > response = new QAResponse <List <TQuestionComment> >(); response = TutorQuestionDB.GetCommentsByQuestionId(TQuestionId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(response)); }
public IActionResult GetAllTags() { QAResponse <IList <string> > response = new QAResponse <IList <string> >(); response.Content = TutorQuestionDB.GetAllTagsUnique(GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(response)); }
public IActionResult Vote(long TQuestionAnswerId, long UID, int ObjEntityId, int UpDownVote) { int x = TutorQuestionDB.Vote(TQuestionAnswerId, UID, ObjEntityId, UpDownVote, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); if (x == 1) { Notify(UpDownVote == 1 ? "Like" : "Dislike"); } return(Json(x)); }
public int CloseQuestion(long TQuestionId, long tutorID) { int x = TutorQuestionDB.CloseQuestion(TQuestionId, tutorID, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); if (x == 1) { Notify("Closed", "" + TQuestionId); } return(x); }
public IActionResult SubmitTutorQuestionAnswerComment(long TQuestionAnswerId, long UID, long ObjEntityId, string Description) { TQuestionAnswerComment newTutorQuestionAnswerComment = new TQuestionAnswerComment(); newTutorQuestionAnswerComment = TutorQuestionDB.AddTutorQuestionAnswerComment(TQuestionAnswerId, UID, ObjEntityId, Description, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); if (newTutorQuestionAnswerComment != null) { Notify("CommentedAnswer", "" + TQuestionAnswerId); } return(Json(newTutorQuestionAnswerComment)); }
public IActionResult SubmitTutorQuestionAnswer(long TQuestionId, string description, long UID, long ObjEntityId) { int x = TutorQuestionDB.SubmitTutorQuestionAnswer(TQuestionId, description, UID, ObjEntityId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); if (x > 0) { Notify("SubmitedAnswer", "" + TQuestionId); } return(Json(x)); }
public IActionResult SubmitTutorQuestion(string title, string description, long tutorId, string tagNames) { DataTable dtTags = null; dtTags = JsonConvert.DeserializeAnonymousType <DataTable>(tagNames, dtTags); int x = TutorQuestionDB.SubmitTutorQuestion(title, description, tutorId, dtTags, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); if (x > 0) { Notify("AddedQuestion", "" + x); } return(Json(x)); }
public IActionResult Follow(long TQuestionId, long UID, int ObjEntityId) { int x = TutorQuestionDB.Follow(TQuestionId, UID, ObjEntityId, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); if (x == 1) { Notify("Follow"); } else if (x == -1) { Notify("Unfollow"); } return(Json(x)); }
public IActionResult GetTutorQuestions(int pageNumber = 1, int pageSize = 5, long UID = 0, long tutorId = 0, int selectType = 1) { QAResponse <List <TutorQuestion> > response = TutorQuestionDB.GetTutorQuestions(pageNumber, pageSize, UID, tutorId, selectType, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(response)); }
public IActionResult GetAllQuestions(int pageNumber = 1, int pageSize = 5, long UID = 0, string tag = "") { QAResponse <List <TutorQuestion> > response = TutorQuestionDB.GetAllTutorQuestions(pageNumber, pageSize, UID, tag, GetConfiguration().GetConnectionString(DEFAULT_CONNECTION)); return(Json(response)); }