本文整理汇总了C#中Database.GetProName方法的典型用法代码示例。如果您正苦于以下问题:C# Database.GetProName方法的具体用法?C# Database.GetProName怎么用?C# Database.GetProName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Database
的用法示例。
在下文中一共展示了Database.GetProName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getCurrentLang
public string getCurrentLang()
{
string result = "";
Database db = new Database();
//db.AddParameter("@Culter", System.Threading.Thread.CurrentThread.CurrentCulture.Name);
result = db.GetProName("Languages", "id", "Culter", System.Threading.Thread.CurrentThread.CurrentCulture.Name);
if (result.Length == 0)
{
result = "1";
}
return result;
}
示例2: LoadData
void LoadData()
{
Database db = new Database();
db.AddParameter("@id", Request.QueryString["id"]);
System.Data.DataSet ds = db.ExecuteDataSet("select * from FilesAttach where [email protected]");
RepeaterLists.DataSource = ds.Tables[0];
RepeaterLists.DataBind();
Cache["dt1"] = ds.Tables[0];
name += " - " + db.GetProName("Files", "Title", "id", Request.QueryString["id"]);
}
示例3: LoadData
void LoadData()
{
Database db = new Database();
db.AddParameter("@id", Request.QueryString["id"]);
System.Data.DataSet ds = db.ExecuteDataSet("select * from " + tablename+" where [email protected]");
RepeaterLists.DataSource = ds.Tables[0];
RepeaterLists.DataBind();
Cache["dt1"] = ds.Tables[0];
name += " " + db.GetProName("Researcher", "name", "id", Request.QueryString["id"]);
}
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Database db = new Database();
db.LoadDDL("Researcher", "name", ref ddlResearcher, "الباحث");
if (Request.QueryString["Op"].Equals("Edit"))
{
LoadData();
}
else
{
txtAddDate.Text = _dates.GregToHijri(DateTime.Now.ToString("d/M/yyyy"));
}
listpage += "&id=" + Request.QueryString["pid"];
name += " " + db.GetProName("Researcher", "name", "id", Request.QueryString["pid"]);
ddlResearcher.SelectedValue = Request.QueryString["pid"];
}
}
示例5: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
string json="";
Database db=new Database();
DataTable dt = db.ExecuteDataTable("select * from users where isActive=1");
json = "[";
for (int i=0;i<dt.Rows.Count; i++)
{
if(i==0)
{
json += "{ id: "+ dt.Rows[i]["id"].ToString() + ", name: \""+ dt.Rows[i]["name"].ToString() + "\" }";
}
else
{
json += ",{ id: " + dt.Rows[i]["id"].ToString() + ", name: \"" + dt.Rows[i]["name"].ToString() + "\" }";
}
}
json += "]";
ViewState["json"] = json;
if (Request.QueryString["toid"] != null)
{
string name = db.GetProName("users", "name", "id", Request.QueryString["toid"]);
if (!string.IsNullOrWhiteSpace(name))
{
ViewState["toid"] = "[{id: " + Request.QueryString["toid"] + ", name: \"" + name + "\"}]";
}
else
{
ViewState["toid"] = "[]";
}
}
else
{
ViewState["toid"] = "[]";
}
}
}