public string loadForm(string status) { string result = ""; int i = 1; string label = ""; var m = db.sp_web_loadCutManufacture(status); int edit = 0; foreach (var item in m.ToList()) { if (item.StatusId == 1)//chua cat { edit = 1; } else { edit = 0; } result += "<tr data-toggle='modal' data-target='#addDept' class='detail-rows' onclick='update_modal(\"" + item.Id.ToString() + "\",\"" + item.FormId.ToString() + "\",\"" + item.FormName + " | " + item.FormCode + " - " + item.DesignBy + "\",\"" + item.CutUserBy.ToString() + "\",\"" + item.CutCompleteDate + "\",\"" + item.Note + "\"," + edit + ");' id='delete" + item.Id.ToString() + "' title='Click để xem chi tiết'>"; result += "<td class='center'>" + i.ToString() + "</td>"; if (item.StatusId == 1) { label = "blink label label-success"; } else { label = "label label-primary"; } result += "<td><label class='" + label + "'>" + item.Status + "</label></td>"; result += "<td>" + item.CutCompleteDate + "</td>"; result += "<td>" + item.CutUserBy + "</td>"; result += "<td>" + item.FormCode + " - " + item.FormName + "</td>"; result += "<td>" + item.DesignBy + "</td>"; result += "<td>" + item.Note + "</td>"; result += "</tr>"; i++; } return(result); }