コード例 #1
0
ファイル: userselect.aspx.cs プロジェクト: kavilee2012/kvShop
 public void pp1()
 {
     BLL.adminuser bllad = new  BLL.adminuser ();
     DataSet ds = bllad.dsus(AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize, "user");
     GridView1.DataSource = ds.Tables["user"];
     GridView1.DataBind();
 }
コード例 #2
0
    public void pp1()
    {
        BLL.adminuser bllad = new  BLL.adminuser();
        DataSet       ds    = bllad.dsus(AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize, "user");

        GridView1.DataSource = ds.Tables["user"];
        GridView1.DataBind();
    }
コード例 #3
0
ファイル: userselect.aspx.cs プロジェクト: kavilee2012/kvShop
 public void ss()
 {
     Model.user mod = new Model.user();
     mod.username = TextBox3.Text;
     BLL.adminuser blls = new BLL.adminuser();
     int i = blls.coun(mod);
     AspNetPager1.RecordCount = i;
     AspNetPager1.PageSize = 5;
 }
コード例 #4
0
    public void ss()
    {
        Model.user mod = new Model.user();
        mod.username = TextBox3.Text;
        BLL.adminuser blls = new BLL.adminuser();
        int           i    = blls.coun(mod);

        AspNetPager1.RecordCount = i;
        AspNetPager1.PageSize    = 5;
    }
コード例 #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        BLL.adminuser bll = new BLL.adminuser();
        int           i   = bll.count();

        AspNetPager1.RecordCount = i;
        AspNetPager1.PageSize    = 10;
        pp();
        DataBind();
        Label2.Visible = false;
    }
コード例 #6
0
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Delete")
     {
         int        i    = Convert.ToInt32(e.CommandArgument);
         Model.user mode = new Model.user();
         mode.userid = i;
         BLL.adminuser bll    = new  BLL.adminuser();
         int           result = bll.dele(mode);
         if (result > 0)
         {
             Response.Write("<script>alert('删除成功!');location.href='userselect.aspx'</script>");
         }
         GridView1.DataBind();
     }
 }
コード例 #7
0
ファイル: usershow.aspx.cs プロジェクト: kavilee2012/kvShop
 public void pp()
 {
     int i=Convert.ToInt32(Request.QueryString["id"]);
     Model.user mo = new Model.user();
     mo.userid = i;
     BLL.adminuser bll = new BLL.adminuser();
     MySqlDataReader dr = bll.drus(mo);
     if (dr.Read())
     {
         TextBox1.Text = dr["_userid"].ToString();
         TextBox2.Text = dr["_username"].ToString();
         TextBox3.Text = dr["_pwd"].ToString();
         TextBox4.Text = dr["_email"].ToString();
         TextBox5.Text = dr["_qq"].ToString();
         TextBox6.Text = dr["_msn"].ToString();
         TextBox7.Text = dr["_registtime"].ToString();
         TextBox8.Text = dr["_safequestion"].ToString();
         TextBox9.Text = dr["_safepwd"].ToString();
         dr.Close();
     }
 }
コード例 #8
0
ファイル: usershow.aspx.cs プロジェクト: Hilvcha/net-shopping
    public void pp()
    {
        int i = Convert.ToInt32(Request.QueryString["id"]);

        Model.user mo = new Model.user();
        mo.userid = i;
        BLL.adminuser bll = new BLL.adminuser();
        SqlDataReader dr  = bll.drus(mo);

        if (dr.Read())
        {
            TextBox1.Text = dr["_user_id"].ToString();
            TextBox2.Text = dr["_user_name"].ToString();
            TextBox3.Text = dr["_pwd"].ToString();
            TextBox4.Text = dr["_email"].ToString();
            TextBox5.Text = dr["_qq"].ToString();
            TextBox6.Text = dr["_msn"].ToString();
            TextBox7.Text = dr["_regist_time"].ToString();
            TextBox8.Text = dr["_safe_question"].ToString();
            TextBox9.Text = dr["_safe_pwd"].ToString();
            dr.Close();
        }
    }
コード例 #9
0
ファイル: userselect.aspx.cs プロジェクト: kavilee2012/kvShop
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (TextBox3.Text == "")
        {
            Label2.Visible = true;
            Label3.Visible = true;
            GridView1.Visible = false;
            AspNetPager1.Visible = false;
        }
        else
        {
            Label2.Visible = false;
            Label3.Visible = true;
            GridView1.Visible = true;
            AspNetPager1.Visible = true;

            Model.user mod = new Model.user();
            mod.username = TextBox3.Text;
            BLL.adminuser blls = new BLL.adminuser();
            int i = blls.coun(mod);
            AspNetPager1.RecordCount = i;
            AspNetPager1.PageSize = 5;

            Model.user mode = new Model.user();
            mode.username = TextBox3.Text;
            DataSet ds = blls.seu(AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize, "user",mod);
            GridView1.DataSource = ds.Tables["user"];
            GridView1.DataBind();
            if (i == 0)
            {
                AspNetPager1.Visible = false;
                Label2.Visible = true;
                Label3.Visible = false;

            }
        }
    }
コード例 #10
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (TextBox3.Text == "")
        {
            Label2.Visible       = true;
            Label3.Visible       = true;
            GridView1.Visible    = false;
            AspNetPager1.Visible = false;
        }
        else
        {
            Label2.Visible       = false;
            Label3.Visible       = true;
            GridView1.Visible    = true;
            AspNetPager1.Visible = true;

            Model.user mod = new Model.user();
            mod.username = TextBox3.Text;
            BLL.adminuser blls = new BLL.adminuser();
            int           i    = blls.coun(mod);
            AspNetPager1.RecordCount = i;
            AspNetPager1.PageSize    = 5;


            Model.user mode = new Model.user();
            mode.username = TextBox3.Text;
            DataSet ds = blls.seu(AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize, "user", mod);
            GridView1.DataSource = ds.Tables["user"];
            GridView1.DataBind();
            if (i == 0)
            {
                AspNetPager1.Visible = false;
                Label2.Visible       = true;
                Label3.Visible       = false;
            }
        }
    }
コード例 #11
0
ファイル: userselect.aspx.cs プロジェクト: kavilee2012/kvShop
 protected void Page_Load(object sender, EventArgs e)
 {
     BLL.adminuser bll = new BLL.adminuser();
     int i = bll.count();
     AspNetPager1.RecordCount = i;
     AspNetPager1.PageSize = 10;
     pp();
     DataBind();
     Label2.Visible = false;
 }
コード例 #12
0
ファイル: userselect.aspx.cs プロジェクト: kavilee2012/kvShop
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Delete")
     {
         int i = Convert.ToInt32(e.CommandArgument);
         Model.user mode = new Model.user();
         mode.userid = i;
         BLL.adminuser bll = new  BLL.adminuser();
         int result = bll.dele(mode);
         if (result > 0)
         {
             Response.Write("<script>alert('删除成功!');location.href='userselect.aspx'</script>");
         }
         GridView1.DataBind();
     }
 }