@{ 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 + "%') AND estatus = 'TER' "; db.QuerySingle(sSQL); } else { sSQL = "SELECT * FROM ordenes WHERE sucursal = '" + sucursal + "' AND estatus = 'TER' ORDER BY estatus"; db.QuerySingle(sSQL); } }

ORDENES POR ENTREGAR

@{ foreach (var row in db.Query(sSQL)) { acartuchos.CalculaMonto(row.id.ToString()); } db.Connection.Close(); db.Close(); db.Dispose(); }
NO. NOMBRE MONTO ESTATUS TECNICO
@row.id @Html.Raw(acartuchos.NombreCliente(row.cliente)) @row.total.ToString("N2") @row.estatus @row.tecnico