protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView1.SetActiveView(View2); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max(aid) from auditorium"; TextBox1.Text = a.max_id(cmd).ToString(); cmd.CommandText = "select * from auditorium"; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); cmd.CommandText = "select max(act_no) from account"; act_no = a.max_acct(cmd); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max(uid) from user_reg"; uid = a.max_id(cmd); cmd.CommandText = "select max(act_no) from account"; act_no = a.max_acct(cmd); } }