//查看奖品 private void PrizesList_Click(object sender, EventArgs e) { List <string> strUsersList = Moon.GetPizesList(); //获取奖品列表 DataTable dt = new DataTable("Table_Pizes"); DataColumn dc1 = new DataColumn("奖品", System.Type.GetType("System.String")); dt.Columns.Add(dc1); //把奖品数据保存到DataTable foreach (string str in strUsersList) { dt.Rows.Add(str); } //在新窗口显示奖品列表 DataView_Grid dvg = new DataView_Grid(dt, (int)DataType.PrizeList); dvg.Show(); }
//查看用户 private void UsersList_Click(object sender, EventArgs e) { List <string> strUsersList = Moon.GetUsersList(); //获取用户列表 DataTable dt = new DataTable("Table_Users"); DataColumn dc = new DataColumn("参与者", System.Type.GetType("System.String")); dt.Columns.Add(dc); //把用户数据保存到DataTable foreach (string str in strUsersList) { dt.Rows.Add(str); } //在新窗口显示用户列表 DataView_Grid dvg = new DataView_Grid(dt, (int)DataType.UserList); dvg.Show(); }