/// <summary>Добавить не кеширующую таблицу</summary> static bool AddRemote(StartupLogo_Window.Loading_class Loading, string Name, string AlterName, ref DataBase.ITable Table, ref DataBase.ISTable SubTable, AddCols_delegate AddCols, bool Dedicate) { if (Loading != null) { Loading.LoadingComment = Name; } if (Table != null) { throw new Exception("Таблица уже существует!"); } Table = data.T1.Tables.Add(Name, AlterName); AddCols(Table); Table.AutoSave(Dedicate, DataBase.TypeOfTable.Remote); if (data.T1.type == DataBase.RemoteType.Local || Table.Parent.DataSourceEnabled) { SubTable = Table.CreateSubTable(); return(true); } else { if (Loading != null) { Loading.LoadingComment = "Ошибка"; } return(false); } }
static bool AddSynch(DataBase db, StartupLogo_Form.Loading_class Loading, string Name, string AlterName, ref DataBase.ITable Table, ref DataBase.ISTable SubTable, AddCols_delegate AddCols, bool Dedicate) { if (Loading != null) { Loading.LoadingComment = Name; } if (CheckTablesExist && Table != null) { throw new Exception("Таблица уже существует!"); } Table = db.Tables.Add(Encoding.GetEncoding(866), Name, AlterName); AddCols(Table); Table.AutoSave(Dedicate, DataBase.TypeOfTable.Combine); if (Table.Parent.DataSourceEnabled || Table.Parent.type == DataBase.RemoteType.Local) { SubTable = Table.CreateSubTable(); SubTable.QUERRY().SHOW.DO(); return(true); } else { if (Loading != null) { Loading.LoadingComment = "Ошибка"; } return(false); } }