示例#1
0
    public static void EjecutarProcedimiento(string sDatos)
    {
        string[] aDatos        = Regex.Split(sDatos, "{sepdatos}");
        string[] aParamCliente = Regex.Split(aDatos[1], "{sep}");

        SqlParameter[] aParamDestino = PROCALMA.ObtenerParametrosPA(aDatos[0]);
        int            i             = 0;

        foreach (SqlParameter oParamDestino in aParamDestino)
        {
            //oParamDestino.Value =
            switch (oParamDestino.SqlDbType)
            {
            case SqlDbType.Int: {
                oParamDestino.Value = (aParamCliente[i] == "")? null: (int?)int.Parse(aParamCliente[i]);
                break;
            }

            case SqlDbType.VarChar: {
                oParamDestino.Value = (aParamCliente[i] == "")? null: aParamCliente[i];
                break;
            }
            }
            i++;
        }
        //IB.EjecutarPA.BLL.Procedimiento.Ejecutar(aDatos[0], aParamDestino);
        PROCALMA.Ejecutar(aDatos[0], aParamDestino);
    }
示例#2
0
    public static string ObtenerProcedimientos()
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("<table id='tblProcedimientos' border='0' cellspacing='0' cellpadding='0'>");

        DataTable dt = PROCALMA.ObtenerCatalogoProcedimientos();

        foreach (DataRow oFila in dt.Rows)
        {
            sb.Append("<tr style='height:20px;' id='" + oFila["t203_idprocalma"].ToString() + @"'>
                        <td>" + oFila["t203_denominacion"].ToString() + @"</td>
                       </tr>");
        }

        sb.Append("</table>");

        return(sb.ToString());
    }
示例#3
0
    public static string ObtenerParametros(string sPA)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append(@"<table id='tblParametros' border='0' cellspacing='0' cellpadding='0'>
                    <colgroup>
                        <col style='width:90px;' /> 
                        <col style='width:250px;' />
                    </colgroup>");

        SqlParameter[] aParam = PROCALMA.ObtenerParametrosPA(sPA);
        foreach (SqlParameter oParam in aParam)
        {
            sb.Append("<tr id='" + oParam.ParameterName + @"'>
                        <td>" + oParam.ParameterName + @"</td>
                        <td><input type='text' class='txtM' value='' style='width:80px;' /></td>
                       </tr>");
        }

        sb.Append("</table>");

        return(sb.ToString());
    }