Esempio n. 1
0
    protected void Btn_Search_Click(object sender, EventArgs e)
    {
        string  User = Lbl_User.Text;
        DataSet ak   = SqlAC.CheckData("SELECT * FROM Users WHERE Username ='******'");
        int     a    = ak.Tables[0].Rows.Count;

        if (a == 1)
        {
            Grv2.DataSource = ak;
            Grv2.DataBind();
            msg.Text = "";
        }
        else
        {
            msg.Text = "User was not found";
        }
    }
Esempio n. 2
0
    protected void Btn_Search_Click(object sender, EventArgs e)
    {
        string  Pname = Lbl_Auction.Text;
        DataSet ak    = SqlAC.CheckData("SELECT * FROM Auctions WHERE ID =" + Pname);
        int     a     = ak.Tables[0].Rows.Count;

        if (a == 1)
        {
            Grv2.DataSource = ak;
            Grv2.DataBind();
            msg.Text = "";
        }
        else
        {
            msg.Text        = "Auction was not found";
            Grv2.DataSource = null;
            Grv2.DataBind();
        }
    }