Exemple #1
0
 /// <summary>
 /// Agrega siempre el item con el mensaje de seleccionar
 /// un item de la lista.
 /// </summary>
 public ItemCollection InsertSelectionItemAlways()
 {
     if (List.Count >= 0)
     {
         List.Insert(0, Utiles.GetSelectionItem());
     }
     return(this);
 }
Exemple #2
0
        public static string RutLngAUsr(long lngRutEmpl)
        {
            if (lngRutEmpl == 0)
            {
                return("");
            }
            long   lngRutEmplLoc;
            string strTemp;
            string strDigVerif;
            int    i, j;
            string strSalida;
            int    intLargo;

            lngRutEmplLoc = lngRutEmpl;
            strDigVerif   = digito_verificador(lngRutEmplLoc);

            strTemp = Utiles.ConvertToString(lngRutEmplLoc);
            //intLargo = Len(Trim(strTemp))
            intLargo = strTemp.ToString().Trim().Length;

            strSalida = "";
            j         = 0;

            for (i = intLargo; i >= 1; i--)
            {
                if (j > 0 & j % 3 == 0)
                {
                    strSalida = "." + strSalida;
                }
                strSalida = strTemp.Substring(i - 1, 1) + strSalida;
                j         = j + 1;
            }

            strSalida = strSalida.Trim() + "-" + strDigVerif.Trim();
            //strSalida = strTemp.Trim() + "-" + strDigVerif.Trim();

            return(strSalida);
        }
Exemple #3
0
 /// <summary>
 /// Obtiene un item para combo con el mensaje de selección
 /// </summary>
 /// <returns></returns>
 public static Item GetSelectionItem()
 {
     return(new Item(Utiles.GetSelectionText(), "0"));
 }