Пример #1
0
    protected void btnModificar_Click(object sender, EventArgs e)
    {
        if (!ValidarCamposMod())
        {
            cargarGrilla();
            return;
        }

        DataTable    dt         = new DataTable();
        TerminalesBO terminalBO = new TerminalesBO();

        try
        {
            terminalBO.Age_cod = Convert.ToInt32(txtCodMod.Text);
            terminalBO.Age_nom = txtNomMod.Text;

            dt = new TerminalesBLL().sp_updt_terminalesBLL(terminalBO);

            cargarGrilla();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Пример #2
0
    protected void btnGuardar_Click(object sender, EventArgs e)
    {
        if (!ValidarCamposBusqueda())
        {
            cargarGrilla();
            return;
        }

        int       codigo = Convert.ToInt32(txtCodigo.Text);
        string    nombre = txtNombre.Text;
        DataTable dt     = new DataTable();

        TerminalesBO terminal = new TerminalesBO();

        terminal.Age_cod = codigo;
        terminal.Age_nom = nombre;

        try
        {
            dt = new TerminalesBLL().sp_ins_terminalesBLL(terminal);
            cargarGrilla();
        }
        catch (Exception ex)
        {
            throw ex;
        }

        limpiarForm();
    }
Пример #3
0
    public static string eliminarTerminal(string codigo)
    {
        TerminalesBO terminal = new TerminalesBO();

        terminal.Age_cod = Convert.ToInt32(codigo);

        DataTable dt = new TerminalesBLL().sp_del_terminalesBLL(terminal);

        string codstring = dt.Rows[0].ItemArray[0].ToString();

        return(codstring);
    }
Пример #4
0
        public DataTable sp_updt_terminalesBLL(TerminalesBO terminal)
        {
            DataTable dt = new DataTable();

            try
            {
                dt = new TerminalesDAL().sp_updt_terminalesDAL(terminal);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(dt);
        }
Пример #5
0
        public static void EliminarTerminal(ref GlobalResponse globalResponse, string codigo)
        {
            TerminalesBO terminal = new TerminalesBO();

            terminal.Age_cod = Convert.ToInt32(codigo);

            DataTable dt = new DataTable();

            try
            {
                dt = new TerminalesBLL().sp_del_terminalesBLL(terminal);
            }
            catch (Exception ex)
            {
                globalResponse.Message  = ex.Message;
                globalResponse.HasError = true;
            }
        }
Пример #6
0
        public DataTable sp_del_terminalesDAL(TerminalesBO terminal)
        {
            DataTable dt = new DataTable();

            try
            {
                parametros                   = new SqlParameter[1];
                parametros[numParam]         = new SqlParameter("@cod_terminal", SqlDbType.Int);
                parametros[numParam++].Value = terminal.Age_cod;

                dt = new AccesoBDDAL().mtdEjecutaProcedimientoAlmacenadoSel("sp_del_terminal", parametros);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(dt);
        }