<% begin %> <% pagestart = params[:page].present? ? params[:page].to_i : 1 %> <% i = pagestart <= 1 ? 1 : ((pagestart - 1) * 10) + 1 %>
<% if products.length>0 %> <% products.each do |product| %> <% gender="" genderobj=get_basic_information(product.pd_compcode,product.pd_id) if genderobj gender=genderobj.pd_bsc_gender end material="" materialobj=get_basic_information(product.pd_compcode,product.pd_id) if materialobj material=materialobj.pd_bsc_material end %>

<%= product.pd_id %>

Category: <%=product.pd_category.upcase%>

Sub-Category: <%=product.pd_subcategory.upcase%>

Gender: <%=gender.upcase%>

  <% if session[:btn_lock_request].to_s.present? %> <% checkedval = get_selected_catlog_listed(@compcodes, product.pd_id) %> checked<% end %> onclick="gridview_catlog_product_selection('<%= product.pd_id %>', '<%= product.id %>');" class="boxsize" data-module-id="2" name="mychecked_selected[]" id="mychecked_selected_<%= product.id %>" value="<%= product.pd_id %>"> <% end %>
<% end %>
<% else %>

No products available.

<% end %> <% message = "" rescue ActiveRecord::RecordNotFound => e # Handle the specific exception when the record is not found message = "Record not found "##{e.message} isFlags = false rescue ActiveRecord::StatementInvalid => e # Handle SQL syntax errors or invalid queries message = "Unknown error " ##{e.message} isFlags = false rescue StandardError => e # Handle any other errors message = "An error occurred" ##{e.message} isFlags = false end %> <%=message%>