@{ acartuchos.fSeguridad("codigo"); string tecnico = "", estatus = "", clave = ""; string orden = Request.QueryString["o"]; var db = WebMatrix.Data.Database.Open("cweb"); string sSQL = "SELECT * FROM ordenes WHERE id = '" + orden + "'"; db.QuerySingle(sSQL); var selectQueryString = ("select * from catart"); db.Query(selectQueryString); var sql_h = ("select * from crm_casos_h WHERE orden = '" + orden + "' ORDER BY id DESC"); db.Query(sql_h); }

INFORMACIÓN DE LA ORDEN

@{ foreach (var row in db.Query(sSQL)) { clave = row.cliente; tecnico = row.tecnico; estatus = row.estatus; } 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 @{ if (row.tecnico != "") { @row.tecnico } else {
} }
@{ int cc = 1; float subtotal = 0; decimal tPeso = 0; float total = 0, porcentaje = 0; string sSQL_articulos = "SELECT * FROM artvent WHERE orden = '" + orden + "'"; db.QuerySingle(sSQL_articulos); foreach (var item in db.Query(sSQL_articulos)) { string id = item.id.ToString(); string imagen = item.id + ".jpg"; float precio = float.Parse(item.precio.ToString("N2")); int cantidad = Convert.ToInt32(item.cantidad); float monto = (precio * cantidad); subtotal = subtotal + monto; } db.Connection.Close(); db.Close(); db.Dispose(); }
Cant Nombre Precio Monto
@item.nombre
@item.descripcion
@monto.ToString("N2") remove_circle

TOTAL: @subtotal MXN

@if (tecnico == Session["cweb_tecnico"].ToString() && estatus == "PEN") {
}

HISTORIAL DE OBSERVACIONES


@foreach (var row in db.Query(sql_h)) { }
Fecha Tecnico Observación
@row.fecha @row.tecnico @row.comentario



@if (tecnico == "") { } else { if (estatus != "TER") { if (estatus == "OK") {
} else {
} } }