示例#1
0
    /// <summary>
    /// Assigns the selected Route to the selected Seller
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button1_Click(object sender, EventArgs e)
    {
        Routes route = new Routes();

        try
        {
            int idRoute = Convert.ToInt16(DropDownList1.SelectedValue.ToString());
            int idSeller = Convert.ToInt16(DropDownList2.SelectedValue.ToString());

            route.setAssignedRoute(idRoute, idSeller);

            this.setNotification("success", "¡Éxito!", "La ruta ha sido asignada correctamente...");
            this.loadAssignedRoutes();
        }
        catch (Exception ex)
        {
            this.setNotification("error", "¡Ooooops!", "Selecciona una ruta o vendedor válido");
        }
    }