private void InitEvent() { SoaChannel = new SmtOACommonOfficeClient(); SoaChannel.DeleteAgentDataSetCompleted += new EventHandler <DeleteAgentDataSetCompletedEventArgs>(SoaChannel_DeleteAgentDataSetCompleted); SoaChannel.GetAgentDataSetListByIdCompleted += new EventHandler <GetAgentDataSetListByIdCompletedEventArgs>(SoaChannel_GetAgentDataSetListByIdCompleted); LoadData(); }
void EmployeeSurveyApp_add_Loaded(object sender, RoutedEventArgs e) { _osub = new ObservableCollection<SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); issuanceExtOrgObj = new List<ExtOrgObj>(); DocDistrbuteClient = new SmtOACommonOfficeClient(); _VM = new SmtOAPersonOfficeClient(); distributeLists = new ObservableCollection<SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); _VM.Add_EsurveyAppCompleted += new EventHandler<Add_EsurveyAppCompletedEventArgs>(Add_EsurveyAppCompleted); _VM.Upd_ESurveyAppCompleted += new EventHandler<Upd_ESurveyAppCompletedEventArgs>(Upd_ESurveyAppCompleted); //发布 DocDistrbuteClient.DocDistrbuteBatchAddCompleted += new EventHandler<DocDistrbuteBatchAddCompletedEventArgs>(DocDistrbuteClient_DocDistrbuteBatchAddCompleted); //cmbWay.SelectedIndex = 0;//匿名和实名发布 _survey = new T_OA_REQUIRE(); _survey.T_OA_REQUIREMASTER = new T_OA_REQUIREMASTER(); _survey.REQUIREID = Guid.NewGuid().ToString(); _survey.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString(); dpStartDate.Text = DateTime.Now.ToShortDateString(); dpEndDate.Text = DateTime.Now.AddMonths(3).ToShortDateString(); RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); SetSurvey(); //修改发布接口还没弄好 // DocDistrbuteClient.DocDistrbuteInfoUpdateCompleted += new EventHandler<DocDistrbuteInfoUpdateCompletedEventArgs>(DocDistrbuteInfoUpdateCompleted); }
void EmployeeSurveyApp_add_Loaded(object sender, RoutedEventArgs e) { _osub = new ObservableCollection <SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); issuanceExtOrgObj = new List <ExtOrgObj>(); DocDistrbuteClient = new SmtOACommonOfficeClient(); _VM = new SmtOAPersonOfficeClient(); distributeLists = new ObservableCollection <SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); _VM.Add_EsurveyAppCompleted += new EventHandler <Add_EsurveyAppCompletedEventArgs>(Add_EsurveyAppCompleted); _VM.Upd_ESurveyAppCompleted += new EventHandler <Upd_ESurveyAppCompletedEventArgs>(Upd_ESurveyAppCompleted); //发布 DocDistrbuteClient.DocDistrbuteBatchAddCompleted += new EventHandler <DocDistrbuteBatchAddCompletedEventArgs>(DocDistrbuteClient_DocDistrbuteBatchAddCompleted); //cmbWay.SelectedIndex = 0;//匿名和实名发布 _survey = new T_OA_REQUIRE(); _survey.T_OA_REQUIREMASTER = new T_OA_REQUIREMASTER(); _survey.REQUIREID = Guid.NewGuid().ToString(); _survey.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString(); dpStartDate.Text = DateTime.Now.ToShortDateString(); dpEndDate.Text = DateTime.Now.AddMonths(3).ToShortDateString(); RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); SetSurvey(); //修改发布接口还没弄好 // DocDistrbuteClient.DocDistrbuteInfoUpdateCompleted += new EventHandler<DocDistrbuteInfoUpdateCompletedEventArgs>(DocDistrbuteInfoUpdateCompleted); }
private void InitEvent() { SoaChannel = new SmtOACommonOfficeClient(); SoaChannel.DeleteAgentSetCompleted += new EventHandler <DeleteAgentSetCompletedEventArgs>(SoaChannel_DeleteAgentSetCompleted); SoaChannel.GetAgentSetListByIdCompleted += new EventHandler <GetAgentSetListByIdCompletedEventArgs>(SoaChannel_GetAgentSetListByIdCompleted); //AgentChannel.AgentServicesClient aa = new AgentServicesClient(); //aa.GetQueryAgentCompleted += new EventHandler<GetQueryAgentCompletedEventArgs>(aa_GetQueryAgentCompleted); //aa.GetQueryAgentAsync("BF06E969-1B2C-4a89-B0AE-A91CA1244053", "TravelApplication"); LoadData(); }
void EmployeeSurveyApp_aud_Loaded(object sender, RoutedEventArgs e) { _osub = new ObservableCollection <SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); distributeLists = new ObservableCollection <SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); _VM = new SmtOAPersonOfficeClient(); DocDistrbuteClient = new SmtOACommonOfficeClient(); issuanceExtOrgObj = new List <ExtOrgObj>(); _VM.Upd_ESurveyAppCompleted += new EventHandler <Upd_ESurveyAppCompletedEventArgs>(Upd_ESurveyAppCompleted); //发布 DocDistrbuteClient.GetDocDistrbuteInfosCompleted += new EventHandler <GetDocDistrbuteInfosCompletedEventArgs>(DocDistrbuteClient_GetDocDistrbuteInfosCompleted); _VM.Upd_ESurveyAppCompleted += new EventHandler <Upd_ESurveyAppCompletedEventArgs>(Upd_ESurveyAppCompleted); //发布 DocDistrbuteClient.GetDocDistrbuteInfosCompleted += new EventHandler <GetDocDistrbuteInfosCompletedEventArgs>(DocDistrbuteClient_GetDocDistrbuteInfosCompleted); _VM.Get_ESurveyAppCompleted += new EventHandler <Get_ESurveyAppCompletedEventArgs>(Get_ESurveyAppCompleted); Load_Data(); }
void EmployeeSurveyApp_aud_Loaded(object sender, RoutedEventArgs e) { _osub = new ObservableCollection<SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); distributeLists = new ObservableCollection<SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); _VM = new SmtOAPersonOfficeClient(); DocDistrbuteClient = new SmtOACommonOfficeClient(); issuanceExtOrgObj = new List<ExtOrgObj>(); _VM.Upd_ESurveyAppCompleted += new EventHandler<Upd_ESurveyAppCompletedEventArgs>(Upd_ESurveyAppCompleted); //发布 DocDistrbuteClient.GetDocDistrbuteInfosCompleted += new EventHandler<GetDocDistrbuteInfosCompletedEventArgs>(DocDistrbuteClient_GetDocDistrbuteInfosCompleted); _VM.Upd_ESurveyAppCompleted += new EventHandler<Upd_ESurveyAppCompletedEventArgs>(Upd_ESurveyAppCompleted); //发布 DocDistrbuteClient.GetDocDistrbuteInfosCompleted += new EventHandler<GetDocDistrbuteInfosCompletedEventArgs>(DocDistrbuteClient_GetDocDistrbuteInfosCompleted); _VM.Get_ESurveyAppCompleted += new EventHandler<Get_ESurveyAppCompletedEventArgs>(Get_ESurveyAppCompleted); Load_Data(); }
private void InitEvent() { SoaChannel = new SmtOACommonOfficeClient(); client = new PersonnelServiceClient(); FlowDesigner = new ServiceClient(); //获取模块 PermissionServiceWcf = new PermissionServiceClient(); InitModelCode += new EventHandler(ModuleDefinitionControl_InitModelCode); //获取模块 FlowDesigner.GetModelNameInfosComboxAsync(); PermissionServiceWcf.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); client.GetEmployeeDetailByIDCompleted += new EventHandler <GetEmployeeDetailByIDCompletedEventArgs>(client_GetEmployeeDetailByIDCompleted); client.GetEmployeeByIDsCompleted += new EventHandler <GetEmployeeByIDsCompletedEventArgs>(client_GetEmployeeByIDsCompleted); SoaChannel.GetAgentSetBysIdCompleted += new EventHandler <GetAgentSetBysIdCompletedEventArgs>(SoaChannel_GetAgentSetBysIdCompleted); SoaChannel.UpdateAgentSetCompleted += new EventHandler <UpdateAgentSetCompletedEventArgs>(SoaChannel_UpdateAgentSetCompleted); SoaChannel.AgentSetAddCompleted += new EventHandler <AgentSetAddCompletedEventArgs>(SoaChannel_AgentSetAddCompleted); FlowDesigner.GetModelNameInfosComboxCompleted += new EventHandler <GetModelNameInfosComboxCompletedEventArgs>(GetModelNameInfosComboxCompleted);//获取模块 PermissionServiceWcf.GetSysDictionaryByCategoryCompleted += new EventHandler <GetSysDictionaryByCategoryCompletedEventArgs>(GetSysDictionaryByCategoryCompleted); }
private void InitWCFSvClinetEvent() { OaPersonOfficeClient = new SmtOAPersonOfficeClient(); OaCommonOfficeClient = new SmtOACommonOfficeClient(); //HrPersonnelclient = new PersonnelServiceClient(); OaCommonOfficeClient.IsExistAgentCompleted += new EventHandler <IsExistAgentCompletedEventArgs>(SoaChannel_IsExistAgentCompleted); //HrPersonnelclient.GetAllEmployeePostBriefByEmployeeIDCompleted += new EventHandler<GetAllEmployeePostBriefByEmployeeIDCompletedEventArgs>(client_GetAllEmployeePostBriefByEmployeeIDCompleted); //HrPersonnelclient.GetEmployeePostBriefByEmployeeIDCompleted += new EventHandler<GetEmployeePostBriefByEmployeeIDCompletedEventArgs>(client_GetEmployeePostBriefByEmployeeIDCompleted); OaPersonOfficeClient.TravelmanagementAddCompleted += new EventHandler <TravelmanagementAddCompletedEventArgs>(Travelmanagement_TravelmanagementAddCompleted); //添加 OaPersonOfficeClient.UpdateTravelmanagementCompleted += new EventHandler <UpdateTravelmanagementCompletedEventArgs>(Travelmanagement_UpdateTravelmanagementCompleted); //修改 OaPersonOfficeClient.GetTravelmanagementByIdCompleted += new EventHandler <GetTravelmanagementByIdCompletedEventArgs>(Travelmanagement_GetTravelmanagementByIdCompleted); //OaPersonOfficeClient.GetBusinesstripDetailCompleted += new EventHandler<GetBusinesstripDetailCompletedEventArgs>(Travelmanagement_GetBusinesstripDetailCompleted); OaPersonOfficeClient.GetTravelSolutionByCompanyIDCompleted += new EventHandler <GetTravelSolutionByCompanyIDCompletedEventArgs>(Travelmanagement_GetTravelSolutionByCompanyIDCompleted); OaPersonOfficeClient.GetTravleAreaAllowanceByPostValueCompleted += OaPersonOfficeClient_GetTravleAreaAllowanceByPostValueCompleted; OaPersonOfficeClient.DeleteTravelmanagementCompleted += new EventHandler <DeleteTravelmanagementCompletedEventArgs>(Travelmanagement_DeleteTravelmanagementCompleted); }
private SMTLoading loadbar = new SMTLoading();//滚动圈 public ItemLookUp(string OwnerID, string OwnerPostID, string OwnerDepartmentID, string OwnerCompanyID) { InitializeComponent(); strOwnerID = OwnerID; strOwnerPostID = OwnerPostID; strOwnerDepartmentID = OwnerDepartmentID; strOwnerCompanyID = OwnerCompanyID; LayoutRoot.Children.Add(loadbar); this.Loaded += new RoutedEventHandler(SubjectApp_sel_Loaded); try { client = new SmtOACommonOfficeClient(); client.GetApporvalListforMVCForReimbursementCompleted += new EventHandler <GetApporvalListforMVCForReimbursementCompletedEventArgs>(client_GetApporvalListforMVCForReimbursementCompleted); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } }
private SMTLoading loadbar = new SMTLoading();//滚动圈 public ItemLookUp(string OwnerID, string OwnerPostID, string OwnerDepartmentID, string OwnerCompanyID) { InitializeComponent(); strOwnerID = OwnerID; strOwnerPostID = OwnerPostID; strOwnerDepartmentID = OwnerDepartmentID; strOwnerCompanyID = OwnerCompanyID; LayoutRoot.Children.Add(loadbar); this.Loaded += new RoutedEventHandler(SubjectApp_sel_Loaded); try { client = new SmtOACommonOfficeClient(); client.GetApporvalListforMVCForReimbursementCompleted += new EventHandler<GetApporvalListforMVCForReimbursementCompletedEventArgs>(client_GetApporvalListforMVCForReimbursementCompleted); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } }
void EmployeeSurveyApp_upd_Loaded(object sender, RoutedEventArgs e) { _VM = new SmtOAPersonOfficeClient(); _osub = new ObservableCollection<SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); DocDistrbuteClient = new SmtOACommonOfficeClient(); issuanceExtOrgObj = new List<ExtOrgObj>(); distributeLists = new ObservableCollection<SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); _VM.Upd_ESurveyAppCompleted += new EventHandler<Upd_ESurveyAppCompletedEventArgs>(Upd_ESurveyAppCompleted); //发布 DocDistrbuteClient.GetDocDistrbuteInfosCompleted += new EventHandler<GetDocDistrbuteInfosCompletedEventArgs>(DocDistrbuteClient_GetDocDistrbuteInfosCompleted); DocDistrbuteClient.DocDistrbuteInfoUpdateCompleted += new EventHandler<DocDistrbuteInfoUpdateCompletedEventArgs>(DocDistrbuteInfoUpdateCompleted); DocDistrbuteClient.GetDocDistrbuteInfosAsync(_survey.REQUIREID); txtTitle.Text = _survey.APPTITLE; dpStartDate.Text = Convert.ToDateTime(_survey.STARTDATE).ToShortDateString(); dpEndDate.Text = Convert.ToDateTime(_survey.ENDDATE).ToShortDateString(); //if (!string.IsNullOrWhiteSpace(_survey.way.tostring())) //{ //foreach (t_sys_dictionary region in cmbway.items) //{ // if (region.dictionaryvalue == convert.todecimal(_survey.way)) // { // cmbway.selecteditem = region; // break; // } //} //} ckbOptFlag.IsChecked = _survey.OPTFLAG == "1" ? true : false; ckbOName.IsChecked = _survey.WAY == "1" ? true : false; if (types == FormTypes.Resubmit)//重新提交 { _survey.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString(); } RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); }
void EmployeeSurveyApp_upd_Loaded(object sender, RoutedEventArgs e) { _VM = new SmtOAPersonOfficeClient(); _osub = new ObservableCollection <SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); DocDistrbuteClient = new SmtOACommonOfficeClient(); issuanceExtOrgObj = new List <ExtOrgObj>(); distributeLists = new ObservableCollection <SMT.SaaS.OA.UI.SmtOACommonOfficeService.T_OA_DISTRIBUTEUSER>(); _VM.Upd_ESurveyAppCompleted += new EventHandler <Upd_ESurveyAppCompletedEventArgs>(Upd_ESurveyAppCompleted); //发布 DocDistrbuteClient.GetDocDistrbuteInfosCompleted += new EventHandler <GetDocDistrbuteInfosCompletedEventArgs>(DocDistrbuteClient_GetDocDistrbuteInfosCompleted); DocDistrbuteClient.DocDistrbuteInfoUpdateCompleted += new EventHandler <DocDistrbuteInfoUpdateCompletedEventArgs>(DocDistrbuteInfoUpdateCompleted); DocDistrbuteClient.GetDocDistrbuteInfosAsync(_survey.REQUIREID); txtTitle.Text = _survey.APPTITLE; dpStartDate.Text = Convert.ToDateTime(_survey.STARTDATE).ToShortDateString(); dpEndDate.Text = Convert.ToDateTime(_survey.ENDDATE).ToShortDateString(); //if (!string.IsNullOrWhiteSpace(_survey.way.tostring())) //{ //foreach (t_sys_dictionary region in cmbway.items) //{ // if (region.dictionaryvalue == convert.todecimal(_survey.way)) // { // cmbway.selecteditem = region; // break; // } //} //} ckbOptFlag.IsChecked = _survey.OPTFLAG == "1" ? true : false; ckbOName.IsChecked = _survey.WAY == "1" ? true : false; if (types == FormTypes.Resubmit)//重新提交 { _survey.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString(); } RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); }
private void InitEvent() { SoaChannel = new SmtOACommonOfficeClient(); client = new PersonnelServiceClient(); FlowDesigner = new ServiceClient();//获取模块 PermissionServiceWcf = new PermissionServiceClient(); InitModelCode += new EventHandler(ModuleDefinitionControl_InitModelCode);//获取模块 FlowDesigner.GetModelNameInfosComboxAsync(); PermissionServiceWcf.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); client.GetEmployeeDetailByIDCompleted += new EventHandler<GetEmployeeDetailByIDCompletedEventArgs>(client_GetEmployeeDetailByIDCompleted); client.GetEmployeeByIDsCompleted += new EventHandler<GetEmployeeByIDsCompletedEventArgs>(client_GetEmployeeByIDsCompleted); SoaChannel.GetAgentSetBysIdCompleted += new EventHandler<GetAgentSetBysIdCompletedEventArgs>(SoaChannel_GetAgentSetBysIdCompleted); SoaChannel.UpdateAgentSetCompleted += new EventHandler<UpdateAgentSetCompletedEventArgs>(SoaChannel_UpdateAgentSetCompleted); SoaChannel.AgentSetAddCompleted += new EventHandler<AgentSetAddCompletedEventArgs>(SoaChannel_AgentSetAddCompleted); FlowDesigner.GetModelNameInfosComboxCompleted += new EventHandler<GetModelNameInfosComboxCompletedEventArgs>(GetModelNameInfosComboxCompleted);//获取模块 PermissionServiceWcf.GetSysDictionaryByCategoryCompleted += new EventHandler<GetSysDictionaryByCategoryCompletedEventArgs>(GetSysDictionaryByCategoryCompleted); }
private void InitEvent() { SoaChannel = new SmtOACommonOfficeClient(); SoaChannel.DeleteAgentSetCompleted += new EventHandler<DeleteAgentSetCompletedEventArgs>(SoaChannel_DeleteAgentSetCompleted); SoaChannel.GetAgentSetListByIdCompleted += new EventHandler<GetAgentSetListByIdCompletedEventArgs>(SoaChannel_GetAgentSetListByIdCompleted); //AgentChannel.AgentServicesClient aa = new AgentServicesClient(); //aa.GetQueryAgentCompleted += new EventHandler<GetQueryAgentCompletedEventArgs>(aa_GetQueryAgentCompleted); //aa.GetQueryAgentAsync("BF06E969-1B2C-4a89-B0AE-A91CA1244053", "TravelApplication"); LoadData(); }
private void SendDocByCompanyid(string companyid) { Dictionary<string, string> dicCompany=new Dictionary<string,string>(); string strSunCompany = @"select c.companyid,c.cname from smthrm.t_hr_company c where c.fatherid='" + companyid + "'"; OracleHelp.Connect(); DataTable dtsun = OracleHelp.getTable(strSunCompany); if (dtsun != null) { if (dtsun.Rows.Count > 0) { for (int i = 0; i < dtsun.Rows.Count; i++) { dicCompany.Add(dtsun.Rows[i]["cname"].ToString(), dtsun.Rows[i]["companyid"].ToString()); string strGrandSunCompany = @"select c.companyid,c.cname from smthrm.t_hr_company c where c.fatherid='" + dtsun.Rows[i]["companyid"].ToString() + "'"; DataTable dtGrandSun = OracleHelp.getTable(strGrandSunCompany); if (dtGrandSun != null) { if (dtGrandSun.Rows.Count > 0) { for (int j = 0; j < dtGrandSun.Rows.Count; j++) { dicCompany.Add(dtGrandSun.Rows[j]["cname"].ToString(), dtGrandSun.Rows[j]["companyid"].ToString()); } } } } } } OracleHelp.close(); if (string.IsNullOrEmpty(TxtSendDocid.Text)) { MessageBox.Show("请先查询公文id"); return; } string msg = string.Empty; ObservableCollection<T_OA_DISTRIBUTEUSER> distributeAddList = new ObservableCollection<T_OA_DISTRIBUTEUSER>() ; SmtOACommonOfficeClient DocDistrbuteClient = new SmtOACommonOfficeClient(); ObservableCollection<string> CompanyIDsList = new ObservableCollection<string>(); ObservableCollection<string> StrDepartmentIDsList = new ObservableCollection<string>(); //获取部门ID ObservableCollection<string> StrPositionIDsList = new ObservableCollection<string>(); ObservableCollection<string> StrStaffList = new ObservableCollection<string>(); //员工ID if (dicCompany.Count > 0) { foreach (var q in dicCompany) { //if (q.Key == "杭州新神州通货物运输有限公司") continue; ShowMessage("发布公文给这个公司:"+q.Key+" 公司id:"+q.Value); CompanyIDsList.Add(q.Value); T_OA_DISTRIBUTEUSER distributeTmp = new T_OA_DISTRIBUTEUSER(); distributeTmp.DISTRIBUTEUSERID = Guid.NewGuid().ToString(); distributeTmp.MODELNAME = "CompanySendDoc"; distributeTmp.FORMID = TxtSendDocid.Text; distributeTmp.VIEWTYPE = "0";//公司 distributeTmp.VIEWER = q.Value; distributeTmp.CREATEDATE = DateTime.Now; distributeTmp.CREATEUSERID =GlobalParameters.employeeid; distributeTmp.CREATEUSERNAME = GlobalParameters.employeeName; distributeTmp.CREATEPOSTID = GlobalParameters.employeeMasterPostid; distributeTmp.CREATEDEPARTMENTID = GlobalParameters.employeeMasterDepartmentid; distributeTmp.CREATECOMPANYID = GlobalParameters.employeeMasterCompanyid; distributeTmp.OWNERID =GlobalParameters.employeeid; distributeTmp.OWNERNAME = GlobalParameters.employeeName; distributeTmp.OWNERPOSTID = GlobalParameters.employeeMasterPostid; distributeTmp.OWNERDEPARTMENTID = GlobalParameters.employeeMasterDepartmentid; distributeTmp.OWNERCOMPANYID = GlobalParameters.employeeMasterCompanyid; distributeAddList.Add(distributeTmp); } ShowMessage("发布公文给所有公司完毕,共发送:" + dicCompany.Count+ " 条数据"); } V_BumfCompanySendDoc tmpSenddoc=DocDistrbuteClient.GetBumfDocInfo(TxtSendDocid.Text); if (tmpSenddoc.OACompanySendDoc == null) { MessageBox.Show("通过id获取的公文为空,请检查后再试"); return; } T_OA_SENDDOC sendDoc = tmpSenddoc.OACompanySendDoc; sendDoc.T_OA_SENDDOCTYPE = null; sendDoc.T_OA_SENDDOCTYPEReference = null; DocDistrbuteClient.BatchAddCompanyDocDistrbuteForNew(distributeAddList.ToArray(), CompanyIDsList.ToArray(), StrDepartmentIDsList.ToArray(), StrPositionIDsList.ToArray(), StrStaffList.ToArray(), sendDoc); //MessageBox.Show("发布公文成功!"); }
private void SendDocByCompanyid(string companyid) { Dictionary <string, string> dicCompany = new Dictionary <string, string>(); string strSunCompany = @"select c.companyid,c.cname from smthrm.t_hr_company c where c.fatherid='" + companyid + "'"; OracleHelp.Connect(); DataTable dtsun = OracleHelp.getTable(strSunCompany); if (dtsun != null) { if (dtsun.Rows.Count > 0) { for (int i = 0; i < dtsun.Rows.Count; i++) { dicCompany.Add(dtsun.Rows[i]["cname"].ToString(), dtsun.Rows[i]["companyid"].ToString()); string strGrandSunCompany = @"select c.companyid,c.cname from smthrm.t_hr_company c where c.fatherid='" + dtsun.Rows[i]["companyid"].ToString() + "'"; DataTable dtGrandSun = OracleHelp.getTable(strGrandSunCompany); if (dtGrandSun != null) { if (dtGrandSun.Rows.Count > 0) { for (int j = 0; j < dtGrandSun.Rows.Count; j++) { dicCompany.Add(dtGrandSun.Rows[j]["cname"].ToString(), dtGrandSun.Rows[j]["companyid"].ToString()); } } } } } } OracleHelp.close(); if (string.IsNullOrEmpty(TxtSendDocid.Text)) { MessageBox.Show("请先查询公文id"); return; } string msg = string.Empty; ObservableCollection <T_OA_DISTRIBUTEUSER> distributeAddList = new ObservableCollection <T_OA_DISTRIBUTEUSER>(); SmtOACommonOfficeClient DocDistrbuteClient = new SmtOACommonOfficeClient(); ObservableCollection <string> CompanyIDsList = new ObservableCollection <string>(); ObservableCollection <string> StrDepartmentIDsList = new ObservableCollection <string>(); //获取部门ID ObservableCollection <string> StrPositionIDsList = new ObservableCollection <string>(); ObservableCollection <string> StrStaffList = new ObservableCollection <string>(); //员工ID if (dicCompany.Count > 0) { foreach (var q in dicCompany) { //if (q.Key == "杭州新神州通货物运输有限公司") continue; ShowMessage("发布公文给这个公司:" + q.Key + " 公司id:" + q.Value); CompanyIDsList.Add(q.Value); T_OA_DISTRIBUTEUSER distributeTmp = new T_OA_DISTRIBUTEUSER(); distributeTmp.DISTRIBUTEUSERID = Guid.NewGuid().ToString(); distributeTmp.MODELNAME = "CompanySendDoc"; distributeTmp.FORMID = TxtSendDocid.Text; distributeTmp.VIEWTYPE = "0";//公司 distributeTmp.VIEWER = q.Value; distributeTmp.CREATEDATE = DateTime.Now; distributeTmp.CREATEUSERID = GlobalParameters.employeeid; distributeTmp.CREATEUSERNAME = GlobalParameters.employeeName; distributeTmp.CREATEPOSTID = GlobalParameters.employeeMasterPostid; distributeTmp.CREATEDEPARTMENTID = GlobalParameters.employeeMasterDepartmentid; distributeTmp.CREATECOMPANYID = GlobalParameters.employeeMasterCompanyid; distributeTmp.OWNERID = GlobalParameters.employeeid; distributeTmp.OWNERNAME = GlobalParameters.employeeName; distributeTmp.OWNERPOSTID = GlobalParameters.employeeMasterPostid; distributeTmp.OWNERDEPARTMENTID = GlobalParameters.employeeMasterDepartmentid; distributeTmp.OWNERCOMPANYID = GlobalParameters.employeeMasterCompanyid; distributeAddList.Add(distributeTmp); } ShowMessage("发布公文给所有公司完毕,共发送:" + dicCompany.Count + " 条数据"); } V_BumfCompanySendDoc tmpSenddoc = DocDistrbuteClient.GetBumfDocInfo(TxtSendDocid.Text); if (tmpSenddoc.OACompanySendDoc == null) { MessageBox.Show("通过id获取的公文为空,请检查后再试"); return; } T_OA_SENDDOC sendDoc = tmpSenddoc.OACompanySendDoc; sendDoc.T_OA_SENDDOCTYPE = null; sendDoc.T_OA_SENDDOCTYPEReference = null; DocDistrbuteClient.BatchAddCompanyDocDistrbuteForNew(distributeAddList.ToArray(), CompanyIDsList.ToArray(), StrDepartmentIDsList.ToArray(), StrPositionIDsList.ToArray(), StrStaffList.ToArray(), sendDoc); //MessageBox.Show("发布公文成功!"); }
private void InitEvent() { SoaChannel = new SmtOACommonOfficeClient(); SoaChannel.DeleteAgentDataSetCompleted += new EventHandler<DeleteAgentDataSetCompletedEventArgs>(SoaChannel_DeleteAgentDataSetCompleted); SoaChannel.GetAgentDataSetListByIdCompleted += new EventHandler<GetAgentDataSetListByIdCompletedEventArgs>(SoaChannel_GetAgentDataSetListByIdCompleted); LoadData(); }