change sql way to web method