getName() 공개 메소드

public getName ( ) : String
리턴 String
예제 #1
0
        private bool pInitCtrls(cReportControl ctrl, out int idx, List<object[]> recordsets, String fieldName)
        {
            bool found = false;
            int j = 0;
            bool bIsDBImage = false;

            string dataSource = pGetDataSource(fieldName);

            // index of the group which contains the control
            //
            int k = 0;

            for (int _i = 0; _i < recordsets.Count; _i++)
            {
                object[] varRs = recordsets[_i];                
                String rsDataSource = (String)varRs[1];
                if (rsDataSource.ToUpper() == dataSource.ToUpper() || dataSource == "")
                {
                    DataTable rs = (DataTable)varRs[0];

                    for (j = 0; j < rs.Columns.Count; j++)
                    {
                        if (rs.Columns[j].ColumnName.ToUpper() == cReportGlobals.getRealName(fieldName).ToUpper())
                        {
                            // TODO: we need to check what is the value of rs.Columns[j].DataType
                            //       when the column contains a binary field (tipicaly used for images)
                            //
                            System.TypeCode typeCode = System.Type.GetTypeCode(rs.Columns[j].DataType);
                            bIsDBImage = typeCode == System.TypeCode.Object;
                            found = true;
                            break;
                        }
                    }
                }
                if (found)
                {
                    break;
                }
                k = k + 1000;
            }

            if (found)
            {
                idx = j + k;
                if (bIsDBImage)
                {
                    ctrl.setControlType(csRptControlType.CSRPTCTDBIMAGE);
                }
            }
            else
            {
                throw new ReportException(csRptErrors.FIELD_NOT_FOUND,
                                            C_MODULE,
                                            cReportError.errGetDescript(csRptErrors.FIELD_NOT_FOUND, ctrl.getName(), fieldName)
                                            );
            }
            return true;
        }