lunes, 22 de diciembre de 2014

Lista con expresiones lambda



Hacer un distinct en listas

 nListaCircuitos = nListaCircuitos.OrderBy(Function(z) z.TN_COD_CIRCUITO).Distinct().ToList()
                        nListaCircuitos = nListaCircuitos.GroupBy(Function(x) x.TN_COD_CIRCUITO).[Select](Function(g) g.First()).ToList()

Cuando en el gridview esta paginado y se quiere obtener la fila

The problem is in the following line::

CommandArgument ='<%# Container.DataItemIndex%>'

the command argument not reset itself every time when move from page to another page..
  • The answer is ::(in the case of ListView):
CommandArgument ='<%# ((ListViewDataItem)Container).DisplayIndex%>'

  • The answer is :: (in the case of GridView):
CommandArgument='<%#((GridViewRow)Container).RowIndex%>'

viernes, 7 de noviembre de 2014

textArea controlar cantidad caracteres


//funcion javascript

 function ValidarCaracteres(textareaControl, maxlength) {

            if (textareaControl.value.length > maxlength) {
                textareaControl.value = textareaControl.value.substring(0, maxlength);
            }

//propiedad en el textbox
onkeypress="ValidarCaracteres(this,200);" onkeyup="ValidarCaracteres(this,200);"

martes, 16 de septiembre de 2014

Cambiar formato de numeros en ssrs


Seguir

http://blogs.msdn.com/b/nav/archive/2011/04/15/how-to-change-thousands-decimals-separators-in-rdl-reports.aspx

Remenber:

in ReportLayout design we can find that every Textbox has property named Language. Value could be: Default, Afrikaans,Afrikaans (South Africa) and etc. So if we for example set Language = French, then decimal will be 1 234 567,89; if Language=German (Germany) - number will be 1.234.567,89, if Language=English (United States) - number 1,234,567.89 and etc.

miércoles, 20 de agosto de 2014

Windows 8 -IIS 8 wcf

http://stackoverflow.com/questions/11116134/wcf-on-iis8-svc-handler-mapping-doesnt-work



c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -iru

jueves, 17 de julio de 2014

Agrupar y distinct en listas

 lp=lp.OrderBy(z => z.VC_TITULO).Distinct().ToList();
                lp = lp.GroupBy(x => x.VC_TITULO).Select(g => g.First()).ToList();