protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string aID;
            int    iD = 1;

            iD  = iD + 1;
            aID = iD.ToString();
            int    pNum      = Convert.ToInt32(txPH.Text);
            string firstName = txFname.Text;
            string lastName  = txLname.Text;
            string email     = txMail.Text;
            string passWord  = txPw.Text;
            //string adminID = Convert.ToString(aID);
            BusLayer busLayer = new BusLayer();

            try
            {
                busLayer.InsertAdminDet(aID, firstName, lastName, email, pNum, passWord);
                GridTest.DataSource = busLayer.SelectAdminDet();
                GridTest.DataBind();

                if (Page.IsValid)
                {
                    Response.Redirect("AdminLogIn.aspx");
                }
            }
            catch
            {
                Response.Redirect("ErrorPage.aspx");
            }
        }
Beispiel #2
0
 /// <summary>绑定Grid列表
 /// 绑定Grid列表
 /// </summary>
 /// <param name="OrderRegisterList">数据源LIST集合</param>
 private void BindGridTest(List <OrderRegister> OrderRegisterList)
 {
     GridTest.DataSource = OrderRegisterList;
     try
     {
         GridTest.DataBind();
     }
     catch (Exception) { }
 }
Beispiel #3
0
 /// <summary>绑定Grid列表
 /// 绑定Grid列表
 /// </summary>
 /// <param name="OrderRegisterList">数据源LIST集合</param>
 private void BindGridTest(List <OrderRegister> OrderRegisterList)
 {
     ViewState["GridTest"] = OrderRegisterList;
     GridTest.Rows.Clear();
     GridTest.DataSource = OrderRegisterList;
     try
     {
         GridTest.DataBind();
     }
     catch (Exception) { }
 }
Beispiel #4
0
 public void loaddata()
 {
     try
     {
         ds = new DataSet();
         ds = dm.GetTestDetails();
         GridTest.DataSource = ds;
         GridTest.DataBind();
     }
     catch (SqlException ex)
     {
         ShowMessageBox("Remote Acess Not Available");
     }
 }
        private void gridTestShow()
        {
            string       sql       = "select * from Courses where Teacher=@teach and Duration <@dur";
            OleDbCommand myCmdTest = new OleDbCommand(sql, myCon);

            //OleDbParameter myPar = new OleDbParameter("teach", "Houria Houmel");
            //myCmdTest.Parameters.Add(myPar);

            myCmdTest.Parameters.AddWithValue("teach", "Houria Houmel");
            myCmdTest.Parameters.AddWithValue("dur", 50);

            OleDbDataReader rdTest = myCmdTest.ExecuteReader();

            GridTest.DataSource = rdTest;
            GridTest.DataBind();
        }
Beispiel #6
0
 /// <summary>
 /// 绑定Grid列表
 /// </summary>
 /// <param name="OrderRegisterList">数据源LIST集合</param>
 private void BindGridTest(List <OrderRegister> OrderRegisterList)
 {
     ViewState["GridTest"] = OrderRegisterList;
     GridTest.DataSource   = OrderRegisterList;
     GridTest.DataBind();
 }
Beispiel #7
0
 protected void GridTest_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     GridTest.PageIndex = e.NewPageIndex;
     loaddata();
     GridTest.DataBind();
 }