search=$" ( AccountingUnit like '%{request.SearchQuery}%' )";
else
search=$" ( AccountingUnit like '%{request.SearchQuery}%' or JobNumber like '%{request.SearchQuery}%' or EmployeeName like '%{request.SearchQuery}%') ";
}
varresult=newComparison();
varsql=$@"SELECT COUNT(*) FROM {request.ViewName} WHERE AllotId = @AllotId and {search}";
sql=$@"SELECT * FROM {request.ViewName} WHERE AllotId = @AllotId and {search} ORDER BY HospitalId,Year,Month,ABS(DIFF) DESC LIMIT {(request.PageIndex-1)*request.PageSize},{request.PageSize}; ";
Query=$@" and (AccountingUnit like '%{request.QuerySearch}%' or UnitType like '%{request.QuerySearch}%') ";
if(IsHead)
sql=$@"SELECT * FROM {request.TableName} WHERE AllotId = @AllotId ";
else
sql=$@"SELECT * FROM {request.TableName} WHERE AllotId = @AllotId {Query} order by UnitType,AccountingUnit LIMIT {(request.PageIndex-1)*request.PageSize},{request.PageSize} ";
varsql=$@"SELECT column_name,column_comment FROM information_schema.`COLUMNS` WHERE table_schema = @table_schema AND table_name = @table_name AND COLUMN_KEY <> 'PRI' ";
varsql=$@"select column_name,data_type from information_schema.columns where table_name=@table_name and table_schema=@table_schema AND (data_type like '%int%' or data_type like '%decimal%' or data_type like '%date%') AND COLUMN_KEY <> 'PRI' ";