-------------------------------------------------------------------------------------------
.ASPX
-------------------------------------------------------------------------------------------
.javascript
-------------------------------------------------------------------------------------------
$(document).ready(function () {
loadPeriodo();
});
function loadPeriodo() {
var params = "{}";
jutils.ajax.loadCombo('listaPeriodo', params, 'cbxAgno', 'ID', 'YEAR');
}
-------------------------------------------------------------------------------------------
.HTML
-------------------------------------------------------------------------------------------
<td width="180">
<span id="spanPer">
<select id="cbxAgno" name="cbxAgno" class="cont_combo">
</select>
</span>
</td>
// LLENADO EN DURO
<select id="cbxMes" name="cbxMes" style="font-family: Calibri; font-size: 13px; cursor: default;
width: 135px; height: 21px; margin-left: 0px;">
<option value="1">Abril</option>
<option value="2">Junio</option>
<option value="3">Septiembre</option>
<option value="4">Noviembre</option>
</select>
-------------------------------------------------------------------------------------------
.CS
-------------------------------------------------------------------------------------------
[WebMethod]
public static string listaPeriodo()
{
var dt = new TributarioWebBc().RecuperaAnos();
string result = JsonConvert.SerializeObject(dt).Replace("ö", "o");
return JsonConvert.SerializeObject(dt);
}
jueves, 30 de marzo de 2017
lunes, 27 de marzo de 2017
C# - Split con más de un caracter
var queryPreWhere = strcompletequeryupdate.Split(new string[] {"WHERE"}, StringSplitOptions.None)[0];
var queryPostWhere = strcompletequeryupdate.Split(new string[] { "WHERE" }, StringSplitOptions.None)[1].Replace("= NULL", "IS NULL");
Suscribirse a:
Entradas (Atom)