예제 #1
0
        public static void Main(string[] args)
        {
            Stopwatch stopwatch = Stopwatch.StartNew();

            try
            {
                /*var allCards = GenCards.GenerateAsync().Result;
                 *
                 * if (allCards == null) { Console.WriteLine("Ошибка получения данных..."); return;}
                 *
                 * SaveFileData(allCards);
                 *
                 * GenPins.GenerateAsync(allCards).Wait();*/

                GenReports.GenerateAsync(new List <Report>()
                {
                    new Report()
                    {
                        Name                 = "Аэропорт",
                        Area                 = "aeroport",
                        Type                 = "innovation",
                        ObjectsCount         = 42,
                        OneObjectPeopleCount = 4103,
                        AvgPrice             = 245760,
                        Population           = 172332,
                        PopulationDensity    = 17220,
                        GrafA                = new[]
                        {
                            15000, 15000, 15000, 15000, 16000, 18000, 21000, 22000, 22000, 22000, 22000, 21000, 18000,
                            17000, 16000, 15000, 15000
                        },
                        GrafB1 = new []
                        {
                            70000, 70000, 70000, 70000, 70000, 70000, 70000, 70000, 70000, 70000, 70000, 70000,
                            70000, 70000, 70000, 70000, 70000, 70000, 70000, 70000, 70000, 70000, 70000, 70000,
                        },
                        GrafB2 = new []
                        {
                            100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000,
                            100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000
                        },
                        GrafC  = new [] { 4.77, 2.39, 2.39, 4.77, 54.77, 19.05, 7.15, 4.77 },
                        GrafCT = new [] { "Колледжи", "Технопарки (научный парки академические парки)", "ВУЗ", "Другие",
                                          "Научные организации", "Организации по сертификации/Испытателные лаборатории",
                                          "Центры молодежного инновационного творчества", "Коворкинги" },
                    }
                }).Wait();
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Ошибка формирования файла с технопарками {0}....", ex.Message);
            }

            stopwatch.Stop();
            Console.WriteLine(stopwatch.ElapsedMilliseconds);
        }
예제 #2
0
        public static void WindowNavigation(int NavigationValue, System.Windows.Controls.Frame MainRegion)
        {
            try
            {
                if (NavigationValue != Const.Home && NavigationValue != Const.Logout && NavigationValue != Const.Help &&
                    NavigationValue != Const.About && NavigationValue != Const.InvoiceReport &&
                    NavigationValue != Const.Calc && NavigationValue != Const.IE &&
                    NavigationValue != Const.Outlook &&
                    NavigationValue != Const.Music)
                {
                    Global.DashBoard = false;
                }
                switch (NavigationValue)
                {
                case Const.Home:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new Dashboard(MainRegion));
                    ////MainRegion.Navigate(new Dashboard7R(MainRegion));
                    break;

                case Const.Logout:
                    ////    MainRegion.Navigate(new Login());
                    break;

                case Const.About:
                    new About().ShowDialog();
                    break;

                case Const.Help:
                    ////MainRegion.Navigate(new Dashboard(MainRegion));
                    break;

                case Const.Exit:
                    System.Environment.Exit(0);
                    break;

                case Const.Calc:
                    System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo("calc.exe"));
                    break;

                case Const.Lock:
                    new ScreenLock().ShowDialog();
                    return;

                case Const.IE:
                    System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo("iexplore.exe"));
                    break;

                ////case Const.Skype:
                ////    Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Skype\Phone");
                ////    string skypeLocation = regKey.GetValue("SkypePath").ToString();
                ////    System.Diagnostics.Process.Start(skypeLocation);
                ////    break;
                case Const.Skype:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new IMS.Views.CreditNoteReportView());
                    break;

                case Const.Outlook:
                    System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo("OUTLOOK.exe"));
                    break;

                case Const.Music:
                    System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo("wmplayer.exe"));
                    break;

                case Const.UserMaster:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new User(Global.GlobalPageMode));
                    break;

                case Const.Vendor:
                    MainRegion.Navigate(new Vendor(Global.GlobalPageMode));
                    break;

                case Const.Menu:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new IMS.Views.MenuMaster());
                    break;

                case Const.Product:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new Product(Global.GlobalPageMode));
                    break;

                case Const.Sales:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new Sales(Global.GlobalPageMode));
                    break;

                case Const.Lookup:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new LookupMaster(Global.GlobalPageMode));
                    break;

                case Const.SubLookup:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new SubLookupMaster(Global.GlobalPageMode));
                    break;

                case Const.Purchase:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new Purchase(Global.GlobalPageMode));
                    break;

                case Const.Damage:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new Damage(Global.GlobalPageMode));
                    break;

                case Const.Invoice:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    ////MainRegion.Navigate(new Invoice(Global.GlobalPageMode));
                    MainRegion.Navigate(new InvoiceDetailsMasterSeparate());
                    break;

                case Const.UploadSheet:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new UploadSheet());
                    break;

                case Const.InvoiceReport:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    GenReports objWin = new GenReports();
                    objWin.ShowDialog();
                    break;

                case Const.StatuswiseInvoiceReport:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new InvoiceStatus());
                    break;

                case Const.FinalInvoiceReport:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new FinalInvoice());
                    break;

                case Const.StockReport:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new Stock());
                    break;

                case Const.Category:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new CategoryMaster(Global.GlobalPageMode));
                    break;

                case Const.SubCategory:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new SubCategoryMaster(Global.GlobalPageMode));
                    break;

                case Const.TaxReport:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new TaxReport());
                    break;

                case Const.SalesReport:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new SalesReport());
                    break;

                case Const.InvoicePatch:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new Patch());
                    break;

                case Const.BulkDeleteInvoicePatch:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new BulkDeleteInvoice());
                    break;

                case Const.InvoiceDetailsPatch:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new InvoiceDetailsPatch());
                    break;

                case Const.InvoiceProductPatch:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new InvoiceProductPatch());
                    break;

                case Const.InvoiceSettlementPatch:
                    if (!ChkAccess())
                    {
                        break;
                    }
                    MainRegion.Navigate(new InvoiceSettlementPatch());
                    break;

                default:
                    break;
                }
                Global.GlobalNavigationValue = NavigationValue;
            }
            catch
            {
                UIHelper.ShowErrorMessage("not found");
            }
        }