public string loadGift(string branchType, string branchId) { string result = ""; int i = 1; var m = db.sp_web_loadGift(branchType, branchId); foreach (var item in m.ToList()) { result += "<tr class='detail-rows' id='" + item.Id.ToString() + "' title='Click để xem chi tiết'>"; result += "<td class='center childrows'></td>"; result += "<td>" + item.BranchTypeName + "</td>"; result += "<td>" + item.BranchName + "</td>"; result += "<td>" + item.Name + "</td>"; result += "<td>" + item.Description + "</td>"; result += "<td>" + item.FromHour + " - " + item.FromDate + "</td>"; result += "<td>" + item.ToHour + " - " + item.ToDate + "</td>"; result += "<td>" + item.SaleType + "</td>"; if (item.SaleValue.Value > 999) { result += "<td>" + string.Format("{0:0,0}", item.SaleValue) + "</td>"; } else { result += "<td>" + item.SaleValue.ToString() + "</td>"; } result += "<td>" + item.Status + "</td>"; result += "<td>" + item.CreateAt + "</td>"; result += "<td>" + item.CreateBy + "</td>"; result += "</tr>"; i++; } return(result); }