public int GetBulkSampleInfoByUser(int userId) { int GetBulkSampleInfoByUserCount = 0; DataTable dt = null; StringBuilder tableRow = new StringBuilder(); try { using (ProfileGateway profileGateway = new ProfileGateway()) { int count = 0; dt = profileGateway.GetBulkSampleInfoByUser(userId); GetBulkSampleInfoByUserCount = Convert.ToInt32(dt.Rows[0]["RevisedBulk"]); //if (dt.Rows.Count > 0) //{ // tableRow.Append("<table class='table table-bordered'><thead><tr class='success'>" + // "<th>Serial No</th>" + // "<th>Style Number</th>" + // "<th>Revision name</th>" + // "<th>Posted Date</th>" + // "</tr></thead >"); // for (int i = 0; i < dt.Rows.Count; i++) // { // count++; // tableRow.Append("<tbody><tr>"); // tableRow.Append("<td>" + count + "</td>"); // tableRow.Append("<td>" + dt.Rows[i]["StyleNumber"] + "</td>"); // tableRow.Append("<td>" + dt.Rows[i]["SampleStageName"] + "</td>"); // tableRow.Append("<td>" + dt.Rows[i]["PostedOn"] + "</td>"); // tableRow.Append("</tr></tbody>"); // } // tableRow.Append("</table>"); //} //else //{ // tableRow.Append("No Data Found"); //} } } catch (Exception ex) { } return(GetBulkSampleInfoByUserCount); }