Esempio n. 1
0
 protected void getInfo(String username)
 {
     studentList            = studentbll.GetList(" Username='******' ").Tables[0];
     name.Value             = studentList.Rows[0][2].ToString();
     gender.Value           = studentList.Rows[0][3].ToString();
     idno.Value             = studentList.Rows[0][4].ToString();
     birthdate.Value        = studentList.Rows[0][5].ToString();
     nationality.Value      = studentList.Rows[0][6].ToString();
     city.Value             = studentList.Rows[0][7].ToString();
     address.Value          = studentList.Rows[0][8].ToString();
     zipcode.Value          = studentList.Rows[0][9].ToString();
     qqno.Value             = studentList.Rows[0][10].ToString();
     phone.Value            = studentList.Rows[0][11].ToString();
     email.Value            = studentList.Rows[0][12].ToString();
     famaddress.Value       = studentList.Rows[0][13].ToString();
     preferedprogram.Value  = studentList.Rows[0][16].ToString();
     altprogram.Value       = studentList.Rows[0][17].ToString();
     graduated.Value        = studentList.Rows[0][18].ToString();
     major.Value            = studentList.Rows[0][19].ToString();
     gradtime.Value         = studentList.Rows[0][20].ToString();
     starttime.Value        = studentList.Rows[0][21].ToString();
     englishskill.Value     = studentList.Rows[0][22].ToString();
     gpa.Value              = studentList.Rows[0][23].ToString();
     workexp.Value          = studentList.Rows[0][24].ToString();
     rewardspunisment.Value = studentList.Rows[0][25].ToString();
     famzipcode.Value       = studentList.Rows[0][26].ToString();
     politic.Value          = studentList.Rows[0][27].ToString();
 }
Esempio n. 2
0
        protected void Searchbtn_Click(object sender, EventArgs e)
        {
            Interwebsite.BLL.Student studentbll = new Interwebsite.BLL.Student();
            string wherestr = DropDownList1.SelectedValue;

            if (wherestr == "用户名")
            {
                wherestr = "Username";
            }
            if (wherestr == "真实姓名")
            {
                wherestr = "Realname";
            }

            string selectstr = SearchTextBox.Text;

            GridView.DataSource = studentbll.GetList(wherestr + "='" + selectstr + "'");
            GridView.DataBind();
        }