public void ShowInformation(string AStrAgentID) { #region 当前部门 string LStrOrgFullPath = string.Empty; string LStrCurrentOrgID = string.Empty; IStrAgentID = AStrAgentID; LStrCurrentOrgID = IPageParent.GetAgentParentOrg(AStrAgentID, ref LStrOrgFullPath); if (!string.IsNullOrEmpty(LStrOrgFullPath)) { TextBoxOrg.Tag = LStrCurrentOrgID; TextBoxOrg.Text = LStrOrgFullPath; } #endregion foreach (TreeViewItem LTreeViewItemSingleOrg in IListrTVItemAllOrg) { if (LTreeViewItemSingleOrg.DataContext.ToString() == LStrCurrentOrgID) { LTreeViewItemSingleOrg.IsSelected = true; ExpandParentItem(LTreeViewItemSingleOrg); break; } } ButtonSelectOrg.Visibility = System.Windows.Visibility.Collapsed; #region 其他基本信息 string LStrVerificationCode104 = string.Empty; string LStrAgentCode = string.Empty; string LStrAgentName = string.Empty; string LStrAgentStatus = string.Empty; LStrVerificationCode104 = App.CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104); DataRow[] LDataRowAgent = App.IDataTable11101.Select("C001 = " + AStrAgentID + " AND C002 = 1", "C002 ASC"); LStrAgentCode = LDataRowAgent[0]["C017"].ToString(); LStrAgentCode = EncryptionAndDecryption.EncryptDecryptString(LStrAgentCode, LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104); LStrAgentName = LDataRowAgent[0]["C018"].ToString(); LStrAgentName = EncryptionAndDecryption.EncryptDecryptString(LStrAgentName, LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104); LStrAgentStatus = LDataRowAgent[0]["C012"].ToString(); TextBoxAgentID.Text = LStrAgentCode; TextBoxAgentName.Text = LStrAgentName; if (LStrAgentStatus == "1") { ComboBoxStatus.SelectedIndex = 0; } else { ComboBoxStatus.SelectedIndex = 1; } #endregion }
public void ShowInformation(string AStrAgentID) { int LIntAllParent = 0; int LIntCurrent = 0; string LStrImagesPath = string.Empty; TreeViewItem LTreeViewItemParent = null; List <string> LListStrParentOrg = IPageParent.GetAgentParentOrg(AStrAgentID); ShowOrgUserTreeView(LListStrParentOrg); UCTreeViewYoung LUCTreeViewYoung = GridObjectSelect.Children[0] as UCTreeViewYoung; LStrImagesPath = System.IO.Path.Combine(App.GClassSessionInfo.LocalMachineInfo.StrCommonApplicationData, @"UMP.Client\Themes", App.GClassSessionInfo.ThemeInfo.Name, @"Images\S1103"); TreeViewManager.Items.Clear(); LIntAllParent = LListStrParentOrg.Count - 1; for (LIntCurrent = LIntAllParent; LIntCurrent >= 0; LIntCurrent--) { string[] LStrArrayOrg = LListStrParentOrg[LIntCurrent].Split(App.AscCodeToChr(27).ToCharArray()); TreeViewItem LTreeViewItemOrg = new TreeViewItem(); LTreeViewItemOrg.Header = LStrArrayOrg[1]; LTreeViewItemOrg.DataContext = LStrArrayOrg[0]; if (LStrArrayOrg[0].Substring(3, 5) == App.GClassSessionInfo.RentInfo.Token && LStrArrayOrg[0].Substring(8) == "00000000001") { TreeViewItemProps.SetItemImageName(LTreeViewItemOrg, LStrImagesPath + @"\S1103000.ico"); } else { TreeViewItemProps.SetItemImageName(LTreeViewItemOrg, LStrImagesPath + @"\S1103004.ico"); } if (LTreeViewItemParent == null) { TreeViewManager.Items.Add(LTreeViewItemOrg); LTreeViewItemOrg.IsExpanded = true; } else { LTreeViewItemParent.Items.Add(LTreeViewItemOrg); } LTreeViewItemParent = LTreeViewItemOrg; ShowControlAgentUser(LTreeViewItemParent, LStrArrayOrg[0], LUCTreeViewYoung, AStrAgentID); } }