Ejemplo n.º 1
0
        protected override void OnPrimaryKeyChangedComplete(Exception error)
        {
            if (error != null)
            {
                RTOut.WriteError(error);
                throw error;
            }

            XElement target = PackagesData.XPathSelectElement("Package[TargetType='Guest' and RefTagID='0']");

            tabGuest.Tag = CreateGadgetPackageRecord(target);

            target         = PackagesData.XPathSelectElement("Package[TargetType='Teacher'  and RefTagID='0']");
            tabTeacher.Tag = CreateGadgetPackageRecord(target);

            target         = PackagesData.XPathSelectElement("Package[TargetType='Student' and RefTagID='0']");
            tabStudent.Tag = CreateGadgetPackageRecord(target);

            target        = PackagesData.XPathSelectElement("Package[TargetType='Parent' and RefTagID='0']");
            tabParent.Tag = CreateGadgetPackageRecord(target);

            target       = PackagesData.XPathSelectElement("Package[TargetType='Administrator' and RefTagID='0']");
            tabAdmin.Tag = CreateGadgetPackageRecord(target);

            foreach (SuperTabItem item in tabs.Tabs)
            {
                item.Visible = !(item.Tag == null);
            }
            tabs.RecalcLayout();

            PuplateTabData(tabs.SelectedTab);
        }
Ejemplo n.º 2
0
        public static ProxyPackageInfoV2 FindPackage(
            this AbstractSdkEventV2 sdkEvent,
            IEnumerable <ProxyPackageInfoV2> packages
            )
        {
            IEnumerable <PackagesData> packagesDatas = packages.AllPackagesData();

            PackagesData packagesData = sdkEvent.FindPackagesData(packagesDatas);

            return(packagesData.FindPackage(packages));
        }
Ejemplo n.º 3
0
        public static ReportsData FindReportsData(
            this AbstractSdkEventV2 sdkEvent,
            IEnumerable <ReportsData> reportsDatas
            )
        {
            IEnumerable <PackagesData> packagesDatas = reportsDatas.AllPackagesDatas();

            PackagesData packagesData = sdkEvent.FindPackagesData(packagesDatas);

            return(packagesData.FindReportsData(reportsDatas));
        }
Ejemplo n.º 4
0
        public static ProxyPackageInfoV2 FindPackage(
            this PackagesData packagesData,
            IEnumerable <ProxyPackageInfoV2> packages
            )
        {
            IEnumerable <ReportsData> reportsDatas = packages.AllReportsDatas();

            ReportsData reportsData = packagesData.FindReportsData(reportsDatas);

            return(reportsData.FindPackage(packages));
        }
Ejemplo n.º 5
0
        public static ReportsData FindReportsData(
            this PackagesData packagesData,
            IEnumerable <ReportsData> reportsDatas
            )
        {
            foreach (ReportsData reportsData in reportsDatas)
            {
                PackagesData[] packagesDatas = reportsData.Packages;

                if (packagesDatas.Contains(packagesData))
                {
                    return(reportsData);
                }
            }

            return(null);
        }