protected void GVStudent_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("ChangePwd")) { int mySid = Convert.ToInt32(e.CommandArgument.ToString()); string myPwd = LearnSite.Common.WordProcess.GenerateRandomNum(2); LearnSite.BLL.Students bll = new LearnSite.BLL.Students(); bll.UpdateSidPwd(mySid.ToString(), myPwd); ShowStudents(); string ch = "你的新密码是:" + myPwd; LearnSite.Common.WordProcess.Alert(ch, this.Page); } if (e.CommandName.Equals("ChangeGroup")) { int mySid = Convert.ToInt32(e.CommandArgument.ToString()); LearnSite.BLL.Students bll = new LearnSite.BLL.Students(); bll.ChangeSleader(mySid); System.Threading.Thread.Sleep(300); ShowStudents(); } if (e.CommandName.Equals("QuitGroup")) { int mySid = Convert.ToInt32(e.CommandArgument.ToString()); LearnSite.BLL.Students bll = new LearnSite.BLL.Students(); bll.QuitThitGroup(mySid); System.Threading.Thread.Sleep(300); ShowStudents(); } }