Ejemplo n.º 1
0
        public static Dictionary <string, object> AddVF(this Dictionary <string, object> d, string key, object value, ref string vf)
        {
            string temp = "";

            if (value is DateTime)
            {
                var dt = (DateTime)value;
                temp = Commons.ToTimestamp(dt).ToString();
            }
            else if (value is Decimal)
            {
                var dec = (decimal)value;
                temp = dec.ToString("#0.00");
            }
            else if (value is bool)
            {
                temp = (bool)value ? "true" : "false";
            }
            else
            {
                temp = value.ToString();
            }
            d[key] = temp;
            vf    += temp;
            return(d);
        }