/// <summary> /// 弹出选择调查方案的页面 /// </summary> private void SelectEmployeesSurvey() { //scheme = new SelectScheme("requireMaster"); //EntityBrowser browser = new EntityBrowser(scheme); //browser.MinHeight = 400; //browser.MinWidth = 600; //browser.FormType = FormTypes.Browse; //browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); //browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true); SelectSchemeCW cw = new SelectSchemeCW(); cw.SelectedClick += (obj, ev) => { if (cw.SelectedOneObj != null) { T_OA_REQUIREMASTER master = cw.SelectedOneObj; appView.MasterId = master.REQUIREMASTERID; appView.requireEntity.APPTITLE = master.REQUIRETITLE; appView.requireEntity.CONTENT = master.CONTENT; appView.requireEntity.T_OA_REQUIREMASTER = new T_OA_REQUIREMASTER(); appView.requireEntity.T_OA_REQUIREMASTER = master; } }; cw.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }
public int UpdateEmpSurveys(T_OA_REQUIREMASTER obj) { using (EmployeeSurveysMasterBll empSurveysCreateBll = new EmployeeSurveysMasterBll()) { return(empSurveysCreateBll.UpdateMaster(obj)); } }
public int Upd_ESurvey(T_OA_REQUIREMASTER survey, List <V_EmployeeSurveySubject> addLst, List <V_EmployeeSurveySubject> updLst) { using (EmployeeSurveyViewBll employeeSurveyViewBll = new EmployeeSurveyViewBll()) { return(employeeSurveyViewBll.Upd_ESurvey(survey, addLst, updLst)); } }
public bool AddEmployeeSurveyMaster(T_OA_REQUIREMASTER addId) { using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll()) { return(masterBll.Add(addId)); } }
public EmployeeSubmissions_3(T_OA_REQUIREMASTER obj, bool bView, FormTypes ftype) { InitializeComponent(); this.Loaded += new RoutedEventHandler(EmployeeSubmissions_3_Loaded); IsView = bView; TmpMaster = obj; type = ftype; }
public bool AddEmployeeSurveyMaster(T_OA_REQUIREMASTER addId) { using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll()) { return masterBll.Add(addId); } }
public EmployeeSubmissions_3(T_OA_REQUIREMASTER obj, bool bView, FormTypes ftype) { InitializeComponent(); this.Loaded += new RoutedEventHandler(EmployeeSubmissions_3_Loaded); IsView = bView; TmpMaster = obj; type = ftype; }
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 bool AddEmployeeSurvey(T_OA_REQUIREMASTER key) { using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll()) { bool sucess = masterBll.Add(key); if (sucess == false) { return(false); } return(true); } }
//更新方案 新 public int Upd_ESurvey(T_OA_REQUIREMASTER survey, List <V_EmployeeSurveySubject> addLst, List <V_EmployeeSurveySubject> updLst) { try { //masterBll.BeginTransaction(); //更新方案 EmployeeSurveyViewDal esvDal = new EmployeeSurveyViewDal(); if (esvDal.UpdateRequireMaster(survey) == -1) { masterBll.RollbackTransaction(); return(-1); } foreach (V_EmployeeSurveySubject i in addLst) { //添加 题目 答案 if (subjectViewBll.AddEmployeeSurveySubjectView(i) < 1) { masterBll.RollbackTransaction(); return(-1); } } foreach (V_EmployeeSurveySubject i in updLst) { //更新题目 if (esvDal.UpdateSurveySubject(i.SubjectInfo) < 1) { masterBll.RollbackTransaction(); return(-1); } //更新答案 if (UpdataAnswerList(i.SubjectInfo, i.AnswerList.ToList()) < 1) { masterBll.RollbackTransaction(); return(-1); } } masterBll.CommitTransaction(); return(1); } catch (Exception ex) { Tracer.Debug("调查方案EmployeeSurveyViewBll-Upd_ESurvey" + System.DateTime.Now.ToString() + " " + ex.ToString()); return(-1); } }
void EmployeeSurvey_upd_Loaded(object sender, RoutedEventArgs e) { _VM = new SmtOAPersonOfficeClient(); _VM.Upd_ESurveyCompleted += new EventHandler <Upd_ESurveyCompletedEventArgs>(Upd_ESurveyCompleted); _VM.DeleteEmployeeSurveySubjectViewCompleted += new EventHandler <DeleteEmployeeSurveySubjectViewCompletedEventArgs>(DeleteEmployeeSurveySubjectViewCompleted); T_OA_REQUIREMASTER s = _survey.RequireMaster; txtTitle.Text = s.REQUIRETITLE; txtContent.Text = s.CONTENT; _osub = _survey.SubjectViewList; dg.ItemsSource = _osub; dg.SelectedIndex = 0; if (types == FormTypes.Resubmit) //重新提交 { _survey.RequireMaster.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString(); //返回枚举 } RefreshUI(RefreshedTypes.AuditInfo); //提交审核 RefreshUI(RefreshedTypes.All); }
//--------------------------------------Add by Lezy #region 根据传回的XML,添加员工调查方案表 /// <summary> /// 根据传回的XML,添加员工调查方案表 /// </summary> /// <param name="master"></param> private static string EmployeeSurveyMasterAdd(IEnumerable<XElement> eGFunc) { try { if (eGFunc.Count() == 0) { return ""; } string strEmployeeID = string.Empty; string strOwnerID = string.Empty; string strOwnerPostID = string.Empty; string strOwnerDepartmentID = string.Empty; string strOwnerCompanyID = string.Empty; foreach (var q in eGFunc) { string strName = q.Attribute("Name").Value; switch (strName) { case "CREATEUSERID": strEmployeeID = q.Attribute("Value").Value; break; case "OWNERID": strOwnerID = q.Attribute("Value").Value; break; case "OWNERPOSTID": strOwnerPostID = q.Attribute("Value").Value; break; case "OWNERDEPARTMENTID": strOwnerDepartmentID = q.Attribute("Value").Value; break; case "OWNERCOMPANYID": strOwnerCompanyID = q.Attribute("Value").Value; break; } } string employeeid = strEmployeeID.Replace("{", "").Replace("}", ""); List<T_OA_REQUIREMASTER> lm = new List<T_OA_REQUIREMASTER>(); T_OA_REQUIREMASTER entity = new T_OA_REQUIREMASTER(); entity.REQUIREMASTERID = Guid.NewGuid().ToString(); entity.CREATEDATE = DateTime.Now; entity.OWNERID = strOwnerID; entity.OWNERPOSTID = strOwnerPostID; entity.OWNERDEPARTMENTID = strOwnerDepartmentID; entity.OWNERCOMPANYID = strOwnerCompanyID; entity.CREATEUSERID = strOwnerID; entity.CREATEPOSTID = strOwnerPostID; entity.CREATEDEPARTMENTID = strOwnerDepartmentID; entity.CREATECOMPANYID = strOwnerCompanyID; lm.Add(entity); SmtOAPersonOffice masterBll = new SmtOAPersonOffice(); if (masterBll.AddEmployeeSurvey(entity)) { return entity.REQUIREMASTERID; } else { string err = "Error"; return err; } } catch (Exception e) { string abc = "<OA>Message=[" + e.Message + "]" + "<OA>Source=[" + e.Source + "]<OA>StackTrace=[" + e.StackTrace + "]<OA>TargetSite=[" + e.TargetSite + "]"; Tracer.Debug(abc); return abc; } }
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 AddEmployeeSurvey(T_OA_REQUIREMASTER key) { using (EmployeeSurveysMasterBll masterBll = new EmployeeSurveysMasterBll()) { bool sucess = masterBll.Add(key); if (sucess == false) { return false; } return true; } }
public int Upd_ESurvey(T_OA_REQUIREMASTER survey,List<V_EmployeeSurveySubject> addLst,List<V_EmployeeSurveySubject> updLst) { using (EmployeeSurveyViewBll employeeSurveyViewBll = new EmployeeSurveyViewBll()) { return employeeSurveyViewBll.Upd_ESurvey(survey, addLst, updLst); } }