1 if ($scope.SearchSalesOrderAndCompanyName !== undefined && $scope.SearchSalesOrderAndCompanyName != null ) {
2 SearchCriteria += " AND [SalesOrderNo] LIKE '%" + $scope.SearchSalesOrderAndCompanyName + "%' OR ([SO].[CompanyNameOnBill] LIKE '%" + $scope.SearchSalesOrderAndCompanyName + "%')";
3 }
4 if ($scope.FromDate !== undefined && $scope.FromDate !=null) {
5 SearchCriteria += " AND [SO].[SalesOrderDate] LIKE '%" + $scope.FromDate + "%'";
6 }
7
1Condition ? expression-if-true ; expression-if-false
2
3//Here, '?' and ':' are Ternary Operators