Exemple #1
0
 public int DeleteEmployeeSurveySubjectView(V_EmployeeSurveySubject subjectInfo)
 {
     try
     {
         EmployeeSurveySubjectBll subjectBll = new EmployeeSurveySubjectBll();
         EmployeeSurveysAnswerBll answerBll  = new EmployeeSurveysAnswerBll();
         foreach (T_OA_REQUIREDETAIL anserInfo in subjectInfo.AnswerList)
         {
             if (!answerBll.DeleteEmployeeSurveysAnswer(anserInfo.REQUIREDETAILID))
             {
                 return(-1);
             }
         }
         if (!subjectBll.DeleteEmployeeSurveySubject(subjectInfo.SubjectInfo.REQUIREDETAIL2ID))
         {
             return(-1);
         }
         return(1);
     }
     catch (Exception ex)
     {
         Tracer.Debug("员工调查EmployeeSurveySubjectViewBll-DeleteEmployeeSurveySubjectView" + System.DateTime.Now.ToString() + " " + ex.ToString());
         return(-1);
     }
 }
Exemple #2
0
 public int UpdateEmployeeSurveySubjectView(V_EmployeeSurveySubject subjectInfo)
 {
     try
     {
         EmployeeSurveySubjectBll subjectBll = new EmployeeSurveySubjectBll();
         EmployeeSurveysAnswerBll answerBll  = new EmployeeSurveysAnswerBll();
         if (subjectBll.UpdateEmployeeSurveySubject(subjectInfo.SubjectInfo) == -1)
         {
             return(-1);
         }
         return(1);
     }
     catch (Exception ex)
     {
         Tracer.Debug("员工调查EmployeeSurveySubjectViewBll-UpdateEmployeeSurveySubjectView" + System.DateTime.Now.ToString() + " " + ex.ToString());
         return(-1);
     }
 }
Exemple #3
0
        /// <summary>
        /// 更新答案
        /// </summary>
        /// <param name="subjectInfo"></param>
        /// <param name="answerList"></param>
        /// <returns></returns>
        private int UpdataAnswerList(T_OA_REQUIREDETAIL2 subjectInfo, List <T_OA_REQUIREDETAIL> lstAns)
        {
            try
            {
                EmployeeSurveysAnswerBll answerBll = new EmployeeSurveysAnswerBll();

                for (int j = 0; j < lstAns.Count; j++)
                {
                    if (answerBll.UpdateEmployeeSurveysAnswer(lstAns.ToList()[j]) == -1)
                    {
                        return(-1);
                    }
                }
                return(1);
            }
            catch (Exception ex)
            {
                Tracer.Debug("调查方案EmployeeSurveyViewBll-UpdataAnswerList" + System.DateTime.Now.ToString() + " " + ex.ToString());
                return(-1);
            }
        }