protected void Button1_Click(object sender, EventArgs e) { //ToppersDAL td = new ToppersDAL(); objBEL = new ExamBEL(); objDAL = new ExamDAL(); objBEL.course = DropDownList1.SelectedValue; objBEL.branch = DropDownList6.SelectedValue; objBEL.year = DropDownList3.SelectedValue; objBEL.sub = DropDownList4.SelectedValue; objBEL.max = TextBox18.Text; objBEL.etype = DropDownList5.SelectedValue; foreach (GridViewRow row in GridView1.Rows) { if (row.RowType == DataControlRowType.DataRow) { TextBox txtrow = (row.Cells[0].FindControl("txtmarks") as TextBox); objBEL.m = txtrow.Text; //objBEL.max = TextBox1.Text; Label nm = (row.Cells[0].FindControl("Label1") as Label); objBEL.name = nm.Text; Label2.Text = objDAL.StoreMarks(objBEL); } } GridView1.DataBind(); GridView2.DataBind(); //td.AddToppers(objBEL); }
protected void Button1_Click(object sender, EventArgs e) { objBEL = new ExamBEL(); objDAL = new ExamDAL(); objBEL.course = DropDownList1.SelectedValue; objBEL.branch = DropDownList2.SelectedValue; objBEL.year = DropDownList3.SelectedValue; objBEL.sub = DropDownList4.SelectedValue; objBEL.date = TextBox1.Text; //objBEL.duration = DropDownList5.SelectedValue; objBEL.etype = DropDownList6.SelectedValue; objBEL.end = DropDownList5.SelectedValue; Label6.Text = objDAL.AddExam(objBEL); GridView1.DataBind(); }