Пример #1
0
        private void FillApTree()
        {
            APList_AccessPoints = captureInfo.AccessPoints.OrderBy(o => o.SSID).ToArray();

            APList.VirtualListSize = APList_AccessPoints.Length;
            APList.Refresh();
        }
Пример #2
0
//-------------------------------------------------------------------------------------------
    private void BindAP()
    {
        string sums = @"
                    select code as 'Code',
                    'Jan' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 1 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Feb' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 2 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Mar' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 3 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Apr' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 4 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'May' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 5 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Jun' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 6 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Jul' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 7 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Aug' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 8 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Sep' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 9 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Oct' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 10 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Nov' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 11 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Dec' = (select -1 * sum(l.amount) from accounting_ledgeritems l where month(dbo.localizedt(l.postat)) = 12 and l.code = li.code and year(dbo.localizedt(l.postat)) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'Tot' = (select -1 * sum(l.amount) from accounting_ledgeritems l where l.code = li.code and year(l.postat) = @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType)),
                    'TD'  = (select -1 * sum(l.amount) from accounting_ledgeritems l where l.code = li.code and year(l.postat) <= @Year and l.organizationid = @OrganizationId and (l.LedgerType = @LedgerType))
                    from accounting_ledgeritems li
                    where year(dbo.localizedt(postat)) = @Year
                    and li.LedgerType = @LedgerType
                    and li.organizationid = @OrganizationId
                    group by code";

        using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["weavver"].ConnectionString))
        {
            SqlCommand command = new SqlCommand(sums, connection);
            command.Parameters.AddWithValue("OrganizationId", LoggedInUser.OrganizationId);
            command.Parameters.AddWithValue("Year", Int32.Parse(YearFilter.Text));
            command.Parameters.AddWithValue("LedgerType", LedgerType.Payable.ToString());
            connection.Open();
            SqlDataReader reader = command.ExecuteReader();
            APList.DataSource = reader;
            APList.DataBind();
            reader.Close();
        }
    }
Пример #3
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            // Set the data context of the listbox control to the sample data
            DataContext = App.ViewModel;

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
            #region list addings
            MarksmanList.Add("Ashe");
            MarksmanList.Add("Caitlyn");
            MarksmanList.Add("Corki");
            MarksmanList.Add("Draven");
            MarksmanList.Add("Ezreal");
            MarksmanList.Add("Graves");
            MarksmanList.Add("Kog'Maw");
            MarksmanList.Add("Lucian");
            MarksmanList.Add("Miss Fortune");
            MarksmanList.Add("Quinn");
            MarksmanList.Add("Sivir");
            MarksmanList.Add("Teemo");
            MarksmanList.Add("Tristana");
            MarksmanList.Add("Twitch");
            MarksmanList.Add("Urgot");
            MarksmanList.Add("Varus");
            MarksmanList.Add("Vayne");
            MidList.Add("Ahri");
            MidList.Add("Anivia");
            MidList.Add("Annie");
            MidList.Add("Brand");
            MidList.Add("Cassiopeia");
            MidList.Add("Elise");
            MidList.Add("Fiddlesticks");
            MidList.Add("Gragas");
            MidList.Add("Heimerdinger");
            MidList.Add("Karma");
            MidList.Add("Karthus");
            MidList.Add("Kennen");
            MidList.Add("Lissandra");
            MidList.Add("Lux");
            MidList.Add("Malzahar");
            MidList.Add("Morgana");
            MidList.Add("Orianna");
            MidList.Add("Ryze");
            MidList.Add("Swain");
            MidList.Add("Syndra");
            MidList.Add("Twisted Fate");
            MidList.Add("Veigar");
            MidList.Add("Viktor");
            MidList.Add("Vladimir");
            MidList.Add("Xerath");
            MidList.Add("Ziggs");
            MidList.Add("Zyra");
            MidList.Add("Janna");
            MidList.Add("Katarina");
            MidList.Add("Kassadin");
            MidList.Add("Evelynnn");
            MidList.Add("Kog'Maw");
            MidList.Add("LeBlanc");
            MidList.Add("Akali");
            MidList.Add("Jayce");
            MidList.Add("Kha'Zix");
            MidList.Add("Talon");
            MidList.Add("Teemo");
            MidList.Add("Tristana");
            MidList.Add("Zilean");
            MidList.Add("Nidalee");
            MidList.Add("Zed");
            MidList.Add("Sion");
            MidList.Add("Diana");
            MidList.Add("Ezreal");
            MidList.Add("Fizz");
            MidList.Add("Galio");
            MidList.Add("Kayle");
            MidList.Add("Kennen");
            MidList.Add("Lee Sin");
            MidList.Add("Pantheon");
            TopList.Add("Aatrox");
            TopList.Add("Akali");
            TopList.Add("Cho'Gath");
            TopList.Add("Darius");
            TopList.Add("Diana");
            TopList.Add("Elise");
            TopList.Add("Evelynn");
            TopList.Add("Ezreal");
            TopList.Add("Fiora");
            TopList.Add("Fizz");
            TopList.Add("Galio");
            TopList.Add("Gangplank");
            TopList.Add("Garen");
            TopList.Add("Irelia");
            TopList.Add("Jarvan IV");
            TopList.Add("Jax");
            TopList.Add("Jayce");
            TopList.Add("Kayle");
            TopList.Add("Kennen");
            TopList.Add("Kha'Zix");
            TopList.Add("Lee Sin");
            TopList.Add("Lissandra");
            TopList.Add("Malphite");
            TopList.Add("Master Yi");
            TopList.Add("Mordekaiser");
            TopList.Add("Nasus");
            TopList.Add("Nidalee");
            TopList.Add("Olaf");
            TopList.Add("Pantheon");
            TopList.Add("Poppy");
            TopList.Add("Renekton");
            TopList.Add("Rengar");
            TopList.Add("Riven");
            TopList.Add("Rumble");
            TopList.Add("Ryze");
            TopList.Add("Shen");
            TopList.Add("Shyvana");
            TopList.Add("Singed");
            TopList.Add("Sion");
            TopList.Add("Swain");
            TopList.Add("Teemo");
            TopList.Add("Trundle");
            TopList.Add("Tryndamere");
            TopList.Add("Udyr");
            TopList.Add("Vi");
            TopList.Add("Vladimir");
            TopList.Add("Volibear");
            TopList.Add("Warwick");
            TopList.Add("Wukong");
            TopList.Add("Xin Zhao");
            TopList.Add("Yorick");
            TopList.Add("Zac");
            TopList.Add("Zed");
            TopList.Add("Vayne");
            TopList.Add("Tristana");
            SupportList.Add("Alistar");
            SupportList.Add("Janna");
            SupportList.Add("Lulu");
            SupportList.Add("Nami");
            SupportList.Add("Nunu");
            SupportList.Add("Sona");
            SupportList.Add("Soraka");
            SupportList.Add("Taric");
            SupportList.Add("Thresh");
            SupportList.Add("Zilean");
            SupportList.Add("Fiddlesticks");
            SupportList.Add("Leona");
            SupportList.Add("Blitzcrank");
            TankList.Add("Amumu");
            TankList.Add("Blitzcrank");
            TankList.Add("Cho'Gath");
            TankList.Add("Darius");
            TankList.Add("Dr. Mundo");
            TankList.Add("Galio");
            TankList.Add("Gangplank");
            TankList.Add("Garen");
            TankList.Add("Hecarim");
            TankList.Add("Irelia");
            TankList.Add("Jarvan IV");
            TankList.Add("Lee Sin");
            TankList.Add("Leona");
            TankList.Add("Malphite");
            TankList.Add("Maokai");
            TankList.Add("Nasus");
            TankList.Add("Nautilus");
            TankList.Add("Nocturne");
            TankList.Add("Nunu");
            TankList.Add("Olaf");
            TankList.Add("Rammus");
            TankList.Add("Renekton");
            TankList.Add("Sejuani");
            TankList.Add("Shen");
            TankList.Add("Shyvana");
            TankList.Add("Singed");
            TankList.Add("Trundle");
            TankList.Add("Udyr");
            TankList.Add("Vi");
            TankList.Add("Volibear");
            TankList.Add("Warwick");
            TankList.Add("Zac");
            JungleList.Add("Aatrox");
            JungleList.Add("Alistar");
            JungleList.Add("Amumu");
            JungleList.Add("Cho'Gath");
            JungleList.Add("Darius");
            JungleList.Add("Diana");
            JungleList.Add("Dr. Mundo");
            JungleList.Add("Elise");
            JungleList.Add("Evelynn");
            JungleList.Add("Ezreal");
            JungleList.Add("Fiddlesticks");
            JungleList.Add("Gangplank");
            JungleList.Add("Hecarim");
            JungleList.Add("Jarvan IV");
            JungleList.Add("Karthus");
            JungleList.Add("Kha'Zix");
            JungleList.Add("Les Sin");
            JungleList.Add("Malphite");
            JungleList.Add("Maokai");
            JungleList.Add("Master Yi");
            JungleList.Add("Nasus");
            JungleList.Add("Nautilus");
            JungleList.Add("Nocturne");
            JungleList.Add("Nunu");
            JungleList.Add("Olaf");
            JungleList.Add("Pantheon");
            JungleList.Add("Rammus");
            JungleList.Add("Rengar");
            JungleList.Add("Riven");
            JungleList.Add("Sejuani");
            JungleList.Add("Shaco");
            JungleList.Add("Shenn");
            JungleList.Add("Shyvana");
            JungleList.Add("Singed");
            JungleList.Add("Skarner");
            JungleList.Add("Trundle");
            JungleList.Add("Tryndamere");
            JungleList.Add("Twitch");
            JungleList.Add("Udyr");
            JungleList.Add("Vi");
            JungleList.Add("Volibear");
            JungleList.Add("Warwick");
            JungleList.Add("Wukong");
            JungleList.Add("Zac");
            JungleList.Add("Zed");
            APList.Add("Ahri");
            APList.Add("Akali");
            APList.Add("Amumu");
            APList.Add("Anivia");
            APList.Add("Annie");
            APList.Add("Brand");
            APList.Add("Cassiopeia");
            APList.Add("Cho'Gath");
            APList.Add("Diana");
            APList.Add("Elise");
            APList.Add("Evelynn");
            APList.Add("Ezreal");
            APList.Add("Fiddlesticks");
            APList.Add("Fizz");
            APList.Add("Galio");
            APList.Add("Gragas");
            APList.Add("Heimerdinger");
            APList.Add("Janna");
            APList.Add("Karma");
            APList.Add("Karthus");
            APList.Add("Kassadin");
            APList.Add("Katarina");
            APList.Add("Kayle");
            APList.Add("Kennen");
            APList.Add("Kog'MMaw");
            APList.Add("LeBlanc");
            APList.Add("Lissandra");
            APList.Add("Lux");
            APList.Add("Malzahar");
            APList.Add("Maokai");
            APList.Add("Mordekaiser");
            APList.Add("Morgana");
            APList.Add("Nidalee");
            APList.Add("Orianna");
            APList.Add("Rumble");
            APList.Add("Ryze");
            APList.Add("Singed");
            APList.Add("Sion");
            APList.Add("Swain");
            APList.Add("Syndra");
            APList.Add("Teemo");
            APList.Add("Tristana");
            APList.Add("Twisted Fate");
            APList.Add("Veigar");
            APList.Add("Vladimir");
            APList.Add("Xerath");
            APList.Add("Ziggs");
            APList.Add("Zilean");
            APList.Add("Zyra");
            FighterList.Add("Darius");
            FighterList.Add("Diana");
            FighterList.Add("Gangplank");
            FighterList.Add("Garen");
            FighterList.Add("Hecarim");
            FighterList.Add("Blitzcrank");
            FighterList.Add("Irelia");
            FighterList.Add("Jarvan IV");
            FighterList.Add("Jayce");
            FighterList.Add("Kha'Zix");
            FighterList.Add("Lee Sin");
            FighterList.Add("Aatrox");
            FighterList.Add("Fiora");
            FighterList.Add("Jax");
            FighterList.Add("Kayle");
            FighterList.Add("Mordekaiser");
            FighterList.Add("Nasus");
            FighterList.Add("Olaf");
            FighterList.Add("Pantheon");
            FighterList.Add("Poppy");
            FighterList.Add("Talon");
            FighterList.Add("Renekton");
            FighterList.Add("Riven");
            FighterList.Add("Rumble");
            FighterList.Add("Shyvana");
            FighterList.Add("Sion");
            FighterList.Add("Skarner");
            FighterList.Add("Trundle");
            FighterList.Add("Tryndamere");
            FighterList.Add("Udyr");
            FighterList.Add("Vi");
            FighterList.Add("Volibear");
            FighterList.Add("Warwick");
            FighterList.Add("Wukong");
            FighterList.Add("Xin Zhao");
            FighterList.Add("Yorick");
            #endregion
        }