andrefogelman
Posts: 117
|
Posted: 04/07/2005, 9:47 AM |
|
Error: C:\DOCUME~1\ANDREA~1.000\LOCALS~1\Temp\~Chevra\MANUTENCAO_maint.aspx.vb(212) : error BC30469: Reference to a non-shared member requires an object reference.
MANUTENCAOLabel2.Text = hebrewcalendar.ToDateTime( 5765, 2, 2,0,0,0,0,1)
~~~~~~~~~~~~~~~~~~~~~~~~~
C:\DOCUME~1\ANDREA~1.000\LOCALS~1\Temp\~Chevra>REM _End MakeAll
Output
Error:
C:\Documents and Settings\andre.ANF.000>REM _MakeAll @1-2C6C8B93
C:\DOCUME~1\ANDREA~1.000\LOCALS~1\Temp\~Chevra>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc /rootnamespace:Chevra /t:library /out:bin\Chevra.dll /imports:System.Data.OracleClient /r:System.Data.OracleClient.dll /imports:Microsoft.VisualBasic,System,System.Web,System.Xml,System.Data,System.Drawing /r:Microsoft.VisualBasic.dll,System.dll,System.Web.dll,System.Xml.dll,System.Data.dll,System.Drawing.dll,C:\Inetpub\wwwroot\FCKEditor\bin\Release\FredCK.FCKeditorV2.dll /recurse:*.vb
Microsoft (R) Visual Basic .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322.2032
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
I included in my software which I'm developing using CCS and VB.NET the
Imports System.Globalization.HebrewCalendar
in order to be able to convert date formats. I seem unable to use the correct calling convention. Does anyone have experience? Bellow is the complier error message
C:\DOCUME~1\ANDREA~1.000\LOCALS~1\Temp\~Chevra\MANUTENCAO_maint.aspx.vb(212) : error BC30469: Reference to a non-shared member requires an object reference.
MANUTENCAOLabel2.Text = hebrewcalendar.ToDateTime( 5765, 2, 2,0,0,0,0,1)
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
Andre Fogelman
|
Posted: 04/07/2005, 1:24 PM |
|
I have figured out the solution and I am sharing with anyone who might face this date conversion problem
dim he as CultureInfo = new CultureInfo("he-IL")
dim dia, mes, ano as Integer
dia = (New IntegerField("",Settings.chevraDataAccessObject.ExecuteScalar("SELECT Extract (DAY from DATAFALECI) FROM INDCEMIT WHERE CODIGO_INDCEMIT = '" & request.querystring("CODIGO_INDCEMIT") & "'"))).GetFormattedValue("")
mes = (New IntegerField("",Settings.chevraDataAccessObject.ExecuteScalar("SELECT Extract (MONTH from DATAFALECI) FROM INDCEMIT WHERE CODIGO_INDCEMIT = '" & request.querystring("CODIGO_INDCEMIT") & "'"))).GetFormattedValue("")
ano = (New IntegerField("",Settings.chevraDataAccessObject.ExecuteScalar("SELECT Extract (YEAR from DATAFALECI) FROM INDCEMIT WHERE CODIGO_INDCEMIT = '" & request.querystring("CODIGO_INDCEMIT") & "'"))).GetFormattedValue("")
he.DateTimeFormat.Calendar = new HebrewCalendar()
dim dt as DateTime = new DateTime(5765, 7, 27, he.DateTimeFormat.Calendar)
dim hj as DateTime = new DateTime(Ano, mes, dia, New GregorianCalendar())
dt = hj
MANUTENCAOLabel12.text = "Dia gregoriano " & dt.Day
MANUTENCAOLabel14.text = "Mes gregoriano " & dt.Month
MANUTENCAOLabel15.text = "Mes gregoriano " & dt.Year
MANUTENCAOLabel13.text = "Dia Hebraico é: " & he.DateTimeFormat.Calendar.GetDayOfMonth(dt)
MANUTENCAOLabel2.text = "Mes Hebraico é: " & he.DateTimeFormat.Calendar.GetMonth(dt)
MANUTENCAOLabel11.text = "Ano Hebraico é: " & he.DateTimeFormat.Calendar.GetYear(dt)
|
|
|
|