コード例 #1
0
    protected void btnenviar_Click(object sender, EventArgs e)
    {
        PedidoBC gd = new PedidoBC();
        int      id = 0;

        try
        {
            if (gd.CrearEnvio(hseleccionado.Value.ToString(), user.USUA_ID, out id))
            {
                hf_idEnvio.Value = id.ToString();
                lbl_cedible.Text = string.Format("Envío cedible N°{0}", id);
                Session["ID_Seleccionados_1"] = hseleccionado.Value;
                //UpdatePanel1.Update();
                // utils.AbrirModal(this, "modalFOTO");
                //     utils.ShowMessage(this, "Enviado", "success", true);
                btnzip_Click(null, null);
            }
            else
            {
                utils.ShowMessage(this, "Error", "error", false);
            }
            //   ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "reiniciar", "reinicia();", true);
        }
        catch (Exception ex)
        {
            //  ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "reiniciar", "reinicia();", true);
            utils.ShowMessage(this, ex.Message, "error", false);
        }
        finally
        {
            ObtenerPedidos(true);
        }
    }
コード例 #2
0
    protected void btnenviar_Click(object sender, EventArgs e)
    {
        PedidoBC gd = new PedidoBC();
        int      id = 0;

        try
        {
            if (gd.CrearEnvio(hseleccionado.Value.ToString(), user.USUA_ID, out id))
            {
                hf_idEnvio.Value = id.ToString();
                //lbl_cedible.Text = string.Format("Envío rut N°{0}",id);
                Session["ID_Seleccionados_1"] = hseleccionado.Value;
                UpdatePanel1.Update();
                // utils.AbrirModal(this, "modalFOTO");
                EnvioBC   envio    = new EnvioBC(id);
                DataTable enviados = envio.detalle();
                envio.archivo(enviados);
                try
                {
                    envio.archivo2(enviados, id);
                }
                catch (Exception ex)
                {
                    utils.ShowMessage(this.Page, ex.Message, "error", true, "msg_error");
                    return;
                }
            }
            else
            {
                utils.ShowMessage(this, "Error", "error", false);
            }
        }
        catch (Exception ex)
        {
            utils.ShowMessage(this, ex.Message, "error", false);
        }
        finally
        {
            ObtenerEnvio(true);
        }
    }