Esempio n. 1
0
        public static string SISEncriptarTexto(string pPassword)
        {
            SqlString datoStringSQL  = pPassword;
            SqlString datoEncriptado = UserDefinedFunctions.EncryptFunction(datoStringSQL);

            return(Extensors.CheckStr(datoEncriptado));
        }
Esempio n. 2
0
        public static Nullable <DateTime> ConvertYYYYMMDDToDate(string ValorFecha)
        {
            Nullable <DateTime> fecFestivo = null;

            if (string.IsNullOrEmpty(ValorFecha))
            {
                return(fecFestivo);
            }
            try
            {
                //string strFecha = ValorFecha.Substring(6, 2) + "/" +
                //                  ValorFecha.Substring(4, 2) + "/" +
                //                  ValorFecha.Substring(0, 4);
                string strFecha = ValorFecha.Substring(0, 4) + "-" +
                                  ValorFecha.Substring(4, 2) + "-" +
                                  ValorFecha.Substring(6, 2)
                ;
                fecFestivo = Extensors.ToDateTime(strFecha);
            }
            catch (Exception ex)
            {
                fecFestivo = null;
            }

            return(fecFestivo);
        }