public DataTable GetDataTable(string tblname) { tblname = ToLower(tblname); if (ExistRemotingTable(tblname)) { DataTableEx table = null; try { table = mDataTableRemoting.GetDataTable(tblname) as DataTableEx; table.SetCanWrite(true); } catch (Exception ex) { throw ex; } return(table); } else { string sql = "select * from " + tblname; sql = ConvertSqlString(tblname, sql); DataTable table = GetTableNotRemote(sql); return(table); } }
public DataTable GetDataTableWithSql(string[] tblnames, string sql) { tblnames = ToLower(tblnames); sql = ToLower(sql); if (ExistRemotingTable(tblnames[0])) { DataTableEx table = null; try { table = mDataTableRemoting.GetDataTableWithSql(tblnames, sql) as DataTableEx; table.SetCanWrite(false); } catch (Exception ex) { throw ex; } return(table); } else { DataTable table = GetTableNotRemote(sql); return(table); } }