public string loadBranch(string branchType) { string result = ""; int i = 1; var m = db.sp_web_loadBranch(branchType); foreach (var item in m.ToList()) { result += "<tr data-toggle='modal' data-target='#addBranch' class='detail-rows' onclick='updateBranch_modal(\"" + item.Id.ToString() + "\",\"" + item.BranchTypeId.ToString() + "\",\"" + item.BranchCode + "\",\"" + item.BranchName.Replace("'", ".") + "\",\"" + item.Phone + "\",\"" + item.Address + "\",\"" + item.Info + "\",\"" + item.Time + "\",\"" + item.CountryId.ToString() + "\",\"" + item.DistrictId.ToString() + "\",\"" + item.ContactName + "\",\"" + item.Position + "\");' id='delete" + item.Id.ToString() + "' title='Click để xem chi tiết'>"; result += "<td class='center'>" + i.ToString() + "</td>"; result += "<td>" + item.Name + "</td>"; result += "<td>" + item.BranchName + "</td>"; result += "<td>" + item.Address + "</td>"; result += "<td>" + item.Phone + "</td>"; result += "<td>" + item.Info + "</td>"; result += "<td>" + item.ContactName + "</td>"; result += "<td>" + item.Position + "</td>"; result += "<td>" + item.FullName + "</td>"; result += "<td>" + item.CreateAt.Value.ToString("dd/MM/yyyy HH:mm:ss") + "</td>"; result += "</tr>"; i++; } return(result); }