Beispiel #1
0
 public IHttpActionResult DenyByManager(ViewModel.tblQuestionAndAnswer QuestionAndAnswer)
 {
     try
     {
         bool ret = BisQuestionAndAnswer.DenyByManager(QuestionAndAnswer);
         if (ret)
         {
             return(Ok(ret));
         }
         else
         {
             return(NotFound());
         }
     }
     catch
     {
         return(NotFound());
     }
 }
Beispiel #2
0
 public IHttpActionResult AddQuestionAndAnswer(ViewModel.tblQuestionAndAnswer QuestionAndAnswer)
 {
     try
     {
         QuestionAndAnswer.IDPersonel = AuUser.ReturnIDUser(QuestionAndAnswer.IDLogUser);
         QuestionAndAnswer.IDLogUser  = null;
         bool ret = BisQuestionAndAnswer.AddQuestionAndAnswer(QuestionAndAnswer);
         if (ret)
         {
             return(Ok(ret));
         }
         else
         {
             return(NotFound());
         }
     }
     catch
     {
         return(NotFound());
     }
 }
Beispiel #3
0
 public IHttpActionResult DeleteQuestionAndAnswer(object obj)
 {
     try
     {
         JObject JsonObject = JObject.Parse(obj.ToString());
         ViewModel.tblQuestionAndAnswer DelQuestionAndAnswer = JsonObject.ToObject <ViewModel.tblQuestionAndAnswer>();
         bool ret = BisQuestionAndAnswer.DeleteQuestionAndAnswer(DelQuestionAndAnswer);
         if (ret)
         {
             return(Ok(ret));
         }
         else
         {
             return(NotFound());
         }
     }
     catch
     {
         return(NotFound());
     }
 }
Beispiel #4
0
 public bool DeleteQuestionAndAnswer(ViewModel.tblQuestionAndAnswer QuestionAndAnswer)
 {
     return(sqlHelper.RunProcedure("sp_tblQuestionAndAnswer_DeleteRow", QuestionAndAnswer) > 0);
 }
Beispiel #5
0
 public bool DenyByManager(ViewModel.tblQuestionAndAnswer QuestionAndAnswer)
 {
     return(sqlHelper.RunProcedure("sp_tblQuestionAndAnswer_DenyByManager", QuestionAndAnswer) > 0);
 }
Beispiel #6
0
 public bool UpdateQuestionAndAnswer(ViewModel.tblQuestionAndAnswer QuestionAndAnswer)
 {
     return(sqlHelper.RunProcedure("sp_tblQuestionAndAnswer_Update", QuestionAndAnswer) > 0);
 }
Beispiel #7
0
 public bool AddQuestionAndAnswer(ViewModel.tblQuestionAndAnswer QuestionAndAnswer)
 {
     return(sqlHelper.RunProcedure("sp_tblQuestionAndAnswer_Insert", QuestionAndAnswer) > 0);
 }