er Dim indS As Integer Dim j As Integer Dim t As Integer Dim totc As Single Dim totcs As Single Dim totoc As Single Dim totos As Single Dim totol As Single Dim totop As Single Dim strG As String For i = 0 To lstSemestru.ListCount - 1 indS = lstSemestru.ItemData(i) totc = 0 'total credite pe semestrul inds totcs = 0 'total credite in spec pe semestrul inds totoc = 0 'total ore curs pe semestrul inds totos = 0 'total ore sem pe semestrul inds totol = 0 'total ore lab pe semestrul inds totop = 0 'total ore pr pe semestrul inds For j = 1 To gNrDisciplineContract If Not gTabelDisciplineContract(j).Sters Then If gTabelDisciplineContract(j).semestru = indS Then IDisc = gTabelDisciplineContract(j).IDisc If IDisc <> 0 Then totoc = totoc + gTabelDiscipline(IDisc).OreCurs totos = totos + gTabelDiscipline(IDisc).OreSem totol = totol + gTabelDiscipline(IDisc).OreLuc totop = totop + gTabelDiscipline(IDisc).OrePr totc = totc + gTabelDiscipline(IDisc).Credite t = gTabelDiscipline(IDisc).tip If t = 1 Or t = 2 Then totcs = totcs + gTabelDiscipline(IDisc).Credite End If End If End If End If Next j strG = CStr(indS) & Chr(9) & _ Format$(totc, "0.00") & Chr(9) & _ Format$(totcs, "0.00") & Chr(9) & _ Format$(totoc, "0.00") & Chr(9) & _ Format$(totos, "0.00") & Chr(9) & _ Format$(totol, "0.00") & Chr(9) & _ Format$(totop, "0.00") grdStatistici.row = i + 1 ModificaLinie grdStatistici, strG Next i If grdStatistici.Rows > 1 Then grdStatistici.FixedRows = 1 End Sub Private Sub AdaugaLinieGridContract(id As Integer, semC As Integer) Dim StrGrid As String StrGrid = semC & Chr(9) & _ gTabelDiscipline(id).AnUnivPlan & Chr(9) & _ gTabelDiscipline(id).cod & Chr(9) & _ gTabelDiscipline(id).den & Chr(9) & _ gTabelDiscipline(id).tip & Chr(9) & _ Format$(gTabelDiscipline(id).OreCurs, "0.0") & Chr(9) & _ Format$(gTabelDiscipline(id).OreSem, "0.0") & Chr(9) & _ Format$(gTabelDiscipline(id).OreLuc, "0.0") & Chr(9) & _ Format$(gTabelDiscipline(id).OrePr, "0.0") & Chr(9) & _ Format$(gTabelDiscipline(id).Credite, "0.0") & Chr(9) & _ gTabelDiscipline(id).ModFinalizare & Chr(9) & _ gTabelDiscipline(id).semPlan & Chr(9) & _ gTabelDiscipline(id).codIndrum & Chr(9) & _ CStr(id) grdContract.AddItem StrGrid End Sub Private Sub StergeLinieGridContract(id As Integer) Dim i As Integer For i = 1 To grdContract.Rows - 1 If CInt(CitesteText(grdContract, i, 13)) = id Then StergeLinieIndice grdContract, i Exit For End If Next i End Sub Private Sub SalveazaDateContract() Dim strCaut As String Dim rst As New ADODB.Recordset Dim i As Integer Dim IDisc As Integer Dim sectia As Integer strCaut = "Select * from STUDENTI_CONTRACTE where " & _ "[Facultatea] = " & gCodFac & " AND " & _ "[Sectia] = " & gTabelStudenti(gIndiceStudent).sectia & " AND " & _ "[NrMatricol] = " & Chr(34) & gTabelStudenti(gIndiceStudent).Matricol & Chr(34) & ";" 'deschide rst in actualizare rst.Open strCaut, cnnStud, adOpenKeyset, adLockOptimistic 'sterge inregistrarile sterse If rst.RecordCount > 0 Then For i = 1 To gNrDisciplineContract If gTabelDisciplineContract(i).Sters Then If gTabelDisciplineContract(i).id > 0 Then 'disc inreg in STUDENTI_CONTRACTE rst.MoveFirst rst.Find "ID = " & gTabelDisciplineContract(i).id If Not rst.EOF Then rst.Delete If rst.RecordCount > 0 Then rst.MoveFirst End If End If