/// <summary> ///获取薪资体系 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetSalarySystemWithPagingCompleted(object sender, GetSalarySystemWithPagingCompletedEventArgs e) { List <T_HR_SALARYSYSTEM> list = new List <T_HR_SALARYSYSTEM>(); if (e.Error == null) { if (e.Result != null) { list = e.Result.ToList(); } DtGrid.ItemsSource = list; dataPager.PageCount = e.pageCount; salarySystemSelected = list.FirstOrDefault(); if (salarySystemSelected != null) { // txtSalarySystemName.DataContext = salarySystemSelected; gSalarySystem.DataContext = salarySystemSelected; // BindSalaryLevel(salarySystemSelected); permissionClient.GetSysDictionaryByCategoryAsync("POSTLEVEL"); } else { DtGridPostDis.ItemsSource = null; } } else { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } loadbar.Stop(); }
void SysPermissionForms_Loaded(object sender, RoutedEventArgs e) { bool IsLoadDicts = false; if (Application.Current.Resources["SYS_DICTIONARY"] == null) { IsLoadDicts = true; LoadDicts(); } this.LayoutRoot.RowDefinitions[3].Height = new GridLength(0); this.LayoutRoot.RowDefinitions[4].Height = new GridLength(0); perm.PERMISSIONID = Guid.NewGuid().ToString(); perm.CREATEDATE = DateTime.Now; //perm.CREATEUSER = Common.CurrentConfig.; //perm.CREATEUSER = Common.CurrentConfig.CurrentUser.SYSUSERID; //perm.CREATEUSER = Common.CurrentLoginUserInfo.sysuserID; this.DataContext = perm; if (formType == FormTypes.New) { rbtIsAutoyes.IsChecked = true; } if (IsLoadDicts == false) { client.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); } }
private bool closeFormFlag = false;//是否关闭窗体 false 表示不关闭 public SysDictionaryForm(FormTypes type, string dictID) { InitializeComponent(); InitParas(); FormType = type; if (string.IsNullOrEmpty(dictID)) { dictionary = new T_SYS_DICTIONARY(); dictionary.DICTIONARYID = Guid.NewGuid().ToString(); dictionary.CREATEUSER = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; dictionary.CREATEDATE = System.DateTime.Now; dictionary.UPDATEDATE = System.DateTime.Now; //dictionary.UPDATEUSER = Common.CurrentLoginUserInfo.EmployeeID; client.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); this.DataContext = dictionary; } else { //根据ID获取字典 client.GetSysDictionaryByIDAsync(dictID); } lkDictionaryType.TxtLookUp.IsEnabled = true; if (type == FormTypes.Browse) { UnEnableFormControl(); } }
/// <summary> /// formtoolbar控件控制 /// </summary> private void InitFormToolBarButton() { GetEntityLogo("T_SYS_ENTITYMENU"); FormToolBar1.btnNew.Click += new RoutedEventHandler(btnNew_Click); FormToolBar1.btnEdit.Click += new RoutedEventHandler(btnEdit_Click); FormToolBar1.btnDelete.Click += new RoutedEventHandler(btnDelete_Click); FormToolBar1.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click); //隐藏未使用按钮 //FormToolBar1.btnRead.Visibility = Visibility.Collapsed; FormToolBar1.btnPrint.Visibility = Visibility.Collapsed; FormToolBar1.btnOutPDF.Visibility = Visibility.Collapsed; FormToolBar1.btnOutExcel.Visibility = Visibility.Collapsed; FormToolBar1.BtnView.Visibility = Visibility.Collapsed; //FormToolBar1.btnimport.Visibility = Visibility.Collapsed; FormToolBar1.stpCheckState.Visibility = Visibility.Collapsed; FormToolBar1.stpOtherAction.Visibility = Visibility.Collapsed; //FormToolBar1.btnSumbitAudit.Visibility = Visibility.Collapsed; FormToolBar1.btnAudit.Visibility = Visibility.Collapsed; //FormToolBar1.btnAduitNoTPass.Visibility = Visibility.Collapsed; DtGrid.CurrentCellChanged += new EventHandler <EventArgs>(DataGrid_CurrentCellChanged); if (Application.Current.Resources["SYS_DICTIONARY"] == null) { client.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); } else { InitSysType();//如果字典加载了,则过滤了再帮定 } FormToolBar1.ShowRect(); LoadData(); }
void SysPermissionForms_Loaded(object sender, RoutedEventArgs e) { this.LayoutRoot.RowDefinitions[3].Height = new GridLength(0); this.LayoutRoot.RowDefinitions[4].Height = new GridLength(0); perm.PERMISSIONID = Guid.NewGuid().ToString(); perm.CREATEDATE = DateTime.Now; this.DataContext = perm; if (formType == FormTypes.New) { rbtIsAutoyes.IsChecked = true; } client.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); }
protected void LoadDicts() { try { PermissionServiceClient cliet = new PermissionServiceClient(); cliet.GetSysDictionaryByCategoryCompleted += (o, e) => { if (e.Error != null && e.Error.Message != "") { MessageBox.Show(Utility.GetResourceStr(e.Error.Message)); } else { List <T_SYS_DICTIONARY> dicts = new List <T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); Application.Current.Resources.Add("SYS_DICTIONARY", dicts); } }; //TODO: 按需取出字典值 cliet.GetSysDictionaryByCategoryAsync("CHECKSTATE"); } catch (Exception ex) { MessageBox.Show(Utility.GetResourceStr(ex.Message)); } }
private void InitParas(string roleMenuID) { ServiceClient = new PermissionServiceClient(); //RoleClient = new SysRoleManagementServiceClient(); ServiceClient.RoleEntityMenuAddCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_RoleEntityMenuAddCompleted); ServiceClient.RoleEntityMenuUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_RoleEntityMenuUpdateCompleted); ServiceClient.GetRoleEntityMenuByIDCompleted += new EventHandler<GetRoleEntityMenuByIDCompletedEventArgs>(ServiceClient_GetRoleEntityMenuByIDCompleted); //ServiceClient.GetSysMenuByTypeCompleted += new EventHandler<GetSysMenuByTypeCompletedEventArgs>(ServiceClient_GetSysMenuByTypeCompleted); ServiceClient.GetSysRoleInfosCompleted += new EventHandler<GetSysRoleInfosCompletedEventArgs>(ServiceClient_GetSysRoleInfosCompleted); if (FormType == FormTypes.New) { RoleMenu = new T_SYS_ROLEENTITYMENU(); RoleMenu.ROLEENTITYMENUID = Guid.NewGuid().ToString(); //绑定系统类型 ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); } //初始化权限菜单 if (!string.IsNullOrEmpty(roleMenuID)) { ServiceClient.GetRoleEntityMenuByIDAsync(roleMenuID); } }
private void InitParas(string roleID) { ServiceClient = new PermissionServiceClient(); ServiceClient.GetSysDictionaryByCategoryCompleted += new EventHandler <GetSysDictionaryByCategoryCompletedEventArgs>(ServiceClient_GetSysDictionaryByCategoryCompleted); ServiceClient.SysRoleInfoAddCompleted += new EventHandler <SysRoleInfoAddCompletedEventArgs>(SysRoleClient_SysRoleInfoAddCompleted); //ServiceClient.SysRoleInfoUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(SysRoleClient_SysRoleInfoUpdateCompleted); ServiceClient.SysRoleInfoUpdateCompleted += new EventHandler <SysRoleInfoUpdateCompletedEventArgs>(ServiceClient_SysRoleInfoUpdateCompleted); ServiceClient.GetSysRoleSingleInfoByIdCompleted += new EventHandler <GetSysRoleSingleInfoByIdCompletedEventArgs>(SysRoleClient_GetSysRoleSingleInfoByIdCompleted); if (!string.IsNullOrEmpty(roleID)) { tmpRoleId = roleID; //ServiceClient.GetSysRoleByIDAsync(roleID); } //绑定系统类型 ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); if (FormType == FormTypes.New) { SysRole = new T_SYS_ROLE(); this.txtCompanyName.Text = string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].CompanyName) ? "" : Common.CurrentLoginUserInfo.UserPosts[0].CompanyName; //公司名称 StrCompanyID = string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].CompanyID) ? "" : Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; //公司ID this.txtDepartmentName.Text = string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName) ? "" : Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName; //部门名称 this.StrDepartmentID = string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID) ? "" : Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; //部门ID SysRole.ROLEID = Guid.NewGuid().ToString(); //GetCompanyNameByCompanyID(Common.CurrentLoginUserInfo.UserPosts[0].CompanyID); } }
protected void LoadDicts() { try { PermissionServiceClient cliet = new PermissionServiceClient(); cliet.GetSysDictionaryByCategoryCompleted += (o, e) => { if (e.Error != null && e.Error.Message != "") { CommonFunction.ShowErrorMessage(Utility.GetResourceStr(e.Error.Message)); } else { List <T_SYS_DICTIONARY> dicts = new List <T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); if (Application.Current.Resources.Contains("SYS_DICTIONARY")) { Application.Current.Resources.Remove("SYS_DICTIONARY"); } Application.Current.Resources.Add("SYS_DICTIONARY", dicts); settings.Add("SYS_DICTIONARY", dicts); isDict = true; RefreshBtn(); } }; //TODO: 按需取出字典值 cliet.GetSysDictionaryByCategoryAsync(""); } catch (Exception ex) { MessageBox.Show(Utility.GetResourceStr(ex.Message)); } }
private void InitParas(string roleMenuID) { ServiceClient = new PermissionServiceClient(); //RoleClient = new SysRoleManagementServiceClient(); ServiceClient.RoleEntityMenuAddCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_RoleEntityMenuAddCompleted); ServiceClient.RoleEntityMenuUpdateCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_RoleEntityMenuUpdateCompleted); ServiceClient.GetRoleEntityMenuByIDCompleted += new EventHandler <GetRoleEntityMenuByIDCompletedEventArgs>(ServiceClient_GetRoleEntityMenuByIDCompleted); //ServiceClient.GetSysMenuByTypeCompleted += new EventHandler<GetSysMenuByTypeCompletedEventArgs>(ServiceClient_GetSysMenuByTypeCompleted); ServiceClient.GetSysRoleInfosCompleted += new EventHandler <GetSysRoleInfosCompletedEventArgs>(ServiceClient_GetSysRoleInfosCompleted); if (FormType == FormTypes.New) { RoleMenu = new T_SYS_ROLEENTITYMENU(); RoleMenu.ROLEENTITYMENUID = Guid.NewGuid().ToString(); //绑定系统类型 ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); } //初始化权限菜单 if (!string.IsNullOrEmpty(roleMenuID)) { ServiceClient.GetRoleEntityMenuByIDAsync(roleMenuID); } }
private void InitParas(string menuID) { ServiceClient = new PermissionServiceClient(); //ServiceClient.SysMenuAddCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_SysMenuAddCompleted); ServiceClient.SysMenuAddCompleted += new EventHandler <SysMenuAddCompletedEventArgs>(ServiceClient_SysMenuAddCompleted); ServiceClient.SysMenuUpdateCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_SysMenuUpdateCompleted); //ServiceClient.GetSysMenuByTypeCompleted += new EventHandler<GetSysMenuByTypeCompletedEventArgs>(ServiceClient_GetSysMenuByTypeCompleted); ServiceClient.GetSysMenuByIDCompleted += new EventHandler <GetSysMenuByIDCompletedEventArgs>(ServiceClient_GetSysMenuByIDCompleted); ServiceClient.GetSysDictionaryByCategoryCompleted += new EventHandler <GetSysDictionaryByCategoryCompletedEventArgs>(ServiceClient_GetSysDictionaryByCategoryCompleted); if (FormType == FormTypes.New) { SysMenu = new T_SYS_ENTITYMENU(); SysMenu.ENTITYMENUID = Guid.NewGuid().ToString(); //绑定系统类型 ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); //BindParentMenu(); } if (!string.IsNullOrEmpty(menuID)) { ServiceClient.GetSysMenuByIDAsync(menuID); } }
/// <summary> /// 初始化 /// </summary> private void InitParas() { treeViewItemTemplate = this.Resources["NodeTemplate"] as DataTemplate; //绑定系统类型 client.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); client.GetSysPermissionAllAsync(); SetToolBar(); }
void ServiceClient_GetSysMenuByIDCompleted(object sender, GetSysMenuByIDCompletedEventArgs e) { //获取要修改的菜单 this.SysMenu = e.Result; ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); //BindParentMenu(); RefreshUI(RefreshedTypes.All); }
protected void LoadDicts() { ServiceClient.GetSysDictionaryByCategoryCompleted += (o, e) => { List <T_SYS_DICTIONARY> dicts = new List <T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); Application.Current.Resources.Add("SYS_DICTIONARY", dicts); }; //TODO: 按需取出字典值 ServiceClient.GetSysDictionaryByCategoryAsync(""); }
public SysUserRoleSet(T_SYS_USER UserObj, T_SYS_USERROLE userRole) { ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); tmpUser = UserObj; this.GetTitle(); InitializeComponent(); if (userRole != null) { StrAction = "1";//修改用户角色 } this.Loaded += new RoutedEventHandler(SysUserRoleSet_Loaded); ViewInfosList.Clear(); }
protected void LoadDicts() { PermissionServiceClient cliet = new PermissionServiceClient(); cliet.GetSysDictionaryByCategoryCompleted += (o, e) => { List <T_SYS_DICTIONARY> dicts = new List <T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); if (dicts != null) { Application.Current.Resources.Add("SYS_DICTIONARY", dicts); } }; //TODO: 按需取出字典值 cliet.GetSysDictionaryByCategoryAsync(""); //cliet.GetSysDictionaryByCategoryByUpdateDateAsync("",DateTime.Now); }
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); }
void Configclient_GetAppConfigByNameCompleted(object sender, GetAppConfigByNameCompletedEventArgs e) { if (e.Error == null) { if (e.Result == "true") { Deployment.Current.Dispatcher.BeginInvoke(delegate { List <T_SYS_DICTIONARY> dictss = Application.Current.Resources["SYS_DICTIONARY"] as List <T_SYS_DICTIONARY>; BindComboBox(dictss, category, SelectedValue); }); } else { DictionNaryclinet.GetSysDictionaryByCategoryAsync(category); } } }
private void InitControlEvent() { ServiceClient = new PermissionServiceClient(); ServiceClient.GetSysRoleInfosCompleted += new EventHandler <GetSysRoleInfosCompletedEventArgs>(SysRoleClient_GetSysRoleInfosCompleted); ServiceClient.UserRoleBatchAddInfosCompleted += new EventHandler <UserRoleBatchAddInfosCompletedEventArgs>(SysRoleClient_UserRoleBatchAddInfosCompleted); ServiceClient.GetSysUserRoleByUserCompleted += new EventHandler <GetSysUserRoleByUserCompletedEventArgs>(ServiceClient_GetSysUserRoleByUserCompleted); personclient.GetAllPostByEmployeeIDCompleted += new EventHandler <GetAllPostByEmployeeIDCompletedEventArgs>(personclient_GetAllPostByEmployeeIDCompleted); ServiceClient.BatchAddUserRoleCompleted += new EventHandler <BatchAddUserRoleCompletedEventArgs>(ServiceClient_BatchAddUserRoleCompleted); ServiceClient.GetSysRoleInfosByCompanyIdAndDepartmentIdCompleted += new EventHandler <GetSysRoleInfosByCompanyIdAndDepartmentIdCompletedEventArgs>(ServiceClient_GetSysRoleInfosByCompanyIdAndDepartmentIdCompleted); ServiceClient.GetSysDictionaryByCategoryCompleted += new EventHandler <GetSysDictionaryByCategoryCompletedEventArgs>(ServiceClient_GetSysDictionaryByCategoryCompleted); //StrCompanyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; //txtCompany.Text = Common.CurrentLoginUserInfo.companyName; orgclient.GetCompanyByIdCompleted += new EventHandler <GetCompanyByIdCompletedEventArgs>(orgclient_GetCompanyByIdCompleted); orgclient.GetDepartmentByIdCompleted += new EventHandler <GetDepartmentByIdCompletedEventArgs>(orgclient_GetDepartmentByIdCompleted); personclient.GetAllPostByEmployeeIDAsync(tmpUser.EMPLOYEEID); ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); }
public void initEvent() { InitParas(); if (string.IsNullOrEmpty(salarySystemID)) { salarySystem = new T_HR_SALARYSYSTEM(); salarySystem.SALARYSYSTEMID = Guid.NewGuid().ToString(); salarySystem.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString(); salarySystem.OWNERCOMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; salarySystem.OWNERDEPARTMENTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; salarySystem.OWNERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; salarySystem.OWNERPOSTID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostID; this.DataContext = salarySystem; SetToolBar(); } else { NotShow(FormType); client.GetSalarySystemByIDAsync(salarySystemID); } permissionClient.GetSysDictionaryByCategoryAsync("POSTLEVEL"); }
private void InitParas(string menuID) { ServiceClient = new PermissionServiceClient(); //ServiceClient.SysMenuAddCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_SysMenuAddCompleted); ServiceClient.SysMenuAddCompleted += new EventHandler<SysMenuAddCompletedEventArgs>(ServiceClient_SysMenuAddCompleted); ServiceClient.SysMenuUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_SysMenuUpdateCompleted); //ServiceClient.GetSysMenuByTypeCompleted += new EventHandler<GetSysMenuByTypeCompletedEventArgs>(ServiceClient_GetSysMenuByTypeCompleted); ServiceClient.GetSysMenuByIDCompleted += new EventHandler<GetSysMenuByIDCompletedEventArgs>(ServiceClient_GetSysMenuByIDCompleted); ServiceClient.GetSysDictionaryByCategoryCompleted += new EventHandler<GetSysDictionaryByCategoryCompletedEventArgs>(ServiceClient_GetSysDictionaryByCategoryCompleted); if (FormType == FormTypes.New) { SysMenu = new T_SYS_ENTITYMENU(); SysMenu.ENTITYMENUID = Guid.NewGuid().ToString(); //绑定系统类型 ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); //BindParentMenu(); } if (!string.IsNullOrEmpty(menuID)) { ServiceClient.GetSysMenuByIDAsync(menuID); } }
protected void LoadDicts() { try { PermissionServiceClient cliet = new PermissionServiceClient(); cliet.GetSysDictionaryByCategoryCompleted += (o, e) => { if (e.Error != null && e.Error.Message != "") { CommonFunction.ShowErrorMessage(Utility.GetResourceStr(e.Error.Message)); } else { List<T_SYS_DICTIONARY> dicts = new List<T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); if (Application.Current.Resources.Contains("SYS_DICTIONARY")) { Application.Current.Resources.Remove("SYS_DICTIONARY"); } Application.Current.Resources.Add("SYS_DICTIONARY", dicts); settings.Add("SYS_DICTIONARY", dicts); isDict = true; RefreshBtn(); } }; //TODO: 按需取出字典值 cliet.GetSysDictionaryByCategoryAsync(""); } catch (Exception ex) { MessageBox.Show(Utility.GetResourceStr(ex.Message)); } }
protected void LoadDicts() { try { PermissionServiceClient cliet = new PermissionServiceClient(); cliet.GetSysDictionaryByCategoryCompleted += (o, e) => { if (e.Error != null && e.Error.Message != "") { MessageBox.Show(Utility.GetResourceStr(e.Error.Message)); } else { List<T_SYS_DICTIONARY> dicts = new List<T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); Application.Current.Resources.Add("SYS_DICTIONARY", dicts); } }; //TODO: 按需取出字典值 cliet.GetSysDictionaryByCategoryAsync("CHECKSTATE"); } catch (Exception ex) { MessageBox.Show(Utility.GetResourceStr(ex.Message)); } }
private void InitControlEvent() { ServiceClient = new PermissionServiceClient(); ServiceClient.GetSysRoleInfosCompleted += new EventHandler<GetSysRoleInfosCompletedEventArgs>(SysRoleClient_GetSysRoleInfosCompleted); ServiceClient.UserRoleBatchAddInfosCompleted += new EventHandler<UserRoleBatchAddInfosCompletedEventArgs>(SysRoleClient_UserRoleBatchAddInfosCompleted); ServiceClient.GetSysUserRoleByUserCompleted += new EventHandler<GetSysUserRoleByUserCompletedEventArgs>(ServiceClient_GetSysUserRoleByUserCompleted); personclient.GetAllPostByEmployeeIDCompleted += new EventHandler<GetAllPostByEmployeeIDCompletedEventArgs>(personclient_GetAllPostByEmployeeIDCompleted); ServiceClient.BatchAddUserRoleCompleted += new EventHandler<BatchAddUserRoleCompletedEventArgs>(ServiceClient_BatchAddUserRoleCompleted); ServiceClient.GetSysRoleInfosByCompanyIdAndDepartmentIdCompleted += new EventHandler<GetSysRoleInfosByCompanyIdAndDepartmentIdCompletedEventArgs>(ServiceClient_GetSysRoleInfosByCompanyIdAndDepartmentIdCompleted); ServiceClient.GetSysDictionaryByCategoryCompleted += new EventHandler<GetSysDictionaryByCategoryCompletedEventArgs>(ServiceClient_GetSysDictionaryByCategoryCompleted); //StrCompanyID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; //txtCompany.Text = Common.CurrentLoginUserInfo.companyName; orgclient.GetCompanyByIdCompleted += new EventHandler<GetCompanyByIdCompletedEventArgs>(orgclient_GetCompanyByIdCompleted); orgclient.GetDepartmentByIdCompleted += new EventHandler<GetDepartmentByIdCompletedEventArgs>(orgclient_GetDepartmentByIdCompleted); personclient.GetAllPostByEmployeeIDAsync(tmpUser.EMPLOYEEID); ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); }
protected void LoadDicts() { PermissionServiceClient cliet = new PermissionServiceClient(); cliet.GetSysDictionaryByCategoryCompleted += (o, e) => { List<T_SYS_DICTIONARY> dicts = new List<T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); if(dicts != null) Application.Current.Resources.Add("SYS_DICTIONARY", dicts); }; //TODO: 按需取出字典值 cliet.GetSysDictionaryByCategoryAsync(""); //cliet.GetSysDictionaryByCategoryByUpdateDateAsync("",DateTime.Now); }
protected void LoadDicts() { PermissionServiceClient cliet = new PermissionServiceClient(); cliet.GetSysDictionaryByCategoryCompleted += (o, e) => { List <T_SYS_DICTIONARY> dicts = new List <T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); if (dicts != null) { Application.Current.Resources.Add("SYS_DICTIONARY", dicts); } }; if (Application.Current.Resources["SYS_DICTIONARY"] == null) { cliet.GetAllSysDictionaryCompleted += (o, e) => { List <T_SYS_DICTIONARY> dicts = new List <T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); if (dicts != null) { Application.Current.Resources.Add("SYS_DICTIONARY", dicts); } }; cliet.GetAllSysDictionaryAsync(); } //TODO: 按需取出字典值 //cliet.GetSysDictionaryByCategoryAsync("CHECKSTATE"); cliet.GetSysDictionaryByCategoryAsync(""); //PermissionServiceClient client = new PermissionServiceClient(); //client.GetSysDictionaryByCategoryByUpdateDateCompleted += (o, e) => //{ // //List<T_SYS_DICTIONARY> dicts = new List<T_SYS_DICTIONARY>(); // //dicts = e.Result == null ? null : e.Result.ToList(); // List<V_Dictionary> viewDicts = e.Result == null ? null : e.Result.ToList(); // List<T_SYS_DICTIONARY> dictionary = new List<T_SYS_DICTIONARY>(); // if (viewDicts != null) // { // foreach (V_Dictionary item in viewDicts) // { // T_SYS_DICTIONARY dictItem = new T_SYS_DICTIONARY(); // dictItem.DICTIONARYID = item.DICTIONARYID; // dictItem.DICTIONARYNAME = item.DICTIONARYNAME; // dictItem.DICTIONARYVALUE = item.DICTIONARYVALUE; // dictItem.DICTIONCATEGORY = item.DICTIONCATEGORY; // if (!string.IsNullOrEmpty(item.FATHERID)) // { // dictItem.T_SYS_DICTIONARY2 = new T_SYS_DICTIONARY(); // dictItem.T_SYS_DICTIONARY2.DICTIONARYID = item.FATHERID; // } // var ent = dictionary.Where(s => s.DICTIONARYID == item.DICTIONARYID).FirstOrDefault(); // if (ent != null) // { // dictionary.Remove(ent); // dictionary.Add(dictItem); // } // else // { // dictionary.Add(dictItem); // } // } // } // if (Application.Current.Resources["SYS_DICTIONARY"] == null) // { // Application.Current.Resources.Add("SYS_DICTIONARY", dictionary); // } // //LoadCompanyInfo(); //}; ////TODO: 按需取出字典值 ////client.GetSysDictionaryByCategoryAsync(""); //DateTime dt = new DateTime(); //client.GetSysDictionaryByCategoryByUpdateDateAsync("", dt); }
protected void LoadDicts() { PermissionServiceClient cliet = new PermissionServiceClient(); cliet.GetSysDictionaryByCategoryCompleted += (o, e) => { List<T_SYS_DICTIONARY> dicts = new List<T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); if (dicts != null) Application.Current.Resources.Add("SYS_DICTIONARY", dicts); }; if (Application.Current.Resources["SYS_DICTIONARY"] == null) { cliet.GetAllSysDictionaryCompleted += (o, e) => { List<T_SYS_DICTIONARY> dicts = new List<T_SYS_DICTIONARY>(); dicts = e.Result == null ? null : e.Result.ToList(); if (dicts != null) Application.Current.Resources.Add("SYS_DICTIONARY", dicts); }; cliet.GetAllSysDictionaryAsync(); } //TODO: 按需取出字典值 //cliet.GetSysDictionaryByCategoryAsync("CHECKSTATE"); cliet.GetSysDictionaryByCategoryAsync(""); //PermissionServiceClient client = new PermissionServiceClient(); //client.GetSysDictionaryByCategoryByUpdateDateCompleted += (o, e) => //{ // //List<T_SYS_DICTIONARY> dicts = new List<T_SYS_DICTIONARY>(); // //dicts = e.Result == null ? null : e.Result.ToList(); // List<V_Dictionary> viewDicts = e.Result == null ? null : e.Result.ToList(); // List<T_SYS_DICTIONARY> dictionary = new List<T_SYS_DICTIONARY>(); // if (viewDicts != null) // { // foreach (V_Dictionary item in viewDicts) // { // T_SYS_DICTIONARY dictItem = new T_SYS_DICTIONARY(); // dictItem.DICTIONARYID = item.DICTIONARYID; // dictItem.DICTIONARYNAME = item.DICTIONARYNAME; // dictItem.DICTIONARYVALUE = item.DICTIONARYVALUE; // dictItem.DICTIONCATEGORY = item.DICTIONCATEGORY; // if (!string.IsNullOrEmpty(item.FATHERID)) // { // dictItem.T_SYS_DICTIONARY2 = new T_SYS_DICTIONARY(); // dictItem.T_SYS_DICTIONARY2.DICTIONARYID = item.FATHERID; // } // var ent = dictionary.Where(s => s.DICTIONARYID == item.DICTIONARYID).FirstOrDefault(); // if (ent != null) // { // dictionary.Remove(ent); // dictionary.Add(dictItem); // } // else // { // dictionary.Add(dictItem); // } // } // } // if (Application.Current.Resources["SYS_DICTIONARY"] == null) // { // Application.Current.Resources.Add("SYS_DICTIONARY", dictionary); // } // //LoadCompanyInfo(); //}; ////TODO: 按需取出字典值 ////client.GetSysDictionaryByCategoryAsync(""); //DateTime dt = new DateTime(); //client.GetSysDictionaryByCategoryByUpdateDateAsync("", dt); }
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); }
public void LoadAll() { permClient.GetSysDictionaryByCategoryAsync(""); }
private void InitParas(string roleID) { ServiceClient = new PermissionServiceClient(); ServiceClient.GetSysDictionaryByCategoryCompleted += new EventHandler<GetSysDictionaryByCategoryCompletedEventArgs>(ServiceClient_GetSysDictionaryByCategoryCompleted); ServiceClient.SysRoleInfoAddCompleted += new EventHandler<SysRoleInfoAddCompletedEventArgs>(SysRoleClient_SysRoleInfoAddCompleted); //ServiceClient.SysRoleInfoUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(SysRoleClient_SysRoleInfoUpdateCompleted); ServiceClient.SysRoleInfoUpdateCompleted += new EventHandler<SysRoleInfoUpdateCompletedEventArgs>(ServiceClient_SysRoleInfoUpdateCompleted); ServiceClient.GetSysRoleSingleInfoByIdCompleted += new EventHandler<GetSysRoleSingleInfoByIdCompletedEventArgs>(SysRoleClient_GetSysRoleSingleInfoByIdCompleted); if (!string.IsNullOrEmpty(roleID)) { tmpRoleId = roleID; //ServiceClient.GetSysRoleByIDAsync(roleID); } //绑定系统类型 ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); if (FormType == FormTypes.New) { SysRole = new T_SYS_ROLE(); this.txtCompanyName.Text = string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].CompanyName) ? "" : Common.CurrentLoginUserInfo.UserPosts[0].CompanyName;//公司名称 StrCompanyID = string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].CompanyID) ? "" : Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;//公司ID this.txtDepartmentName.Text = string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName) ? "" : Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName;//部门名称 this.StrDepartmentID = string.IsNullOrEmpty(Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID) ? "" : Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;//部门ID SysRole.ROLEID = Guid.NewGuid().ToString(); //GetCompanyNameByCompanyID(Common.CurrentLoginUserInfo.UserPosts[0].CompanyID); } }