public void Update(GameTime gameTime) { int TimeLeft = Game.peach.PlayerStats.TimeRemainingGradeRoom; if (Game.level.DelayUpdate > 180 && TimeLeft > Constants.ZERO) { AGrade aGrade = new AGrade(Game.Content, Game.GraphicsDevice) { Location = new Vector2(randomLocation.Next(Constants.ZERO, 3000), 1900), Visible = true, Checkable = true }; BGrade bGrade = new BGrade(Game.Content, Game.GraphicsDevice) { Location = new Vector2(randomLocation.Next(Constants.ZERO, 3000), 1900), Visible = true, Checkable = true }; CGrade cGrade = new CGrade(Game.Content, Game.GraphicsDevice) { Location = new Vector2(randomLocation.Next(Constants.ZERO, 3000), 1900), Visible = true, Checkable = true }; DGrade dGrade = new DGrade(Game.Content, Game.GraphicsDevice) { Location = new Vector2(randomLocation.Next(Constants.ZERO, 3000), 1900), Visible = true, Checkable = true }; FGrade fGrade = new FGrade(Game.Content, Game.GraphicsDevice) { Location = new Vector2(randomLocation.Next(Constants.ZERO, 3000), 1900), Visible = true, Checkable = true }; aGrade.Sprite.Velocity = new Vector2(Constants.ZERO, randomVelocity.Next(100, 500)); bGrade.Sprite.Velocity = new Vector2(Constants.ZERO, randomVelocity.Next(100, 500)); cGrade.Sprite.Velocity = new Vector2(Constants.ZERO, randomVelocity.Next(100, 500)); dGrade.Sprite.Velocity = new Vector2(Constants.ZERO, randomVelocity.Next(100, 500)); fGrade.Sprite.Velocity = new Vector2(Constants.ZERO, randomVelocity.Next(100, 500)); Game.level.Entities.Add(aGrade); Game.level.Entities.Add(cGrade); Game.level.Entities.Add(dGrade); Game.level.Entities.Add(fGrade); Game.level.Entities.Add(bGrade); Collections.Instance.GetCollisionRef().ReRegister(aGrade); Collections.Instance.GetCollisionRef().ReRegister(bGrade); Collections.Instance.GetCollisionRef().ReRegister(cGrade); Collections.Instance.GetCollisionRef().ReRegister(dGrade); Collections.Instance.GetCollisionRef().ReRegister(fGrade); Game.level.DelayUpdate = Constants.ZERO; } }
private void Show() { DataRow row = _grade.FillPlaceHolderControlsById(Request["id"]); if (row == null) return; DGrade dGrade = new DGrade(); DSchool dSchool = new DSchool(); //取得學校名稱 String schoolAllName = dSchool.GetNameBySchoolId(row["school_id"].ToString()); schoolName.Text = schoolAllName; //取得班級名稱 GradeName.Text = dGrade.GetShortGradeNameById((int) row["id"]); //學校班級名稱 AllName.Text = dGrade.GetFullGradeNameById((int) row["id"]); //取得班級人數 String gradeStudentCount = dGrade.GetGradeCountById((int) row["id"]); GradeStudentCount.Text = gradeStudentCount; description.Text = My.WebForm.TXT2HTML(description.Text); enable.Text = enable.Text.ToScodeEnableName(); }
//秀出所有學校名單(下拉式選單) private void Show() { DGrade dGrade = new DGrade(); DataRow row = _grade.FillPlaceHolderControlsById(Request["id"]); //取得學校名稱 DSchool dSchool = new DSchool(); schoolName.Text = dSchool.GetNameBySchoolId(row["school_id"].ToString()); AllName.Text = dGrade.GetFullGradeNameById((int)row["id"]); }
private void Show() { DataTable dt = dl.GetTeacherByGradeID(Request["id"]); gvList.DataSource = dt; gvList.DataBind(); EasyDataProvide Grade = new EasyDataProvide("Grade"); DataRow row = Grade.GetById(Request["ID"]); DGrade dGrade = new DGrade(); AllName.Text = dGrade.GetFullGradeNameById((int)row["id"]); }
protected void Show() { EasyDataProvide Grade = new EasyDataProvide("Grade"); DataRow row = Grade.GetById(Request["ID"]); if(row==null) return; DataTable dt = dl.GetStudentList(row["school_id"].ToString(), Request["ID"], "", "", "-1", "-1", "-1", "", "order by SeatNumber asc", 70, 1); gvList.DataSource = dt; gvList.DataBind(); DGrade dGrade = new DGrade(); AllName.Text = dGrade.GetFullGradeNameById((int)row["id"]); }
private void Show() { Person person = new Person(); DStudent dStudent =new DStudent(person.people_id); string GradeId = dStudent.GradeID; DGrade dGrade = new DGrade(); if(person.Role == Person.LoginRole.Teacher) { GradeId = Request["grade_id"]; } lblGradeName.Text = dGrade.GetShortGradeNameById(Convert.ToInt16(GradeId)); DataTable dt = dl.GetStudentList(person.School_id, GradeId, "", "", "-1", "-1", "-1", "", "order by SeatNumber asc", 70, 1); Repeater1.DataSource = dt; Repeater1.DataBind(); }
private void ShowGrade() { Person myPerson = new Person(); DGrade grade=new DGrade(); DataTable dt = grade.GeGradeFullNameListBySchoolID(myPerson.School_id); ddlGrade.DataTextField = "gradeName"; ddlGrade.DataValueField = "id"; ddlGrade.DataSource = dt; ddlGrade.DataBind(); }