public string loadBill(string branchType, string branchId, string fromdate, string todate, string inputType) { string result = ""; int i = 1; string fDate = "", tDate = ""; if (fromdate.Trim() != "") { fDate = cl.returnDatetime(fromdate.Trim()); } if (todate.Trim() != "") { tDate = cl.returnDatetime(todate.Trim()); } if (fDate == "" || tDate == "") { fDate = ""; tDate = ""; txtFromDate.Text = ""; txtToDate.Text = ""; } var m = db.sp_web_InputStock(branchType, branchId, fDate, tDate, inputType); foreach (var item in m.ToList()) { result += "<tr class='detail-rows' title='Click để xem chi tiết'>"; result += "<td class='center'><a href='#' class='btn btn-xs btn-success showchild' id='" + item.Id.ToString() + "'>Xem</a> "; if (item.InputType.Equals("Nhập từ NCC")) { result += " <a target='_blank' href='/printinputstock/" + item.Id.ToString() + "' class='btn btn-xs btn-success'>In</a>"; } result += "</td>"; result += "<td>" + item.StockCode + "</td>"; result += "<td>" + item.InputType + "</td>"; result += "<td>" + item.ObjectReceiver + "</td>"; result += "<td>" + item.ObjectName + "</td>"; result += "<td class='center'>" + item.CreateAt.Value.ToString("dd/MM/yyyy") + "</td>"; result += "<td>" + item.FullName + "</td>"; result += "<td>" + item.Note + "</td>"; result += "</tr>"; i++; } return(result); }