本文整理汇总了C#中Class1.find方法的典型用法代码示例。如果您正苦于以下问题:C# Class1.find方法的具体用法?C# Class1.find怎么用?C# Class1.find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Class1
的用法示例。
在下文中一共展示了Class1.find方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: b2_Click1
protected void b2_Click1(object sender, EventArgs e)
{
Class1 x = new Class1();
x.connect();
string q = "select * from AdminMaster where username='" + Textbox1.Text + "' and password='" + Textbox2.Text + "'";
DataTable dt = x.find(q);
if (dt.Rows.Count == 0)
{
}
else
{
Response.Redirect("../../adminhome.aspx");
}
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string username = Request.Form["login"].ToString();
string password = Request.Form["password"].ToString();
Class1 x = new Class1();
x.connect();
string q = "select * from adminmaster where username='" + username+ "' and password='" + password+ "'";
DataTable dt = x.find(q);
if (dt.Rows.Count == 0)
{
Response.Redirect("admin_login.html");
}
else
{
Session["Id_admin"] = dt.Rows[0][0].ToString();
Session["Name"] = dt.Rows[0][1].ToString();
Response.Redirect("../admin/adminhome.aspx");
}
}
示例3: b2_Click
protected void b2_Click(object sender, EventArgs e)
{
Class1 x = new Class1();
x.connect();
string varusername = txtuser.Text;
string varpassword = txtpwd.Text;
string q = "select * from Institutemaster where Email='" + varusername + "' and password='" + varpassword + "'";
DataTable dt = x.find(q);
if (dt.Rows.Count == 0)
{
}
else
{
Response.Redirect("../../institutehome.aspx");
Session["username"] = varusername;
}
}