当前位置: 首页>>代码示例>>C#>>正文


C# Customers.getAllCustomers方法代码示例

本文整理汇总了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();
    }
开发者ID:efigarolam,项目名称:Snackthat,代码行数:10,代码来源:viewallcustomers.aspx.cs

示例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...");
        }
    }
开发者ID:efigarolam,项目名称:Snackthat,代码行数:17,代码来源:viewallcustomers.aspx.cs

示例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();
            }
        }
    }
开发者ID:efigarolam,项目名称:Snackthat,代码行数:61,代码来源:sell.aspx.cs


注:本文中的Customers.getAllCustomers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。