本文整理汇总了C#中Code.viewdata方法的典型用法代码示例。如果您正苦于以下问题:C# Code.viewdata方法的具体用法?C# Code.viewdata怎么用?C# Code.viewdata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Code
的用法示例。
在下文中一共展示了Code.viewdata方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: specificationlist
public void specificationlist()
{
Code cd = new Code();
cd.role = "2";
DataSet ds = cd.viewdata();
if (ds != null && ds.Tables[0].Rows.Count > 0)
{
DropDownList2.DataTextField = "Name";
DropDownList2.DataValueField = "ID";
DropDownList2.DataSource = ds;
DropDownList2.DataBind();
}
}
示例2: specialistdata
public void specialistdata()
{
Code cd = new Code();
cd.role = "2";
DataSet ds = cd.viewdata();
if (ds != null && ds.Tables[0].Rows.Count > 0)
{
DropDownList1.DataTextField = "Name";
DropDownList1.DataValueField = "ID";
DropDownList1.DataSource = ds;
DropDownList1.DataBind();
DropDownList1.Items.Insert(0, "Select Specialist");
}
}
示例3: countrynames
public void countrynames()
{
Code cd = new Code();
cd.role = "6";
DataSet ds = cd.viewdata();
if (ds != null && ds.Tables[0].Rows.Count > 0)
{
DropDownList4.DataTextField = "Name";
DropDownList4.DataValueField = "ID";
DropDownList4.DataSource = ds;
DropDownList4.DataBind();
DropDownList5.DataTextField = "Name";
DropDownList5.DataValueField = "ID";
DropDownList5.DataSource = ds;
DropDownList5.DataBind();
}
}