public DbTypedValue GetDbType(string name, object value, EbDbTypes type) { DbTypedValue TV = new DbTypedValue(name, value, type); EbMobileControl ctrl = ChildControls.Find(item => item.Name == name); if (ctrl != null) { TV.Type = ctrl.EbDbType; TV.Value = ctrl.SQLiteToActual(value); } else { if (type == EbDbTypes.Date) { TV.Value = Convert.ToDateTime(value).ToString("yyyy-MM-dd"); } else if (type == EbDbTypes.DateTime) { TV.Value = Convert.ToDateTime(value).ToString("yyyy-MM-dd HH:mm:ss"); } } return(TV); }