- Code: Select all Expand view
function PlanillaMantDiarios( oCn )
LOCAL oDlg, oFont1, oFont2, oFont3, oBrw, oRs, csql, oGet:={}
oGet:=Array(2)
cSql := "SELECT * FROM mantenimientos JOIN planilla JOIN maquinas JOIN sectores ON ( mantenimientos.mant_id = planilla.plaMant_id and mantenimientos.mantMaq_id = maquinas.Maq_id and mantenimientos.mantSector_id = sectores.Sector_ID ) WHERE ( planilla.pla_mes = 11 and planilla.pla_anio = 2021 )"
oRs := oCn:RowSet( cSql )
DEFINE DIALOG oDlg RESOURCE "DLG_PLAMDIARIOS" TITLE "Planilla de Mantenimientos Diarios"
REDEFINE GET oGet[1] VAR wmes id 101 picture "99" of oDlg
REDEFINE GET oGet[2] VAR wanio id 102 picture "9999" of oDlg
REDEFINE XbROWSE oBrw id 201 of oDlg DATASOURCE oRs ;
COLUMNS "mant_nombre", "pla_mes", "pla_anio", "Sector_Nombre", "D1", "D2", ;
"D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", ;
"D13", "D14", "D15", "D16", "D17", "D18", "D19", "D20", "D21", "D22", ;
"D23", "D24", "D25", "D26", "D27", "D28", "D29", "D30", "D31" ;
HEADERS "Mantenimiento:", "Mes:", "Año:", "Sector:", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", ;
"13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" ;
SIZES 320, 30, 40, 120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, ;
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20
FASTEDIT
WITH OBJECT oBrw
:nEditTypes := EDIT_GET
:SetChecks( nil, .t. )
:nfreeze := 4
:lEdit:=.t.
END WITH
ACTIVATE DIALOG oDlg CENTER
oRs:Close()
RETURN nil
No me deja editar las celdas excepto la primera y no encuentro porqué, quizá alguien de foro me pueda dar una mano por favor.