Ejemplo n.º 1
0
        private void ShowOrgUserTreeView(List <string> AListStrParentOrg)
        {
            int          LIntAllParent       = 0;
            int          LIntCurrent         = 0;
            string       LStrImagesPath      = string.Empty;
            TreeViewItem LTreeViewItemParent = null;

            GridObjectSelect.Children.Clear();
            UCTreeViewYoung LUCTreeViewYoung = new UCTreeViewYoung();

            GridObjectSelect.Children.Add(LUCTreeViewYoung);

            LStrImagesPath = System.IO.Path.Combine(App.GClassSessionInfo.LocalMachineInfo.StrCommonApplicationData, @"UMP.Client\Themes", App.GClassSessionInfo.ThemeInfo.Name, @"Images\S1103");
            LIntAllParent  = AListStrParentOrg.Count - 1;
            for (LIntCurrent = LIntAllParent; LIntCurrent >= 0; LIntCurrent--)
            {
                string[] LStrArrayOrg = AListStrParentOrg[LIntCurrent].Split(App.AscCodeToChr(27).ToCharArray());

                TreeViewItem LTreeViewItemOrg = LUCTreeViewYoung.AddTreeViewItem(LTreeViewItemParent, false, LStrImagesPath + @"\S1103004.ico", LStrArrayOrg[1], LStrArrayOrg[0]);
                LTreeViewItemParent = LTreeViewItemOrg;

                ShowMyControlUser(LTreeViewItemParent, LStrArrayOrg[0], LUCTreeViewYoung);
                LTreeViewItemParent.IsExpanded = true;
            }
        }
Ejemplo n.º 2
0
        private void ShowMyControlUser(TreeViewItem ATreeViewItem, string AStrOrgID, UCTreeViewYoung AUCTreeViewYoung)
        {
            string LStrUserID              = string.Empty;
            string LStrUserAccount         = string.Empty;
            string LStrUserName            = string.Empty;
            string LStrVerificationCode104 = string.Empty;
            string LStrImagesPath          = string.Empty;

            LStrVerificationCode104 = App.CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104);
            LStrImagesPath          = System.IO.Path.Combine(App.GClassSessionInfo.LocalMachineInfo.StrCommonApplicationData, @"UMP.Client\Themes", App.GClassSessionInfo.ThemeInfo.Name, @"Images\S1103");
            DataRow[] LDataRowUsers = App.IDataTable11005.Select("C006 = " + AStrOrgID, "C001 ASC");
            foreach (DataRow LDataRowSingleUser in LDataRowUsers)
            {
                LStrUserID = LDataRowSingleUser["C001"].ToString();
                if (App.IDataTable11201UU.Select("C004 = " + LStrUserID).Length <= 0)
                {
                    continue;
                }
                LStrUserAccount = LDataRowSingleUser["C002"].ToString();
                LStrUserAccount = EncryptionAndDecryption.EncryptDecryptString(LStrUserAccount, LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104);
                LStrUserName    = LDataRowSingleUser["C003"].ToString();
                LStrUserName    = EncryptionAndDecryption.EncryptDecryptString(LStrUserName, LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104);

                TreeViewItem LTreeViewItemUser = AUCTreeViewYoung.AddTreeViewItem(ATreeViewItem, false, LStrImagesPath + @"\S1103005.png", LStrUserAccount + " (" + LStrUserName + ")", LStrUserID);
            }
        }
Ejemplo n.º 3
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            UCTreeViewYoung LUCTreeView         = GridTreeView.Children[0] as UCTreeViewYoung;
            List <object>   LListObjectSelected = LUCTreeView.GetCheckedOrUnCheckedItem("0");

            return;
        }
        public void ShowInformation(string AStrAgentID)
        {
            string LStrSkillID             = string.Empty;
            string LStrSkillCode           = string.Empty;
            string LStrSkillName           = string.Empty;
            string LStrVerificationCode104 = string.Empty;

            try
            {
                ShowSkillGroupTreeView();
                UCTreeViewYoung LUCTreeViewYoung = GridObjectSelect.Children[0] as UCTreeViewYoung;
                ObjectListView.Items.Clear();
                LStrVerificationCode104 = App.CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104);
                DataRow[] LDataRowSA = App.IDataTable11201SA.Select("C004 = " + AStrAgentID, "C003 ASC");
                foreach (DataRow LDataRowSingleSkill in LDataRowSA)
                {
                    LStrSkillID = LDataRowSingleSkill["C003"].ToString();
                    DataRow[] LDataRowSkill = App.IDataTable11009.Select("C001 = " + LStrSkillID);
                    LStrSkillCode = LDataRowSkill[0]["C006"].ToString();
                    LStrSkillName = LDataRowSkill[0]["C008"].ToString();
                    LStrSkillCode = EncryptionAndDecryption.EncryptDecryptString(LStrSkillCode, LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104);
                    ListViewItem LListViewItemSkill = new ListViewItem();
                    LListViewItemSkill.Content = new ObjctColumnDefine(LStrSkillID, LStrSkillCode, LStrSkillName, "");
                    LListViewItemSkill.Height  = 26;
                    LListViewItemSkill.Margin  = new Thickness(0, 1, 0, 1);
                    ObjectListView.Items.Add(LListViewItemSkill);
                    LUCTreeViewYoung.SetItemCheckedStatus(true, LStrSkillID);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
        public List <string> GetElementSettedData()
        {
            List <string> LListStrReturn = new List <string>();

            UCTreeViewYoung LUCTreeViewYoung    = GridObjectSelect.Children[0] as UCTreeViewYoung;
            List <object>   LListObjectSelected = LUCTreeViewYoung.GetCheckedOrUnCheckedItem("1");

            foreach (object LObjectSingle in LListObjectSelected)
            {
                LListStrReturn.Add("S00" + App.AscCodeToChr(27) + LObjectSingle.ToString());
            }

            return(LListStrReturn);
        }
Ejemplo n.º 6
0
        public List <string> GetElementSettedData()
        {
            List <string> LListStrReturn = new List <string>();

            UCTreeViewYoung LUCTreeViewYoung = GridObjectSelect.Children[0] as UCTreeViewYoung;

            LUCTreeViewYoung.SetItemCheckedStatus(true, "102" + App.GClassSessionInfo.RentInfo.Token + "00000000001");
            LUCTreeViewYoung.SetItemCheckedStatus(true, App.GClassSessionInfo.UserInfo.UserID.ToString());

            List <object> LListObjectSelected = LUCTreeViewYoung.GetCheckedOrUnCheckedItem("1");

            foreach (object LObjectSingle in LListObjectSelected)
            {
                LListStrReturn.Add("U00" + App.AscCodeToChr(27) + LObjectSingle.ToString());
            }

            return(LListStrReturn);
        }
Ejemplo n.º 7
0
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            PFShareControls.UCTreeViewYoung LUCTreeViewYoung = new UCTreeViewYoung();
            GridTreeView.Children.Add(LUCTreeViewYoung);

            TreeViewItem LTreeViewItemRoot1 = LUCTreeViewYoung.AddTreeViewItem(null, false, @"C:\ProgramData\UMP.Client\Themes\Style04\Images\S1103\S1103000.ico", "RootItem1", 1020000000000000001);

            TreeViewItem LTreeViewItemSub101 = LUCTreeViewYoung.AddTreeViewItem(LTreeViewItemRoot1, false, @"C:\ProgramData\UMP.Client\Themes\Style04\Images\S1103\S1103000.ico", "SubItem101", 1020000000000000002);
            TreeViewItem LTreeViewItemSub102 = LUCTreeViewYoung.AddTreeViewItem(LTreeViewItemRoot1, false, @"C:\ProgramData\UMP.Client\Themes\Style04\Images\S1103\S1103000.ico", "SubItem102", 1020000000000000003);

            TreeViewItem LTreeViewItemRoot2 = LUCTreeViewYoung.AddTreeViewItem(null, false, @"C:\ProgramData\UMP.Client\Themes\Style04\Images\S1103\S1103000.ico", "RootItem1", 1020000000000000101);

            //TreeViewItem LTreeViewItemSub201 = LUCTreeViewYoung.AddTreeViewItem(LTreeViewItemRoot2, true, @"C:\ProgramData\UMP.Client\Themes\Style04\Images\S1103\S1103000.ico", "SubItem101", 1020000000000000102);
            //TreeViewItem LTreeViewItemSub202 = LUCTreeViewYoung.AddTreeViewItem(LTreeViewItemRoot2, false, @"C:\ProgramData\UMP.Client\Themes\Style04\Images\S1103\S1103000.ico", "SubItem102", 1020000000000000103);

            LUCTreeViewYoung.SetItemCheckedStatus(true, 1020000000000000003);
            LUCTreeViewYoung.SetItemCheckedStatus(true, 1020000000000000101);
        }
Ejemplo n.º 8
0
        public void ShowInformation(List <string> AListStrParentOrg, string AStrAgentID)
        {
            int          LIntAllParent       = 0;
            int          LIntCurrent         = 0;
            string       LStrImagesPath      = string.Empty;
            TreeViewItem LTreeViewItemParent = null;

            TreeViewManager.Items.Clear();

            ShowOrgUserTreeView(AListStrParentOrg);

            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 = AListStrParentOrg.Count - 1;
            for (LIntCurrent = LIntAllParent; LIntCurrent >= 0; LIntCurrent--)
            {
                string[] LStrArrayOrg = AListStrParentOrg[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);
            }
        }
        private void ShowSkillGroupTreeView()
        {
            string LStrSkillID             = string.Empty;
            string LStrSkillCode           = string.Empty;
            string LStrSkillName           = string.Empty;
            string LStrVerificationCode104 = string.Empty;
            string LStrImagesPath          = string.Empty;

            LStrVerificationCode104 = App.CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104);
            LStrImagesPath          = System.IO.Path.Combine(App.GClassSessionInfo.LocalMachineInfo.StrCommonApplicationData, @"UMP.Client\Themes", App.GClassSessionInfo.ThemeInfo.Name, @"Images\S1100\S1100005.png");
            GridObjectSelect.Children.Clear();
            UCTreeViewYoung LUCTreeViewYoung = new UCTreeViewYoung();

            GridObjectSelect.Children.Add(LUCTreeViewYoung);
            foreach (DataRow LDataRowSingleSkillGroup in App.IDataTable11009.Rows)
            {
                LStrSkillID   = LDataRowSingleSkillGroup["C001"].ToString();
                LStrSkillCode = LDataRowSingleSkillGroup["C006"].ToString();
                LStrSkillName = LDataRowSingleSkillGroup["C008"].ToString();
                LStrSkillCode = EncryptionAndDecryption.EncryptDecryptString(LStrSkillCode, LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104);
                TreeViewItem LTreeViewItemSkillGroup = LUCTreeViewYoung.AddTreeViewItem(null, false, LStrImagesPath, LStrSkillCode + " (" + LStrSkillName + ")", LStrSkillID);
            }
        }
Ejemplo n.º 10
0
        private void ShowControlAgentUser(TreeViewItem ATreeViewItem, string AStrOrgID, UCTreeViewYoung AUCTreeViewYoung, string AStrAgentID)
        {
            string LStrUserID              = string.Empty;
            string LStrUserAccount         = string.Empty;
            string LStrUserName            = string.Empty;
            string LStrVerificationCode104 = string.Empty;
            string LStrImagesPath          = string.Empty;

            LStrVerificationCode104 = App.CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104);
            LStrImagesPath          = System.IO.Path.Combine(App.GClassSessionInfo.LocalMachineInfo.StrCommonApplicationData, @"UMP.Client\Themes", App.GClassSessionInfo.ThemeInfo.Name, @"Images\S1103");
            DataRow[] LDataRowOrgUsers = App.IDataTable11005.Select("C006 = " + AStrOrgID, "C001 ASC");
            foreach (DataRow LDataRowSingleOrgUser in LDataRowOrgUsers)
            {
                LStrUserID = LDataRowSingleOrgUser["C001"].ToString();
                if (App.IDataTable11201UA.Select("C003 = " + LStrUserID + " AND C004 = " + AStrAgentID).Length <= 0)
                {
                    continue;
                }
                LStrUserAccount = LDataRowSingleOrgUser["C002"].ToString();
                LStrUserAccount = EncryptionAndDecryption.EncryptDecryptString(LStrUserAccount, LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104);
                LStrUserName    = LDataRowSingleOrgUser["C003"].ToString();
                LStrUserName    = EncryptionAndDecryption.EncryptDecryptString(LStrUserName, LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104);

                TreeViewItem LTreeViewItemUser = new TreeViewItem();
                LTreeViewItemUser.Header      = LStrUserAccount + " (" + LStrUserName + ")";
                LTreeViewItemUser.DataContext = LStrUserID;
                TreeViewItemProps.SetItemImageName(LTreeViewItemUser, LStrImagesPath + @"\S1103005.png");
                ATreeViewItem.Items.Add(LTreeViewItemUser);
                AUCTreeViewYoung.SetItemCheckedStatus(true, LStrUserID);
            }
            //AUCTreeViewYoung.SetItemCheckedDisabled(false, "102" + App.GClassSessionInfo.RentInfo.Token + "00000000001");
            //AUCTreeViewYoung.SetItemCheckedDisabled(false, App.GClassSessionInfo.UserInfo.UserID.ToString());
        }