473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

i getting errors are type and name is not declared in my code

Imports System.Data.SqlClient
Imports System
Imports System.IO
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls

Partial Public Class citem_ee
Inherits System.Web.UI.Page

Dim conn As New SqlConnection(GetConn)

Dim p As xPackage
Dim i As xItem
Dim c As xCustomer
Dim b As xBrand

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim lblMsg As New Label
Dim lblTitle As New Label
Dim lblTId As New Label
Dim lblTMake As New Label
Dim lblTItemId As New Label
Dim lblTModel As New Label
Dim lblTCondition As New Label
Dim lblTIMEI As New Label
Dim lblTCost As New Label
Dim lblTValued As New Label
Dim lblTStored As New Label
Dim lblTCredited As New Label
Dim lblTDeleted As New Label
Dim chr(160) As Char
lblMsg.Text = Chr(160)

Dim id As Integer = 0
Try
id = Request.QueryString("id")
Catch ex As Exception
id = 0
End Try

If id > 0 Then
i = New xItem(id)
If i.GetID > 0 Then
p = New xPackage(i.PackageID)
If p.GetID > 0 Then
If p.CustomerID = CustID(User) Then
c = New xCustomer(CustID(User))
b = New xBrand(c.BrandID)
If Not Page.IsPostBack Then
Dim lang As String = b.Lang
Bind()
lblTitle.Text = GetText("Item", lang)
lblTId.Text = GetText("RecyclingPackage id:", lang)
lblTItemId.Text = "ringluspaketi id" 'GetText("item id:", lang)
lblTMake.Text = GetText("make:", lang)
lblTModel.Text = GetText("model:", lang)
lblTCondition.Text = GetText("phone condition:", lang)
lblTIMEI.Text = "imei:"
lblTCost.Text = GetText("price:", lang)
'lblTDescription.Text = GetText("description:", lang)
lblTValued.Text = GetText("valued:", lang)
lblTStored.Text = "kätte saadud" 'GetText("stored:", lang)
lblTCredited.Text = GetText("credited:", lang)
lblTDeleted.Text = GetText("deleted:", lang)
End If
Else
cInsufficientRights(b.Lang)
End If
Else
cShowMessage("Database connection error.")
End If
Else
cShowMessage("Database connection error.")
End If
Else
cShowMessage("Database connection error.")
End If
End Sub

Protected Sub Bind()
BindPackage()
BindItem()
End Sub


Private Sub BindPackage()
hlId.Text = ToIDFormat(p.GetID)
hlId.NavigateUrl = RootLevel(True) & "/customers_ee/cpackage.aspx?id=" & p.GetID
End Sub

Private Sub BindItem()
lblItemId.Text = ToIDFormat(i.GetID)
If i.Valued Then
Dim cost As Double = i.Cost * i.Rate
Dim curr As String = b.Currency
lblCost.Text = curr & " " & FormatNumber(cost, 2, , , -1)
Dim model As New xModel(i.ModelID)
Dim make As New xMake(model.MakeID)
lblMake.Text = make.Name
lblModel.Text = model.Name
Dim conditionName As String = GetConditionName(i.ConditionBought)
If (conditionName = "Working") Then
conditionName = "Töötav"
ElseIf (conditionName = "NonWorking") Then
conditionName = "Vigane"
ElseIf (conditionName = "BER") Then
conditionName = "Parandamiskõlbmatu"

End If
lblCondition.Text = conditionName
lblIMEI.Text = i.UniqueCode
Else
lblCost.Text = "-"
End If
'If i.FreeText.Trim.Length > 0 Then
' lblDescription.Text = i.FreeText.Replace(vbCrLf, "<BR>")
'Else
' lblDescription.Text = "-"
'End If

If i.Valued Then
lblValued.Text = i.ValuedTime.ToShortDateString
Else
lblValued.Text = "-"
End If
If i.Stored Then
lblStored.Text = i.StoredTime.ToShortDateString
Else
lblStored.Text = "-"
End If
If i.Credited Then
lblCredited.Text = i.CreditedTime.ToShortDateString
Else
lblCredited.Text = "-"
End If
If i.Deleted Then
lblDeleted.Text = i.DeletedTime.ToShortDateString
Else
lblDeleted.Text = "-"
End If

End Sub

Protected Function xToIDFormat(ByVal str As String) As String
Return ToIDFormat(str)
End Function
Nov 17 '10 #1
0 855

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Andrew Edwards | last post by:
Could someone please tell me what I'm doing wrong? The compiler barks at me whenever I throw (bad_alloc). If I remove this the code compiles just fine. template < class DT, class KF > class...
2
by: Brian Henry | last post by:
I want to list out a directory listing along with showing the file type name (like explorer does when it says something like "MyDoc.DOC - Microsoft Word Document" How do I get that file type name...
1
by: David Lozzi | last post by:
Hello, My webservice is receiving the following error. It runs fine on my local development machine,but when moved to production it errors. I found one KB about this error but it was in regards...
1
SKJoy2001
by: SKJoy2001 | last post by:
PLEASE HELP ME!!! P E R L!!! I have a CGI (PERL) file namely 'test.cgi' and it has the correct permission (755) on the FTP server and it is within the CGI path. I have the following code in it:...
6
by: srikar | last post by:
When the below function was run on linux64 bit machine in C++ i am getting the following problems. void real_rec::dump(ostream& s, const int indent ) const { s << "real = "; long f =...
1
by: saurabh.rbl | last post by:
Hello Friends, The problem is that i get the names of the object type dynamically at the run time as a string name to a function. Now this function is suppose to create an object of the type...
6
by: Deckarep | last post by:
I want to be able to pass in a function a string say: "TextBox" Then I need a way to convert that string representation into a Type object so i can search through some controls and check their...
1
by: jewel87 | last post by:
Hello, I am working on a program in C++ builder 6, which uses TDate and TDateTimePicker. I am getting the following error Product.h(58): E2303 Type name expected myGUI.cpp(39): E2316 'create'...
3
by: dazzler | last post by:
Please tell me why I get errors while compiling my code with GCC =( #include <stdio.h> int a; a = 12; a = 9; a = 14;
14
by: anju458 | last post by:
Hi, I had a function to compare two XML files within a project . Now I need to change that into a commandline exe in such a way that it whouls accept two params from the Command line. I have...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.