public IQueryable<T_OA_REQUIREDETAIL> GetEmployeeAnswer(string senId, decimal key) { using (EmployeeSurveysAnswerBll answerBll = new EmployeeSurveysAnswerBll()) { return answerBll.GetInfoListByMasterId(senId, key); } }
public int AddEmpSurveysAnswer(T_OA_REQUIREDETAIL obj) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { return(empSurveysAnswerBll.Add(obj) ? 1 : 0); } }
public IQueryable <T_OA_REQUIREDETAIL> GetEmployeeAnswer(string senId, decimal key) { using (EmployeeSurveysAnswerBll answerBll = new EmployeeSurveysAnswerBll()) { return(answerBll.GetInfoListByMasterId(senId, key)); } }
public int AddEmployeeSurveyAnswer(T_OA_REQUIREDETAIL addId) { using (EmployeeSurveysAnswerBll answerBll = new EmployeeSurveysAnswerBll()) { return(answerBll.AddAnswer(addId)); } }
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 int AddEmployeeSurveyAnswer(T_OA_REQUIREDETAIL addId) { using (EmployeeSurveysAnswerBll answerBll = new EmployeeSurveysAnswerBll()) { return answerBll.AddAnswer(addId); } }
public int AddEmpSurveysAnswerList(List <T_OA_REQUIREDETAIL> objList) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { //事物 int n = 0; foreach (T_OA_REQUIREDETAIL obj in objList) { n += empSurveysAnswerBll.Add(obj) ? 1 : 0; } return(n); } }
public List <T_OA_REQUIREDETAIL> GetEmpSurveysAnswerList(string requireId, decimal subjectId) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { IQueryable <T_OA_REQUIREDETAIL> detailList = empSurveysAnswerBll.GetInfoListByMasterId(requireId, subjectId); if (detailList != null) { return(detailList.ToList()); } else { return(null); } } }
public int DelEmpSurveysAnswerList(List <T_OA_REQUIREDETAIL> objList) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { //事物 bool sucess = true; foreach (T_OA_REQUIREDETAIL obj in objList) { sucess = empSurveysAnswerBll.DeleteEmployeeSurveysAnswer(obj.REQUIREDETAILID); } if (sucess == false) { return(-1); } return(1); } }
public int UpdateEmpSurveysAnswerList(List <T_OA_REQUIREDETAIL> objList) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { //事物 int nRet = 0; foreach (T_OA_REQUIREDETAIL obj in objList) { nRet = empSurveysAnswerBll.Update(obj); } if (nRet == -1)//没有修改也成功 { return(-1); } return(1); } }
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 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 DelEmpSurveysSubjectList(List <T_OA_REQUIREDETAIL2> objList) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { using (EmployeeSurveySubjectBll empSurveysSubjectBll = new EmployeeSurveySubjectBll()) { //事务 bool sucess = true; foreach (T_OA_REQUIREDETAIL2 obj in objList) { if (empSurveysSubjectBll.DeleteEmployeeSurveySubject(obj.REQUIREDETAIL2ID)) { IQueryable <T_OA_REQUIREDETAIL> detailList = empSurveysAnswerBll.GetInfoListByMasterId(obj.REQUIREMASTERID, obj.SUBJECTID); if (detailList != null) { foreach (T_OA_REQUIREDETAIL objDetail in detailList) { if (empSurveysAnswerBll.DeleteEmployeeSurveysAnswer(objDetail.REQUIREDETAILID)) { } else { sucess = false; break; } } } if (sucess == false) { return(-1); } } else { return(-1); } } return(1); } } }
public int UpdateEmpSurveysAnswerList(List<T_OA_REQUIREDETAIL> objList) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { //事物 int nRet = 0; foreach (T_OA_REQUIREDETAIL obj in objList) { nRet = empSurveysAnswerBll.Update(obj); } if (nRet == -1)//没有修改也成功 { return -1; } return 1; } }
public int DelEmpSurveysAnswerList(List<T_OA_REQUIREDETAIL> objList) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { //事物 bool sucess = true; foreach (T_OA_REQUIREDETAIL obj in objList) { sucess = empSurveysAnswerBll.DeleteEmployeeSurveysAnswer(obj.REQUIREDETAILID); } if (sucess == false) { return -1; } return 1; } }
public int AddEmpSurveysAnswerList(List<T_OA_REQUIREDETAIL> objList) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { //事物 int n = 0; foreach (T_OA_REQUIREDETAIL obj in objList) { n += empSurveysAnswerBll.Add(obj) ? 1 : 0; } return n; } }
public List<T_OA_REQUIREDETAIL> GetEmpSurveysAnswerList(string requireId, decimal subjectId) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { IQueryable<T_OA_REQUIREDETAIL> detailList = empSurveysAnswerBll.GetInfoListByMasterId(requireId, subjectId); if (detailList != null) { return detailList.ToList(); } else { return null; } } }
public int AddEmpSurveysAnswer(T_OA_REQUIREDETAIL obj) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { return empSurveysAnswerBll.Add(obj) ? 1 : 0; } }
public int DelEmpSurveysSubjectList(List<T_OA_REQUIREDETAIL2> objList) { using (EmployeeSurveysAnswerBll empSurveysAnswerBll = new EmployeeSurveysAnswerBll()) { using (EmployeeSurveySubjectBll empSurveysSubjectBll = new EmployeeSurveySubjectBll()) { //事务 bool sucess = true; foreach (T_OA_REQUIREDETAIL2 obj in objList) { if (empSurveysSubjectBll.DeleteEmployeeSurveySubject(obj.REQUIREDETAIL2ID)) { IQueryable<T_OA_REQUIREDETAIL> detailList = empSurveysAnswerBll.GetInfoListByMasterId(obj.REQUIREMASTERID, obj.SUBJECTID); if (detailList != null) { foreach (T_OA_REQUIREDETAIL objDetail in detailList) { if (empSurveysAnswerBll.DeleteEmployeeSurveysAnswer(objDetail.REQUIREDETAILID)) { } else { sucess = false; break; } } } if (sucess == false) { return -1; } } else { return -1; } } return 1; } } }
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; } } } } }