private void CreateFilterCompany(Company company) { // Tabelas que por padrão são desconsideradas dos filtros iniciais. string[] tablesStandard = { "DbTable", "FilterCompany", "Table", "Company", "Translate", "User" }; var tables = GlobalUser.Tables; foreach (var item in tables) { _filter.InsertOrUpdate(new Domain.FiltersCompanies.FilterCompany() { Active = tablesStandard.Contains(item.TableName) ? false : true, CompanyControlId = GlobalUser.Company?.Id, UserControlId = GlobalUser.User?.Id, DbTableId = item.Id, CompanyLeft = company, CompanyLeftId = company.Id, CompanyRight = company, CompanyRightId = company.Id, }); } }
public bool Save(FilterCompany FilterCompany) { _FilterCompanyApp.InsertOrUpdate(FilterCompany); return(_connection.Save()); }