Пример #1
0
 public int AddEmployeeSurveyView(V_EmployeeSurvey employeeSurveyView)
 {
     using (EmployeeSurveysMasterBll employeemaster = new EmployeeSurveysMasterBll())
     {
         return(employeemaster.AddEmployeeSurveysView(employeeSurveyView));
     }
 }
Пример #2
0
 public int UpdateEmpSurveys(T_OA_REQUIREMASTER obj)
 {
     using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll())
     {
         return(empSurveysCreateBll.UpdateMaster(obj));
     }
 }
Пример #3
0
 public int AddEmployeeSurveyView(V_EmployeeSurvey employeeSurveyView)
 {
     using (EmployeeSurveysMasterBll employeemaster = new EmployeeSurveysMasterBll())
     {
         return employeemaster.AddEmployeeSurveysView(employeeSurveyView);
     }
 }
Пример #4
0
 public bool AddEmployeeSurveyMaster(T_OA_REQUIREMASTER addId)
 {
     using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll())
     {
         return(masterBll.Add(addId));
     }
 }
Пример #5
0
 public IQueryable <T_OA_REQUIREMASTER> GetInfroByTitle(string title)
 {
     using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll())
     {
         return(masterBll.GetInfoListByTitle(title));
     }
 }
Пример #6
0
 public bool DeleteEmpSurveys(List <T_OA_REQUIREMASTER> objList)
 {
     using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll())
     {
         using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll())
         {
             using (EmployeeSurveySubjectBll empSurveysSubjectBll = new EmployeeSurveySubjectBll())
             {
                 empSurveysCreateBll.BeginTransaction();
                 try
                 {
                     bool isSccess = true;
                     foreach (T_OA_REQUIREMASTER obj in objList)
                     {
                         if (empSurveysCreateBll.Delete(obj.REQUIREMASTERID))
                         { //删除题目和答案
                             IQueryable <T_OA_REQUIREDETAIL2> objDetail2List = empSurveysSubjectBll.GetInfoListByMasterId(obj.REQUIREMASTERID);
                             if (objDetail2List != null)
                             {
                                 foreach (T_OA_REQUIREDETAIL2 objDetail2 in objDetail2List)
                                 {
                                     IQueryable <T_OA_REQUIREDETAIL> detailList = empSurveysAnswerBll.GetInfoListByMasterId(objDetail2.REQUIREMASTERID, objDetail2.SUBJECTID);
                                     if (detailList != null)
                                     {
                                         foreach (T_OA_REQUIREDETAIL objDetail in detailList)
                                         {
                                             if (empSurveysAnswerBll.DeleteEmployeeSurveysAnswer(objDetail.REQUIREDETAILID))
                                             {
                                             }
                                             else
                                             {
                                                 return(false);
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                     if (isSccess)
                     {
                         empSurveysCreateBll.CommitTransaction();
                         return(true);
                     }
                     else
                     {
                         empSurveysCreateBll.RollbackTransaction();
                         return(false);
                     }
                 }
                 catch
                 {
                     empSurveysCreateBll.RollbackTransaction();
                     return(false);
                 }
             }
         }
     }
 }
Пример #7
0
        public bool AddEmployeeSurveyMaster(T_OA_REQUIREMASTER addId)
        {
            using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll())
            {
                return masterBll.Add(addId);

            }
        }
Пример #8
0
        public IQueryable<T_OA_REQUIREMASTER> GetInfroByTitle(string title)
        {
            using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll())
            {
                return masterBll.GetInfoListByTitle(title);

            }
        }
Пример #9
0
 public bool AddEmployeeSurvey(T_OA_REQUIREMASTER key)
 {
     using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll())
     {
         bool sucess = masterBll.Add(key);
         if (sucess == false)
         {
             return(false);
         }
         return(true);
     }
 }
Пример #10
0
 public int AddEmpSurveys(T_OA_REQUIREMASTER obj)
 {
     using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll())
     {
         bool sucess = empSurveysCreateBll.Add(obj);
         if (sucess == false)
         {
             return(-1);
         }
         return(1);
     }
 }
Пример #11
0
 public List <T_OA_REQUIREMASTER> GetInfoListByOptFlag(int pageIndex, int pageSize, string sort, string filterString, object[] paras, ref int pageCount, string checkState)
 {
     using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll())
     {
         IQueryable <T_OA_REQUIREMASTER> calendarList = empSurveysCreateBll.GetInfoListByOptFlag(checkState);
         if (calendarList == null)
         {
             return(null);
         }
         else
         {
             return(calendarList.ToList());
         }
     }
 }
Пример #12
0
 public T_OA_REQUIREMASTER GetInfoById(string masterID)
 {
     using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll())
     {
         IQueryable <T_OA_REQUIREMASTER> infoList = empSurveysCreateBll.GetInfoListById(masterID);
         if (infoList == null)
         {
             return(null);
         }
         else
         {
             return(infoList.ToList()[0]);
         }
     }
 }
 public T_OA_REQUIREMASTER GetInfoById(string masterID)
 {
     using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll())
     {
         IQueryable<T_OA_REQUIREMASTER> infoList = empSurveysCreateBll.GetInfoListById(masterID);
         if (infoList == null)
         {
             return null;
         }
         else
         {
             return infoList.ToList()[0];
         }
     }
 }
 public List<T_OA_REQUIREMASTER> GetInfoListByOptFlag(int pageIndex, int pageSize, string sort, string filterString, object[] paras, ref int pageCount, string checkState)
 {
     using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll())
     {
         IQueryable<T_OA_REQUIREMASTER> calendarList = empSurveysCreateBll.GetInfoListByOptFlag(checkState);
         if (calendarList == null)
         {
             return null;
         }
         else
         {
             return calendarList.ToList();
         }
     }
 }
        public V_EmployeeSurveySubject GetInfoByTitle(string masterTitle)
        {
            V_EmployeeSurveySubject listAll = new V_EmployeeSurveySubject();
              string masterId=listAll.Master.REQUIREMASTERID;
            using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll())
            {
                IQueryable<T_OA_REQUIREMASTER> masterList = masterBll.GetInfoListByTitle(masterTitle);
                if (masterList == null)
                {
                    return null;
                }
                else
                {
                   listAll.Master=masterList.ToList()[0];
                  
                }
            }
            using (EmployeeSurveySubjectBll questionBll = new EmployeeSurveySubjectBll())
            {
                IQueryable<T_OA_REQUIREDETAIL2> questionList = questionBll.GetInfoListByMasterId(masterId);
                if (questionList == null)
                {
                    return null;
                }
                else
                {
                    listAll.Question = questionList.ToList()[0];
                }
            }
                 using(EmployeeSurveysAnswerBll answerBll=new EmployeeSurveysAnswerBll())
              {
               IQueryable<T_OA_REQUIREDETAIL> answerList =answerBll.GetInfoByMasterId(masterId);
                if(answerList==null)
                {
                  return null;
                }
                else
                {
                   listAll.Answer=answerList.ToList()[0];
                }
            }
            return listAll;
 
            }
Пример #16
0
        public V_EmployeeSurveySubject GetInfoByTitle(string masterTitle)
        {
            V_EmployeeSurveySubject listAll = new V_EmployeeSurveySubject();
            string masterId = listAll.Master.REQUIREMASTERID;

            using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll())
            {
                IQueryable <T_OA_REQUIREMASTER> masterList = masterBll.GetInfoListByTitle(masterTitle);
                if (masterList == null)
                {
                    return(null);
                }
                else
                {
                    listAll.Master = masterList.ToList()[0];
                }
            }
            using (EmployeeSurveySubjectBll questionBll = new EmployeeSurveySubjectBll())
            {
                IQueryable <T_OA_REQUIREDETAIL2> questionList = questionBll.GetInfoListByMasterId(masterId);
                if (questionList == null)
                {
                    return(null);
                }
                else
                {
                    listAll.Question = questionList.ToList()[0];
                }
            }
            using (EmployeeSurveysAnswerBll answerBll = new EmployeeSurveysAnswerBll())
            {
                IQueryable <T_OA_REQUIREDETAIL> answerList = answerBll.GetInfoByMasterId(masterId);
                if (answerList == null)
                {
                    return(null);
                }
                else
                {
                    listAll.Answer = answerList.ToList()[0];
                }
            }
            return(listAll);
        }
 public int AddEmpSurveys(T_OA_REQUIREMASTER obj)
 {
     using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll())
     {
         bool sucess = empSurveysCreateBll.Add(obj);
         if (sucess == false)
         {
             return -1;
         }
         return 1;
     }
 }
 public int UpdateEmpSurveys(T_OA_REQUIREMASTER obj)
 {
     using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll())
     {
         return empSurveysCreateBll.UpdateMaster(obj);
     }
 }
        public bool DeleteEmpSurveys(List<T_OA_REQUIREMASTER> objList)
        {
            using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll())
            {
                using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll())
                {
                    using (EmployeeSurveySubjectBll empSurveysSubjectBll = new EmployeeSurveySubjectBll())
                    {
                        empSurveysCreateBll.BeginTransaction();
                        try
                        {
                            bool isSccess = true;
                            foreach (T_OA_REQUIREMASTER obj in objList)
                            {
                                if (empSurveysCreateBll.Delete(obj.REQUIREMASTERID))
                                { //删除题目和答案
                                    IQueryable<T_OA_REQUIREDETAIL2> objDetail2List = empSurveysSubjectBll.GetInfoListByMasterId(obj.REQUIREMASTERID);
                                    if (objDetail2List != null)
                                    {
                                        foreach (T_OA_REQUIREDETAIL2 objDetail2 in objDetail2List)
                                        {
                                            IQueryable<T_OA_REQUIREDETAIL> detailList = empSurveysAnswerBll.GetInfoListByMasterId(objDetail2.REQUIREMASTERID, objDetail2.SUBJECTID);
                                            if (detailList != null)
                                            {
                                                foreach (T_OA_REQUIREDETAIL objDetail in detailList)
                                                {
                                                    if (empSurveysAnswerBll.DeleteEmployeeSurveysAnswer(objDetail.REQUIREDETAILID))
                                                    {

                                                    }
                                                    else
                                                    {
                                                        return false;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            if (isSccess)
                            {
                                empSurveysCreateBll.CommitTransaction();
                                return true;
                            }
                            else
                            {
                                empSurveysCreateBll.RollbackTransaction();
                                return false;
                            }
                        }
                        catch
                        {
                            empSurveysCreateBll.RollbackTransaction();
                            return false;
                        }
                    }
                }
            }
        }
        public bool AddEmployeeSurvey(T_OA_REQUIREMASTER key)
        {
            using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll())
            {
                bool sucess = masterBll.Add(key);
                if (sucess == false)
                {
                    return false;
                }
                return true;
 
            }
        }