protected void Button2_Click(object sender, EventArgs e) { gid = Convert.ToInt32(Request.QueryString["GRADEID"].ToString()); DataSet1TableAdapters.StdGradesTableAdapter dt = new DataSet1TableAdapters.StdGradesTableAdapter(); dt.UpdateNot(byte.Parse(TxtStdExam1.Text), byte.Parse(TxtStdExam2.Text), byte.Parse (TxtStdExam3.Text), decimal.Parse(TxtAvg.Text), bool.Parse(TxtStdStat.Text), gid); Response.Redirect("GradeList.aspx"); }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { gid = Convert.ToInt32(Request.QueryString["GRADEID"].ToString()); DataSet1TableAdapters.StdGradesTableAdapter dt = new DataSet1TableAdapters.StdGradesTableAdapter(); TxtStdID.Text = dt.GetGrade2(gid)[0].STUDID.ToString(); TxtStdName.Text = dt.GetGrade2(gid)[0].STUDENTFULLNAME; TxtLessonName.Text = dt.GetGrade2(gid)[0].LESSONNAME; TxtStdExam1.Text = dt.GetGrade2(gid)[0].EXAM1.ToString(); TxtStdExam2.Text = dt.GetGrade2(gid)[0].EXAM2.ToString(); TxtStdExam3.Text = dt.GetGrade2(gid)[0].EXAM3.ToString(); TxtAvg.Text = dt.GetGrade2(gid)[0].AVERAGE.ToString(); TxtStdStat.Text = dt.GetGrade2(gid)[0].SITUATION.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { DataSet1TableAdapters.StdGradesTableAdapter dt = new DataSet1TableAdapters.StdGradesTableAdapter(); Repeater1.DataSource = dt.GetGrades(); Repeater1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { DataSet1TableAdapters.StdGradesTableAdapter dt = new DataSet1TableAdapters.StdGradesTableAdapter(); Repeater1.DataSource = dt.StudentGrade(Session["STUDENTNUMBER"].ToString()); Repeater1.DataBind(); }