// public ActionResult Search1(string id) { RequestModel22 rq22 = new RequestModel22(); Employee e = (Employee)Session["Employee"]; if (id != null) { List <RequestModel22> ls = rq22.search(id).Where(r1 => (e.EmployeeNumber.Equals(r1.RNumber1) && r1.Stte1.Equals("1") && r1.Acc1 == true)).OrderByDescending(r => r.DDispatch1).ToList(); string chuoi = ""; foreach (RequestModel22 s in ls) { chuoi += "<tr>"; // chuoi += "<td>" + s.RId1 + "</td>"; chuoi += "<td>" + s.Rname1 + "</td>"; chuoi += "<td>" + s.CRQName1 + "</td>"; chuoi += "<td>" + s.DDispatch1 + "</td>"; // chuoi += "<td>" + s.Arise + "</td>"; chuoi += "<td>" + s.DApprove1 + "</td>"; chuoi += "<td>" + s.RContent1 + "</td>"; //("Select","DetailRQ4/"+rq.RId1,"Default1") chuoi += "<td><a href='/Default1/DetailRQ4/" + s.RId1 + "'>Select</a></td>"; chuoi += "</tr>"; } Response.Write(chuoi); } else { List <RequestModel22> ls = rq22.Listrq2().Where(r1 => (e.EmployeeNumber.Equals(r1.RNumber1) && r1.Stte1.Equals("1") && r1.Acc1 == true)).OrderByDescending(r => r.DDispatch1).ToList(); string chuoi = ""; foreach (RequestModel22 s in ls) { chuoi += "<tr>"; // chuoi += "<td>" + s.RId1 + "</td>"; chuoi += "<td>" + s.Rname1 + "</td>"; chuoi += "<td>" + s.CRQName1 + "</td>"; chuoi += "<td>" + s.DDispatch1 + "</td>"; // chuoi += "<td>" + s.Arise + "</td>"; chuoi += "<td>" + s.DApprove1 + "</td>"; chuoi += "<td>" + s.RContent1 + "</td>"; //("Select","DetailRQ4/"+rq.RId1,"Default1") chuoi += "<td><a href='/Default1/DetailRQ4/" + s.RId1 + "'>Select</a></td>"; chuoi += "</tr>"; } Response.Write(chuoi); } return(null); }
// public ActionResult Search1(string id) { RequestModel22 rq22 = new RequestModel22(); Employee e = (Employee)Session["Employee"]; if (id != null) { List<RequestModel22> ls = rq22.search(id).Where(r1 => (e.EmployeeNumber.Equals(r1.RNumber1) && r1.Stte1.Equals("1") && r1.Acc1 == true)).OrderByDescending(r => r.DDispatch1).ToList(); string chuoi = ""; foreach (RequestModel22 s in ls) { chuoi += "<tr>"; // chuoi += "<td>" + s.RId1 + "</td>"; chuoi += "<td>" + s.Rname1 + "</td>"; chuoi += "<td>" + s.CRQName1 + "</td>"; chuoi += "<td>" + s.DDispatch1 + "</td>"; // chuoi += "<td>" + s.Arise + "</td>"; chuoi += "<td>" + s.DApprove1 + "</td>"; chuoi += "<td>" + s.RContent1 + "</td>"; //("Select","DetailRQ4/"+rq.RId1,"Default1") chuoi += "<td><a href='/Default1/DetailRQ4/" + s.RId1 + "'>Select</a></td>"; chuoi += "</tr>"; } Response.Write(chuoi); } else { List<RequestModel22> ls = rq22.Listrq2().Where(r1 => (e.EmployeeNumber.Equals(r1.RNumber1) && r1.Stte1.Equals("1") && r1.Acc1 == true)).OrderByDescending(r => r.DDispatch1).ToList(); string chuoi = ""; foreach (RequestModel22 s in ls) { chuoi += "<tr>"; // chuoi += "<td>" + s.RId1 + "</td>"; chuoi += "<td>" + s.Rname1 + "</td>"; chuoi += "<td>" + s.CRQName1 + "</td>"; chuoi += "<td>" + s.DDispatch1 + "</td>"; // chuoi += "<td>" + s.Arise + "</td>"; chuoi += "<td>" + s.DApprove1 + "</td>"; chuoi += "<td>" + s.RContent1 + "</td>"; //("Select","DetailRQ4/"+rq.RId1,"Default1") chuoi += "<td><a href='/Default1/DetailRQ4/" + s.RId1 + "'>Select</a></td>"; chuoi += "</tr>"; } Response.Write(chuoi); } return null; }