@{
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 + "%') AND estatus = 'PEN' AND tecnico = '' ";
db.QuerySingle(sSQL);
}
else
{
sSQL = "SELECT * FROM ordenes WHERE sucursal = '" + sucursal + "' AND estatus = 'PEN' AND tecnico = '' ORDER BY estatus";
db.QuerySingle(sSQL);
}
var sSQL_tecnico = "SELECT * FROM ordenes WHERE sucursal = '" + sucursal + "' AND tecnico = '" + Session["cweb_tecnico"] + "' AND estatus <> 'ENT' ORDER BY estatus";
db.QuerySingle(sSQL_tecnico);
}
ORDENES DE SERVICIO PENDIENTES
| NO. |
NOMBRE |
|
FECHA |
ESTATUS |
TECNICO |
@{
foreach (var row in db.Query(sSQL))
{
| @row.id |
@Html.Raw(acartuchos.NombreCliente(row.cliente)) |
|
@row.fecha.ToString("dd-MM-yyyy") |
@row.estatus |
@row.tecnico |
}
db.Connection.Close();
db.Close();
db.Dispose();
}
ORDENES DE SERVICIO TOMADAS POR: @Session["cweb_tecnico"]
| NO. |
NOMBRE |
|
FECHA |
ESTATUS |
TECNICO |
@{
foreach (var row in db.Query(sSQL_tecnico))
{
| @row.id |
@Html.Raw(acartuchos.NombreCliente(row.cliente)) |
|
@row.fecha.ToString("dd-MM-yyyy") |
@row.estatus |
@row.tecnico |
}
db.Connection.Close();
db.Close();
db.Dispose();
}