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


C# Users.getAllSellers方法代码示例

本文整理汇总了C#中Users.getAllSellers方法的典型用法代码示例。如果您正苦于以下问题:C# Users.getAllSellers方法的具体用法?C# Users.getAllSellers怎么用?C# Users.getAllSellers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Users的用法示例。


在下文中一共展示了Users.getAllSellers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

    /// <summary>
    /// Load the page and make some validations
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Products products = new Products();
            Users users = new Users();
            DataTable data, data2;

            data = users.getAllSellers();

            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 vendedores ni productos");
            }
            else if (showNotification[0] && !showNotification[1])
            {
                this.hideForm = true;
                this.setNotification("error", "¡Ooooops!", "No hay vendedores");
            }
            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 una vendedor");

                GridView1.DataSource = data2;
                GridView1.DataBind();
            }
        }
    }
开发者ID:efigarolam,项目名称:Snackthat,代码行数:66,代码来源:assignproducts.aspx.cs

示例2: Page_Load

    /// <summary>
    /// Load the page and make some validations
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Routes routes = new Routes();
            Users users = new Users();
            DataTable data, data2, data3;

            data = routes.getAllRoutes();

            if (data != null && data.Rows.Count > 0)
            {
                showNotification[0] = false;
            }
            else
            {
                showNotification[0] = true;
            }

            data2 = users.getAllSellers();

            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 rutas ni clientes");
            }
            else if (showNotification[0] && !showNotification[1])
            {
                this.hideForm = true;
                this.setNotification("error", "¡Ooooops!", "No hay rutas creadas");
            }
            else if (!showNotification[0] && showNotification[1])
            {
                this.hideForm = true;
                this.setNotification("error", "¡Ooooops!", "No hay vendedores");
            }
            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 una ruta");

                DropDownList2.DataSource = data2;
                DropDownList2.DataTextField = "Nombre";
                DropDownList2.DataValueField = "ID";
                DropDownList2.DataBind();
                DropDownList2.Items.Insert(0, "Selecciona un vendedor");

                this.loadAssignedRoutes();
            }
        }
    }
开发者ID:efigarolam,项目名称:Snackthat,代码行数:71,代码来源:assignroutes.aspx.cs


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