コード例 #1
0
        public PrikazSvihLicenci()
        {
            InitializeComponent();
            LicenseProcessor lp = new LicenseProcessor();
            var obj             = lp.licenseReturn();

            dataGridView1.DataSource = obj.Select(o => new
                                                  { Id = o.Id, Name = o.Type }).ToList();
        }
コード例 #2
0
ファイル: LicenseClub.cs プロジェクト: pKrizic/LeagueAssist
        private void button1_Click(object sender, EventArgs e)
        {
            LicenseProcessor lp = new LicenseProcessor();
            var club            = (Organization)comboBox1.SelectedItem;
            var season          = (Season)comboBox2.SelectedItem;
            var license         = (LeagueAssist.Entities.License)comboBox3.SelectedItem;

            lp.updateClubLicense(licId, club, season, license);
            MessageBox.Show("Dobro je sve.");
        }
コード例 #3
0
ファイル: LicencaSudac.cs プロジェクト: pKrizic/LeagueAssist
        private void button1_Click(object sender, EventArgs e)
        {
            LicenseProcessor lp = new LicenseProcessor();
            var referee         = (LicenseRefereeEvidention)comboBox1.SelectedItem;
            var season          = (Season)comboBox2.SelectedItem;
            var license         = (LeagueAssist.Entities.License)comboBox3.SelectedItem;

            lp.updateRefereeLicense(licId, referee.referee, season, license);
            MessageBox.Show("Dobro je sve.");
        }
コード例 #4
0
        public LicenceSudciIspis()
        {
            InitializeComponent();
            LicenseProcessor lp = new LicenseProcessor();
            var obj             = lp.LicenseRefereeReturn();

            dataGridView1.DataSource = obj.Select(o => new
            {
                Sudac   = o.referee.ToString(),
                Sezona  = o.season.Name,
                Licenca = o.license.Type
            }).ToList();
            //dataGridView1.CellClick += dataGridView1_CellClick;
        }
コード例 #5
0
        public LicenceKlubIspis()
        {
            InitializeComponent();
            LicenseProcessor lp = new LicenseProcessor();
            var obj             = lp.LicenseClubReturn();

            // dataGridView1.AutoGenerateColumns = true;
            dataGridView1.DataSource = obj.Select(o => new
            {
                Klub    = o.Organization.Name,
                Sezona  = o.Season.Name,
                Licenca = o.License.Type
            }).ToList();
        }
コード例 #6
0
        public UnosLicencaSudac()
        {
            InitializeComponent();
            var seasonProcessor  = new SeasonProcessor();
            var licenseProcessor = new LicenseProcessor();

            comboBox1.DataSource    = licenseProcessor.RetrieveReferees();
            comboBox1.DisplayMember = "FirstName";
            comboBox1.ValueMember   = "Id";
            comboBox2.DataSource    = seasonProcessor.RetrieveSeasons();
            comboBox2.DisplayMember = "Name";
            comboBox2.ValueMember   = "Id";
            comboBox3.DataSource    = licenseProcessor.licenseReturn();
            comboBox3.DisplayMember = "Type";
            comboBox3.ValueMember   = "Id";
        }
コード例 #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            string name = textBox1.Text;
            var    comp = (Competition)comboBox1.SelectedItem;

            if (!string.IsNullOrEmpty(textBox1.Text) || !string.IsNullOrEmpty(comboBox1.Text))
            {
                var licenseProcessor = new LicenseProcessor();
                licenseProcessor.saveLicence(name, comp);
                MessageBox.Show("Unos je uspješan!");
            }
            else
            {
                MessageBox.Show("Krivo uneseni podaci.");
            }
        }
コード例 #8
0
        private void button1_Click(object sender, EventArgs e)
        {
            var pers = (Referee)comboBox1.SelectedItem;
            var seas = (Season)comboBox2.SelectedItem;
            var lic  = (LeagueAssist.Entities.License)comboBox3.SelectedItem;

            if (!string.IsNullOrEmpty(comboBox1.Text) || !string.IsNullOrEmpty(comboBox2.Text) || !string.IsNullOrEmpty(comboBox3.Text))
            {
                var licenseProcessor = new LicenseProcessor();
                licenseProcessor.saveRefereeLicense(pers, seas, lic);
                MessageBox.Show("Uspješno dodijeljena licenca.");
            }
            else
            {
                MessageBox.Show("Krivo uneseni podaci.");
            }
        }
コード例 #9
0
        private void button1_Click(object sender, EventArgs e)
        {
            var club    = (Organization)comboBox1.SelectedItem;
            var season  = (Season)comboBox2.SelectedItem;
            var license = (LeagueAssist.Entities.License)comboBox3.SelectedItem;

            if (!string.IsNullOrEmpty(comboBox1.Text) || !string.IsNullOrEmpty(comboBox2.Text) || !string.IsNullOrEmpty(comboBox3.Text))
            {
                LicenseProcessor lp = new LicenseProcessor();
                lp.startLicenseStore(club, season, license);
                MessageBox.Show("Uspjesno uneseni podaci");
            }
            else
            {
                MessageBox.Show("Krivo uneseni podaci");
            }
        }
コード例 #10
0
        public UnosLicencaKlub()
        {
            InitializeComponent();
            ClubProcessor cp = new ClubProcessor();

            comboBox1.DataSource    = cp.RetrieveAllClubs();
            comboBox1.ValueMember   = "Id";
            comboBox1.DisplayMember = "Name";
            SeasonProcessor sp = new SeasonProcessor();

            comboBox2.DataSource    = sp.RetrieveSeasons(DateTime.Now);
            comboBox2.ValueMember   = "Id";
            comboBox2.DisplayMember = "Name";
            LicenseProcessor lp = new LicenseProcessor();

            comboBox3.DataSource    = lp.licenseReturn();
            comboBox3.ValueMember   = "Id";
            comboBox3.DisplayMember = "Type";
        }
コード例 #11
0
ファイル: LicenseClub.cs プロジェクト: pKrizic/LeagueAssist
        public LicenseClub(string id)
        {
            InitializeComponent();
            ClubProcessor    cp = new ClubProcessor();
            SeasonProcessor  sp = new SeasonProcessor();
            LicenseProcessor lp = new LicenseProcessor();

            licId = int.Parse(id);
            comboBox1.DataSource    = cp.RetrieveAllClubs();
            comboBox1.ValueMember   = "Id";
            comboBox1.DisplayMember = "Name";
            comboBox1.SelectedValue = id;
            comboBox2.DataSource    = sp.RetrieveSeasons();
            comboBox2.ValueMember   = "Id";
            comboBox2.DisplayMember = "Name";
            comboBox2.SelectedValue = id;
            comboBox3.DataSource    = lp.licenseReturn();
            comboBox3.ValueMember   = "Id";
            comboBox3.DisplayMember = "Type";
            comboBox3.SelectedValue = id;
        }
コード例 #12
0
        public AddingReferee(string matchId, string competitionId, string seasonId)
        {
            InitializeComponent();
            textBox1.Text = matchId;
            var            licenceProcessor = new LicenseProcessor();
            var            referees         = licenceProcessor.RetrieveReferees();
            var            nes    = licenceProcessor.Repository.GetRefereesWithLicence(int.Parse(seasonId), int.Parse(competitionId));
            List <Referee> podaci = new List <Referee>();

            foreach (var referee in referees)
            {
                if (nes.Contains(referee.Id))
                {
                    podaci.Add(referee);
                }
            }

            comboBox1.DataSource    = podaci;
            comboBox1.ValueMember   = "Id";
            comboBox1.DisplayMember = "LastName";
        }
コード例 #13
0
        public PopisKlubovaILicence()
        {
            InitializeComponent();
            LicenseProcessor lp = new LicenseProcessor();
            var obj             = lp.LicenseClubReturn();

            dataGridView1.DataSource = obj.Select(o => new
                                                  { Id = o.Id, Name = o.Organization.Name, season = o.Season.Name, license = o.License.Type }).ToList();
            dataGridView1.CellClick += dataGridView1_CellClick;
            var buttonCol = new DataGridViewButtonColumn();

            buttonCol.UseColumnTextForButtonValue = true;
            buttonCol.Name       = "ButtonColumnName";
            buttonCol.HeaderText = "";
            buttonCol.Text       = "Uredi licencu";
            dataGridView1.Columns.Add(buttonCol);
            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                DataGridViewButtonCell button = (row.Cells["ButtonColumnName"] as DataGridViewButtonCell);
            }
        }
コード例 #14
0
        /// <summary>
        /// Entry point for the WebJob.
        /// </summary>
        internal static void Main()
        {
            var config = new JobHostConfiguration();

            if (config.IsDevelopment)
            {
                config.UseDevelopmentSettings();
            }

            Core = new CoreService();

            if (!string.IsNullOrEmpty(ApplicationConfiguration.AppInsightsInstrumentationKey))
            {
                ApplicationInsights.Extensibility.TelemetryConfiguration.Active.InstrumentationKey =
                    ApplicationConfiguration.AppInsightsInstrumentationKey;
            }

            CustomerProcessors = GetAvailableCustomerProcessors();

            LicenseProcessor = new LicenseProcessor();

            UsageProcessors = new Dictionary <string, Func <SubscriptionEntity, Task> >()
            {
                { "Direct", (subscription) => new Processors.Direct.UsageProcessor().ProcessAsync(subscription) },
                { "PartnerCenter", (subscription) => new Processors.PartnerCenter.UsageProcessor().ProcessAsync(subscription) }
            };

            // Configure the number of messages to retrieve from the queue at once.
            config.Queues.BatchSize = ApplicationConfiguration.QueueBatchSize;

            // Enable the use of the timer extensions.
            config.UseTimers();

            var host = new JobHost(config);

            host.RunAndBlock();
        }