Esempio n. 1
0
        private void LoadMissionList(int recomLvl)
        {
            List <MissionData> misdatalist = MissionData.GetMisList(recomLvl);

            dtMission = new DataTable();
            dtMission.Columns.Add("MissionId", typeof(int));
            dtMission.Columns.Add("IP Address", typeof(string));
            dtMission.Columns.Add("Mission Name", typeof(string));
            dtMission.Columns.Add("Recommended Level", typeof(string));

            foreach (MissionData misdata in misdatalist)
            {
                dtMission.Rows.Add(misdata.MissionId, misdata.MissionIP, misdata.MissionName, misdata.RecommendLevel);
            }

            AtkListView.DataSource = dtMission;
            AtkListView.DataBind();
        }
Esempio n. 2
0
        private void LoadMissionView()
        {
            List <MissionData> misList = MissionData.GetMisList(-1);
            DataTable          dt      = new DataTable();

            dt.Columns.Add("MissionID", typeof(int));
            dt.Columns.Add("MissionName", typeof(string));
            dt.Columns.Add("MissionIP", typeof(string));
            if (misList.Count != 0)
            {
                foreach (MissionData m in misList)
                {
                    dt.Rows.Add(m.MissionId, m.MissionName, m.MissionIP);
                }

                AdminMissionView.DataSource = dt;
                AdminMissionView.DataBind();
            }
        }