本文整理汇总了C#中Customers.getAllCustomers方法的典型用法代码示例。如果您正苦于以下问题:C# Customers.getAllCustomers方法的具体用法?C# Customers.getAllCustomers怎么用?C# Customers.getAllCustomers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customers
的用法示例。
在下文中一共展示了Customers.getAllCustomers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: loadGridView
/// <summary>
/// Method which loads the gridview with all the Customers.
/// </summary>
protected void loadGridView()
{
Customers customer = new Customers();
GridView1.DataSource = customer.getAllCustomers();
GridView1.DataBind();
}
示例2: loadGridView
protected void loadGridView()
{
Customers customer = new Customers();
DataTable dt = customer.getAllCustomers(0);
if (dt != null && dt.Rows.Count > 0)
{
this.hasCustomers = true;
GridView1.DataSource = dt;
GridView1.DataBind();
}
else
{
this.hasCustomers = false;
this.setNotification("error", "No hay ruta asignada", "No se te ha asignado una ruta y por consecuencia no hay clientes...");
}
}
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Products products = new Products();
Customers customers = new Customers();
DataTable data, data2;
data = customers.getAllCustomers(0);
if (data != null && data.Rows.Count > 0)
{
showNotification[0] = false;
}
else
{
showNotification[0] = true;
}
data2 = products.getAllProducts();
if (data2 != null && data2.Rows.Count > 0)
{
showNotification[1] = false;
}
else
{
showNotification[1] = true;
}
if (showNotification[0] && showNotification[1])
{
this.hideForm = true;
this.setNotification("error", "¡Ooooops!", "No hay ni clientes ni productos");
}
else if (showNotification[0] && !showNotification[1])
{
this.hideForm = true;
this.setNotification("error", "¡Ooooops!", "No hay clientes");
}
else if (!showNotification[0] && showNotification[1])
{
this.hideForm = true;
this.setNotification("error", "¡Ooooops!", "No hay productos");
}
else if (!showNotification[0] && !showNotification[1])
{
this.hideForm = false;
this.setNotification("nothing");
DropDownList1.DataSource = data;
DropDownList1.DataTextField = "Nombre";
DropDownList1.DataValueField = "ID";
DropDownList1.DataBind();
DropDownList1.Items.Insert(0, "Selecciona un cliente");
GridView1.DataSource = data2;
GridView1.DataBind();
}
}
}