コード例 #1
0
ファイル: Program.cs プロジェクト: shreedhar-ww/IPLFinalCode
        public static void getSchedule()
        {
            IPLSchedule user = new IPLSchedule();
            sortPaging  sr   = new sortPaging();

            sr.pageNumber = 1;
            sr.pageSize   = 100;
            user.getSchedule(sr);

            user.getBidQuestion(1);
        }
コード例 #2
0
        private void Execute(IPLSchedule schedule)
        {
            _eventAggregator.GetEvent <MatchNoEvent>().Publish(schedule.MatchNo);

            var parameters = new NavigationParameters();

            parameters.Add("schedule", schedule);

            if (schedule != null)
            {
                _regionManger.RequestNavigate("MainRegion", "ScoreDetailsView", parameters);
            }
        }
コード例 #3
0
        public void InsertDBFPLTeamTotalPoints(ObservableCollection <FPLTeamTotalPoints> FPLTeamPoints, IPLSchedule IPLSchedule)
        {
            SqlConnection conn;
            string        connectionString = @"Data Source = localhost\SQLEXPRESS;Trusted_Connection=True; Initial Catalog = FPL_DB;";

            SqlConnection connection = new SqlConnection(connectionString);


            using (conn = new SqlConnection(connectionString))
            {
                conn.Open();
                string queryInsert = "INSERT INTO FPLTeamPoints (TeamName, TeamPoints,Date,MatchNo,Match,Matchyear) " +
                                     "VALUES (@TeamName,@TeamPoints,@Date,@MatchNo,@Match,@Matchyear)";
                using (SqlCommand query = new SqlCommand(queryInsert))
                {
                    query.Connection = conn;

                    foreach (var item in FPLTeamPoints)
                    {
                        //query.Parameters.Add("@ID", SqlDbType.Int, 150).Value =;
                        query.Parameters.Add("@TeamName", SqlDbType.NVarChar, 150).Value = item.FPLTeam;
                        query.Parameters.Add("@TeamPoints", SqlDbType.Int, 150).Value    = item.Points;
                        query.Parameters.Add("@Date", SqlDbType.NVarChar, 150).Value     = IPLSchedule.Date;
                        query.Parameters.Add("@MatchNo", SqlDbType.Int, 150).Value       = IPLSchedule.MatchNo;
                        query.Parameters.Add("@Match", SqlDbType.NVarChar, 250).Value    = IPLSchedule.Match;
                        query.Parameters.Add("@Matchyear", SqlDbType.Int, 250).Value     = 2021;
                        query.ExecuteNonQuery();
                    }
                }
                conn.Close();
            }
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: shreedhar-ww/IPLFinalCode
        public static void UpdateBidStatus()
        {
            IPLSchedule user = new IPLSchedule();

            user.updateBidStatusAndCalculatePoint(1, 10, false, 1);
        }