@{ acartuchos.fSeguridad("codigo"); string texto = ""; string sSQL = ""; string sucursal = Session["sucursal"].ToString(); var db = WebMatrix.Data.Database.Open("cweb"); try { texto = Request.QueryString["s"].ToString(); } catch (Exception ex) { texto = ""; } if (texto != "" && texto != "*") { sSQL = "SELECT * FROM ordenes WHERE sucursal = '" + sucursal + "' AND (id LIKE '%" + texto + "%' OR estatus LIKE '%" + texto + "%' OR nombre LIKE '%" + texto + "%') "; db.QuerySingle(sSQL); } else { sSQL = "SELECT * FROM ordenes WHERE sucursal = '" + sucursal + "' ORDER BY id"; db.QuerySingle(sSQL); } }

RE IMPRESIÓN DE ORDENES DE SERVICIO

@{ foreach (var row in db.Query(sSQL)) { } db.Connection.Close(); db.Close(); db.Dispose(); }
NO. NOMBRE FECHA ESTATUS TECNICO
@row.id @Html.Raw(acartuchos.NombreCliente(row.cliente)) @row.fecha.ToString("dd-MM-yyyy") @row.estatus @row.tecnico print