Example #1
0
    protected void btnAgregarAll_Click(object sender, ImageClickEventArgs e)
    {
        int dtrpta = 0;

        foreach (var item in lstRol.Items)
        {
            TextBox      Cantidad = ((TextBox)item.FindControl("txtCantidad"));
            Label        Material = ((Label)item.FindControl("lblMaterial"));
            DropDownList ddlPep   = ((DropDownList)item.FindControl("ddlPep"));

            if (Cantidad.Text != string.Empty)
            {
                BE_LOG_SOLPED_DETALLE oBESol = new BE_LOG_SOLPED_DETALLE();
                oBESol.IDE_PEDIDO    = 0;
                oBESol.MATERIAL      = Material.Text;
                oBESol.CANTIDAD      = Convert.ToInt32(Cantidad.Text);
                oBESol.COD_PEDIDO    = ddlCodigo.SelectedValue.ToString();
                oBESol.IDE_SOLICITUD = Convert.ToInt32(lblId.Text);
                oBESol.PEP           = ddlPep.SelectedValue.ToString();

                dtrpta = new BL_LOG_SOLPED_DETALLE().INS_LOG_SOLPED_DETALLE(oBESol);
                if (dtrpta > 0)
                {
                    dtrpta++;
                }
            }
        }
        if (dtrpta > 0)
        {
            //string cleanMessage = "Registro Exitoso";
            //ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
            ListarPedido();
        }
    }
Example #2
0
    protected void EliminarSolped(object sender, ImageClickEventArgs e)
    {
        ImageButton           btnDelete = ((ImageButton)sender);
        BL_LOG_SOLPED_DETALLE oBESol    = new BL_LOG_SOLPED_DETALLE();
        DataTable             dt        = new DataTable();

        dt = oBESol.uspDELETE_LOG_SOLPED_DETALLE_ID(Convert.ToInt32(btnDelete.CommandArgument));
        ListarPedido();
    }
Example #3
0
    protected void btnEliminar_Click(object sender, ImageClickEventArgs e)
    {
        PanelPedidos.Visible = false;
        txtMaterial.Text     = string.Empty;
        txtDescripcion.Text  = string.Empty;
        txtUnidad.Text       = string.Empty;
        txtGrupo.Text        = string.Empty;

        txtPep.Text = string.Empty;

        BL_LOG_SOLPED_DETALLE oBESol = new BL_LOG_SOLPED_DETALLE();
        DataTable             dt     = new DataTable();

        dt = oBESol.uspDEL_LOG_SOLPED_DETALLE_POR_ID(Convert.ToInt32(lblId.Text));
        ListarPedido();
    }
Example #4
0
    protected void Seleccionar(object sender, ImageClickEventArgs e)
    {
        ImageButton btnAdd = ((ImageButton)sender);
        int         item   = Convert.ToInt32(btnAdd.CommandArgument);


        ListViewItem itemx    = lstRol.Items[item - 1];
        TextBox      Cantidad = ((TextBox)itemx.FindControl("txtCantidad"));
        Label        Material = ((Label)itemx.FindControl("lblMaterial"));
        DropDownList ddlPep   = ((DropDownList)itemx.FindControl("ddlPep"));

        if (Cantidad.Text == string.Empty)
        {
            string cleanMessage = "Ingresar Cantidad";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
        else
        {
            BE_LOG_SOLPED_DETALLE oBESol = new BE_LOG_SOLPED_DETALLE();
            oBESol.IDE_PEDIDO    = 0;
            oBESol.MATERIAL      = Material.Text;
            oBESol.CANTIDAD      = Convert.ToInt32(Cantidad.Text);
            oBESol.COD_PEDIDO    = ddlCodigo.SelectedValue.ToString();
            oBESol.IDE_SOLICITUD = Convert.ToInt32(lblId.Text);
            oBESol.PEP           = ddlPep.SelectedValue.ToString();
            int dtrpta = 0;
            dtrpta = new BL_LOG_SOLPED_DETALLE().INS_LOG_SOLPED_DETALLE(oBESol);
            if (dtrpta > 0)
            {
                //string cleanMessage = "Registro Exitoso";
                //ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
                ListarPedido();
            }
        }

        //foreach (var item in lstRol.Items)
        //{

        //    TextBox Cantidad = ((TextBox)item.FindControl("txtCantidad"));
        //    String a = Cantidad.Text;
        //}
    }