using System; using System.Collections.Generic; using System.Linq; using System.Web; using Warehouse.Models.mesModel; namespace Warehouse.DAL.Report { public class ConfigWksDal { public List ConfigWks(string area_code) { using (var context = new mesModel()) { string strWhere = string.Empty; if (!string.IsNullOrEmpty(area_code)) { strWhere += " and area_code = '" + area_code + "' "; } string sql = @"SELECT [wks_desc] FROM mes_main.dbo.config_workstation where 1=1 " + strWhere; var res = context.DynamicListFromSql(sql, null); return res.ToList(); } } } }