on 07-28-2016 2:24 AM
I converted the vb.net code to c# but am getting wrong records in the database table when converted to c# but in vb.net the same code is working fine. Please I need help in the image attached the code in master is not the same as rows
VB.NET CODE
If oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
If pVal.ItemUID = "MatrixI" And pVal.ColUID = "CDes" Then
oCDes = CType(oMatrixI.Columns.Item(1).Cells.Item(pVal.Row).Specific, SAPbouiCOM.EditText)
If oCDes.Value <> "" Then
oCDes = CType(oMatrixI.Columns.Item(1).Cells.Item(oMatrixI.RowCount).Specific, SAPbouiCOM.EditText)
If oCDes.Value <> "" Then
oForm.Freeze(True)
SBO_Application.Forms.Item("FrmG").DataSources.DBDataSources.Item("@GP_DL").Clear()
oMatrixI.AddRow()
For i As Integer = 1 To oMatrixI.RowCount
oMatrixI.Columns.Item(0).Cells.Item(i).Specific.Value = i
Next
oForm.Freeze(False)
End If
End If
End If
C# CODE
if (pVal.ItemUID == "MatrixI" & pVal.ColUID == "CDes") {
oCDes = ((SAPbouiCOM.EditText)(oMatrixI.Columns.Item(1).Cells.Item(pVal.Row).Specific)));
if (oCDes.Value != "") {
oCDes = ((SAPbouiCOM.EditText)(oMatrixI.Columns.Item(1).Cells.Item(oMatrixI.RowCount).Specific));
if (oCDes.Value != "") {
oForm.Freeze(true);
SBO_Application.Forms.Item("FrmG").DataSources.DBDataSources.Item("@GP_DL").Clear();
oMatrixI.AddRow();
for (int i = 1; i <= oMatrixI.RowCount; i++) {
SAPbouiCOM.EditText rowID = ((SAPbouiCOM.EditText)(oMatrixI.Columns.Item(0).Cells.Item(i).Specific));
rowID.String = i.ToString();
}
oForm.Freeze(false);
}
}
}
DATABASE RESULT
If you look at the description at the top of this space, you'll find that it's specifically for the .NET SDK that comes with SAP BusinessObjects. So, I think you've posted in the wrong space.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.