Ejemplo n.º 1
0
        public IHttpActionResult SearchPosition(string storeCode)
        {
            var sql = string.Format(@"SELECT tb_employee.Code,tb_employee.NameZHCN,tb_employee.NameENUS,tb_position.NameENUS as PositionName,tb_position.PositionCode 
                FROM dbo.Store tb_store
                INNER JOIN dbo.UserMiniMarket tb_mini
                ON tb_mini.MiniMarketCode = tb_store.MiniMarketCode
                INNER JOIN dbo.UserPosition tb_position
                ON tb_position.Id = tb_mini.PositionId
                INNER JOIN dbo.Employee tb_employee
                ON tb_employee.Id = tb_position.UserId
                WHERE tb_store.code = '{0}' AND tb_position.PositionCode in ('suoya303051','suoya303055','suoya303057','suoya450007','suoya303050','suoya303054')
                AND tb_employee.Status = 1
                ORDER BY PositionCode", storeCode);
            //AND tb_employee.Status = 1
            var list = ClosureInfo.SqlQuery <SPosition>(sql, null).ToList();

            return(Ok(list));
        }