|
I changed the code to
credits = myReader.Item(16)
If credits <> rowvalue Then
rowvalue = credits
field(21) = rowvalue.ToString()
Else
field(21) = ""
End If
And it appears to be working! I'm having to use sample data working from home, but will test with real data in the a.m.
Thanks for your help!!!
Stephanie
|
|
|
|
|
Im using a VB. net PL i just want to know how to customize gridview...tnx
sunshine
|
|
|
|
|
Any way you like. Do you want to change the column definitions, how it looks, if it shows edit/delete buttons, what those buttons call, or something else ?
All of these things are covered in MSDN and other articles, in detail that will help you a lot more than a forum post can hope to.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
OK. In which of the thousands of ways would you like to "customize" the DGV? Or should we just guess?
|
|
|
|
|
how can i change the color of the heading and how to change its font style
sunshine
|
|
|
|
|
|
Hai to all dear friends, I am developing an 2 tier windows application in vb.net . In this project i used web service to access data .
I am seeking problems in updating and adding new records in my sql database through web service .
Please help me .
also if u may suggest any other option to create 2-tier application .
I will very very thankful to u .
Yogendra Dubey
email :- mesagetoyogi@gmail.com
|
|
|
|
|
I'm not sure what you're looking for here. The web service is going to have to expose a few public methods for you to call to tell it to how update the database. I'd imagine you'd have to supply a method for each of the possible SQL update methods, like UPDATE, INSERT, and DELETE.
|
|
|
|
|
Can anyone help me with a code to open a cash drawer in VB.Net 2003. I am stuck please assist me. I am new to hardware commands.
rgds
initial
|
|
|
|
|
you think we all are idiots here?
colgateas900197
|
|
|
|
|
imla wrote: I am stuck
inside the cash drawer?
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
LOL!!!
|
|
|
|
|
We can't answer the question because you haven't said anything about how the cash drawer is connected to the machine, nor what commands to send, or anything else we need to know to give you a useful answer. Well, other than telling you what you need to do would be covered in the manual for the cash drawer...
|
|
|
|
|
Dave Kreskowiak wrote: Well, other than telling you what you need to do would be covered in the manual for the cash drawer...
Which is what we were bound to say anyhow....
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Oh, crap! Did I give away too much information??
I don't know...It seem'd like I was over stating stating the obvious. Or was I being too dramatic? My performance wasn't too "over the top", was it? What do you think?
|
|
|
|
|
*grin*
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The truth is that the system should be able to open any cash drawer nommatter how they are connected(either direct to a computer or through a receipt).
I will look for the commands for all the drawers and then define them or allow the users to define the commands to open their drawer.
I need the source code that sends any commands.
I need a step by step approach here. help me.
Thanks
Fear The Lord
|
|
|
|
|
You have another problem. Not all cash drawers work on a Serial port. Some are USB, others are custom Parallel implementations, and I've seen a couple on custom interfaces.
There's n standard to follow here. You're going to have to write plugin modules to support the type of interface that the draw is using. You might want to limit your app's support to just serial and usb drawers.
imlambo wrote: I need the source code that sends any commands.
To support Serial drawers, all you have to do is Google for "VB.NET Serial Port" and you'll find hundreds of examples.
imlambo wrote: I need a step by step approach here.
If you're asking this question, you're in serious trouble with this project.
|
|
|
|
|
Thanks very much for the advice.
I have decided to follow the following approach:
A) For Printer Driven Cash Drawers:
I will give an interface to define Printer settings as follows:
1)Printer Ports:Lists all Printer Ports on Computer and user selects.
2)Drawer Opening commands:to open the specific Drawer.eg.
I have googled the following code for use: To send commands to the Printer(EPSON) To Open the drawer.
Public Sub open_cashdrawer()
Dim intFileNo As Integer = FreeFile()
FileOpen(1, "c:\escapes.txt", OpenMode.Output)
PrintLine(1, Chr(27) & "p" & Chr(0) & Chr(25) & Chr(250))
FileClose(1)
Shell("print /d:lpt1 c:\escapes.txt", vbNormalFocus)
End Sub
I will put this code before a receipt is printed.
My problem is that I do not have hardware and I am trying to design a system which should fit all Printers hence giving users to select ports and commands to open drawers.
I need to go to the client with a working solution and I need assurance whether this will work.
B)Connected Serially and Parralell.
Wish to follow when done with above.
thanks in advance
Fear The Lord
|
|
|
|
|
Does your cash register have a large lever? I've heard that reuse helps to leverage your code.
-- modified at 12:58 Friday 7th September, 2007
|
|
|
|
|
I have One Datagrid with a dataset that calls two tables - the First table is the table the user will be editing - which edited on the grid or in a textbox - as the user edits the grid - that info is automatically updated onto the database - My problem is - when user goes to the nested table the application is still looking for parameters to update the database - which is causing errors - how will I prevent this from happening on the second table here his my code snippent - I know it has to have something to do with MyDataset.Tables(1) but I can not get the syntax down for this at all.
'frmload<br />
Dim command1 As New SqlCommand("Select * FROM LateOrders_Header_view", cnn1)<br />
Dim command2 As New SqlCommand("Select * from LateOrders_Line_view", cnn1)<br />
'Dim SqlReader As SqlDataReader<br />
Try<br />
cnn1.Open()<br />
<br />
'Debug.WriteLine(cnn1.ConnectionString)<br />
Dim dt As New DataTable("LateOrders_Header_view")<br />
dgOrderReport.DataSource = dt<br />
Dim DirAdapter As New SqlDataAdapter(command1)<br />
Dim DirAdapter2 As New SqlDataAdapter(command2)<br />
Dim dc1 As DataColumn<br />
Dim dc3 As DataColumn<br />
Dim datarelation As DataRelation<br />
<br />
MyDataSet = New DataSet<br />
MyDataSet = New DataSet<br />
DirAdapter.TableMappings.Add("table1", "LateOrders_Header_view")<br />
DirAdapter.TableMappings.Add("table2", "LateOrders_line_view")<br />
<br />
DirAdapter.Fill(MyDataSet, "LateOrders_Header_view")<br />
DirAdapter2.Fill(MyDataSet2, "LateOrders_Line_view")<br />
<br />
dc1 = MyDataSet.Tables("LateOrders_Header_view").Columns("order_no")<br />
dc3 = MyDataSet.Tables("LateOrders_Line_view").Columns("order_no")<br />
datarelation = New DataRelation("Line View", dc1, dc3)<br />
MyDataSet.Relations.Add(datarelation)<br />
'dc3.ReadOnly = True<br />
<br />
dgOrderReport.DataSource = MyDataSet.DefaultViewManager '.CreateDataView.Tables("LateOrders_Header_view").DefaultView<br />
dgOrderReport.DataMember = "LateOrders_header_view"
'This controls the grid click event - This is where I believe I need to add something to let it know that this dosent apply to the second table
How do I let it know not to do this (below) for second table.
<br />
Private Sub dgOrderReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgOrderReport.Click<br />
Try<br />
<br />
txtReason.Text = dgOrderReport.Item(dgOrderReport.CurrentRowIndex, 4) & ""<br />
txtReason.Enabled = False<br />
chkReason.Checked = False<br />
<br />
Catch ex As Exception<br />
MessageBox.Show(ex.Message)<br />
End Try<br />
<br />
End Sub<br />
Any Ideas....
Thank You
|
|
|
|
|
This looks like a normal master/detail setup. I would suggest start by looking at some samples, like these[^].
|
|
|
|
|
Hello!
I have created a custom control, build it and added its reference in my main application...
Control apears in tool box! When i drag it on my main form (at design time)its ok but when i want to create it dynamically like: Dim myc as new
i could not find name of my custom control to create it on run!
Any clue, How can i access it dynamically?
Thanks in advance
colgateas900197
|
|
|
|
|
If its in a different namespace or assembly than teh code referencing it then do you have an imports statement for that?
|
|
|
|
|
Oh no! That was the problem!!!!
It works! Thankyou...
God bless you my friend!
colgateas900197
|
|
|
|