Ejemplo n.º 1
0
        public static string getCSVParameter(DateTime[] parameters)
        {
            string output = "";

            for (int i = 0; i < parameters.Length; i++)
            {
                output += "\"" + DBDialect.ToDBDateTime(parameters[i]) + "\"";
                if (i < parameters.Length - 1)
                {
                    output += ", ";
                }
            } // foreach
            return(output);
        }
Ejemplo n.º 2
0
        public static string getCSVParameter(Stack parameters)
        {
            string output = "";

            object[] objects = parameters.ToArray();
            for (int i = 0; i < objects.Length; i++)
            {
                string param = "";
                if (objects[i] is DateTime)
                {
                    param = DBDialect.ToDBDateTime(Convert.ToDateTime(objects[i]));
                }
                else
                {
                    param = objects[i].ToString();
                }
                output += "\"" + param + "\"";
                if (i < objects.Length - 1)
                {
                    output += ", ";
                }
            } // foreach
            return(output);
        }     // getCSVParameter
Ejemplo n.º 3
0
 /// <summary>
 /// by default, surrounds the return value in quotes (if the DBDialect needs them)
 /// </summary>
 /// <param name="dateTime"></param>
 /// <returns></returns>
 public static string dbEncode(DateTime dateTime)
 {
     return(DBDialect.ToDBDateTime(dateTime));
 }