Пример #1
0
    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);
        }
    }
Пример #2
0
    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);
        }
    }