|
Those appear to be JavaScript-only charts for use in web apps and with no ASP.NET server-side wrappers. This means you can't set them up from your VB.NET code. There won't be any samples in VB.NET.
If they support Ajax calls back to your server (ASP.NET and MVC), then you can send JSON formatted data back to them and they might update themselves.
There are demos on their own site, but they are going to be JavaScript only.
There is also a CodePlex open source project called DorNet.HighCharts, found here[^], but who is working on the project and support is up to you to determine if it's useful.
|
|
|
|
|
Hello !
I'm using entity framework with vb.net.
I need to know , which is the value of Context.Entry(Myobject).state in these cases :
1) I Add Myobject as new (Savechanges is not called yet) and after I modify it ?
2) I Add Myobject as new ( Savechanges is not called yet) and after i delete it ?
3) MyObject is a parent , and I add a new child for it ?
Thank you !
|
|
|
|
|
How about this. TRY IT!
Its' not that hard to figure out if you just set a breakpoint on the SaveChanges call and look at the values in the object in question in the debugger.
|
|
|
|
|
Thank you !
But I need to know before writing my application , because If these state aren't like I think I need to find another way.So please if someone knows , explain to me which are the states in these case.
Thank you !
|
|
|
|
|
Then write a small test application and try it.
Research is a large part of software development.
|
|
|
|
|
Hello !
I have a project in vb.net 2013 , Entity Framework 6 and SQL server 2008R2.
I have this situation :
In database I have 2 tables :
Table 1 : ID (aUTONUMBER, primary kEY) , Name , vl1
Table 2 : ID (AUTONUMBER , primary KEY) , name , value , Table1_id (Foreign key related with ID field in Table1).
In my Form :
I HAVE 2 BINDINGSOURCES : Table1BindingSource and Table2Bindingsource.
I have 3 buttons : New1 - that add new record in Table1BindingSource , New2 - that add a new record in Table2BindingSource , SAVE - tHAT SAVE ALL to database.
I HAVE PROBLEMS IN THIS CASE :
I ADD A NEW RECORD IN Table1BindingSource . After I Add new record to Table2Bindingsource ( but since the id field in Table1Bindingsource is not set yet, I set the Table1_id=0 for this new record ).
After I press the Save button that has this code :
--------------------------------------------------
Table2bindingsource.SuspendBinding()
context.savechanges()
For each itm in table2bindingsource
itm.Table1_id=Table1bindingsource.current.id
Next
Table2bindingsource.ResumeBinding()
context.savechanges()
-----------------------------------------------------
But after this , in database I have 1 record in Table1 , but on Table2 I have no records.
What can I do , because I need that users can add records to both bindingsources and after to press the save button ?
Thank you !
|
|
|
|
|
dilkonika wrote: What can I do You can ponder what would happen if the same record got an unique id on each server. Hint; it would exist twice.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I haven't used EF before, so this might not apply. Then again, using BindingSources takes away some repetitive and boring code, but also introduces a bit of a black box.
Your resulting copy-table would also include its own PK and have the original PK as a FK as shown in your example. That means waiting until the record is inserted into table 1, before it can be inserted into table 2. Means you probably can't simply "link" them.
A simpeler idea is to use (spit*) triggers. You simply copy the entire record into an exact copy of the table. The fun thing is that it allows you to reuse the queries designed for table1 on table2. Also works at the database-layer, taking another responsibility away from the client.
*) It is required to spit when talking about triggers.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
help me please
add new table in access database with vb2010
edit table name and save changes with vb2010
delete table with vb2010
i wany fill access tables in listview with vb2010
and can edit selected table name and save in database with vb2010
and i can delete table with vb2010
thanks
|
|
|
|
|
|
You need to ask something much more specific than "please do my job for me."
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi All...
I will explain what I need in as much detail as possible.
I need some kind of vb script,batch file or whatever to move a file into a separate folder when the program finds a word inside the file.
I have approx 900 files in a folder.One is a vehicle and one is a map for a game.They are mixed together and the only way of telling them apart is by opening each one with my hex editor and search for the word body,which means it is a vehicle.If the "body" word is not found,it is a map.Example of the files: mapname.idf carname.idf
If possible I would like a program to search for the body word and move all those files into a separate folder called vehiclesonly in the same folder where all these .idf files are.The files that do not have the "body" word in it can be left where they are.
Here is a link to one map and one vehicle file for an example:
Thanks a bunch!
Val
|
|
|
|
|
VBScript has a InStr[^] function which you could use to see if a string occurs in another string. Means you'd be looping all files, reading them as a string, checking whether it contains the word, and then performning your action.
I can help out if you have questions on any of those tasks, but I cannot write the code for you.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello !
I have a project in vb.net and sql server 2008R2 , Entity framework .I try to make a model refresh from database.
Before making the refresh , everything was ok , and on datasources I have added with Datasource configuration Wizard some object , and all were ok.
After the refresh , on Data Sources , all my object have a yellow triangle and the expression : "object name.." is no longer available.Verify the class name is correct and the reference to this class is still valid."
I try to insert the object again , I open the DataSource Configuration Wizard - I choose Object -Next.Here I have only app1 and app1.My.But when I expand I can't find any of the objects.
It's strange because on the right side on visual studio, if I click on Class View I can see all the object if I expand App1.
But on wizard there aren't. Before the refresh everything was ok.
I clean the solution and rebuild the solution again .But it's the same situation.
I close and open visual studio several times but nothing.
What can I do ?
Thank you !
|
|
|
|
|
dilkonika wrote: What can I do ? Google, and learn how an EF database is updated.
I have never used EF, mainly because the Wizards tend to hide stuff. That would make me dependent on their idea of how the data should flow and how updates should work.
There's a topic here[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have some code that I use to add information to excel cells in a spreadsheet. I want to also format the cells as I go, but I can't figure out how to get the code for formatting the cells involved. This is what I have:
theRow = theRow + 1
oSheet.Cells(theRow, 1).Value = rs!to
TheTO = rs!to
rs.MoveNext
I figure it should be before "MoveNext" but nothing I place there has any effect other than stopping the loop.
|
|
|
|
|
Hi there,
I want to send a request message to a web service. I must send one xml request per contract. The xml request contains a least one person element. The person information is in a database table.If a contract contains 2 persons in the database then i must include them both in the request.
What i am trying to do is read the person information from the database table and place it into a dataset and then use a for each loop to create each of the persons elements. Unfortunately i am yet unsuccessful.
For example if there is only one person in the database for one specific contract i will send something like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
<soapenv:Header>
</soapenv:Header>
<soapenv:Body>
<cre:Contract>
<cre:CONTRACT xsi:type="con:CONTRACT">
<con:ID>1</con:ID>
<pers:PERSON xsi:type="pers:PERSON">
<pers:LASTNAME>John</pers:LASTNAME>
<pers:FIRSTNAME>Dow</pers:FIRSTNAME>
<pers:GENDER>M</pers:GENDER>
<pers:CITIZENSHIP>USA</pers:CITIZENSHIP>
<pers:ADDRESS xsi:type="pers:CC_ADDRESS_INPUT">
<pers:COUNTRY>USA</pers:COUNTRY>
<pers:ZIPCODE>12345</pers:ZIPCODE>
<pers:CITY>NY</pers:CITY>
<pers:STREET>Dummy Street</pers:STREET>
</pers:ADDRESS>
<pers:ROLE xsi:type="pers:ROLE">
<pers:ROLE>Person</pers:ROLE>
</pers:ROLE>
</pers:PERSON>
</cre:CONTRACT>
</cre:Contract>
</soapenv:Body>
</soapenv:Envelope>
If i have two persons i should be able to loop for these person in the dataset and send the following xml request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
<soapenv:Header>
</soapenv:Header>
<soapenv:Body>
<cre:Contract>
<cre:CONTRACT xsi:type="con:CONTRACT">
<con:ID>1</con:ID>
<pers:PERSON xsi:type="pers:PERSON">
<pers:LASTNAME>John</pers:LASTNAME>
<pers:FIRSTNAME>Dow</pers:FIRSTNAME>
<pers:GENDER>M</pers:GENDER>
<pers:CITIZENSHIP>USA</pers:CITIZENSHIP>
<pers:ADDRESS xsi:type="pers:CC_ADDRESS_INPUT">
<pers:COUNTRY>USA</pers:COUNTRY>
<pers:ZIPCODE>12345</pers:ZIPCODE>
<pers:CITY>NY</pers:CITY>
<pers:STREET>Dummy Street</pers:STREET>
</pers:ADDRESS>
<pers:ROLE xsi:type="pers:ROLE">
<pers:ROLE>Person</pers:ROLE>
</pers:ROLE>
</pers:PERSON>
<pers:PERSON xsi:type="pers:PERSON">
<pers:LASTNAME>Nick</pers:LASTNAME>
<pers:FIRSTNAME>New</pers:FIRSTNAME>
<pers:GENDER>M</pers:GENDER>
<pers:CITIZENSHIP>USA</pers:CITIZENSHIP>
<pers:ADDRESS xsi:type="pers:CC_ADDRESS_INPUT">
<pers:COUNTRY>USA</pers:COUNTRY>
<pers:ZIPCODE>12345</pers:ZIPCODE>
<pers:CITY>LA</pers:CITY>
<pers:STREET>LA Street</pers:STREET>
</pers:ADDRESS>
<pers:ROLE xsi:type="pers:ROLE">
<pers:ROLE>Person</pers:ROLE>
</pers:ROLE>
</pers:PERSON>
</cre:CONTRACT>
</cre:Contract>
</soapenv:Body>
</soapenv:Envelope>
The code for the "for each" loop is the following:
Dim con As SqlClient.SqlConnection
con = Me.TransactionController.CreateConnection()
con.Open()
Dim sda As New SqlDataAdapter()
Dim cmd As SqlCommand = New SqlCommand("GetPersons", con)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@ID", ID)
Dim r As SqlDataReader = cmd.ExecuteReader()
cmd.Connection = con
sda.SelectCommand = cmd
con.Close()
Dim ds As New DataSet()
sda.Fill(ds)
If ds.Tables(0).Rows.Count > 0 Then
Dim dt As DataTable
Dim dr As DataRow
dt = ds.Tables(0)
Dim person1 As New PERSON
For Each dr In dt.Rows
person1.FIRSTNAME = dr("FIRSTNAME").ToString()
person1.LASTNAME = dr("LASTNAME").ToString()
person1.GENDER = dr("GENDER").ToString()
person1.CITIZENSHIP = RTrim(dr("CITIZENSHIP").ToString())
' Address()
Dim addr1 As New ADDRESS
addr1.STREET = dr("STREET").ToString()
addr1.CITY = dr("CITY").ToString()
addr1.COUNTRY = dr("COUNTRY").ToString()
addr1.ZIPCODE = dr("ZIPCODE").ToString()
person1.ADDRESS = New ADDRESS() {addr1}
'ROLE()
Dim role1 As New ROLE
role1.ROLE1 = ROLE_VALUE.Person
role1.ROLE1Specified = True
person1.ROLE = New ROLE() {role1}
PERSON = New PERSON() {person1}
Exit For
Next dr
ds.Dispose()
End If
''''''--------------------------
Any ideas how to solve my issue?
Thank you in advance.
|
|
|
|
|
|
Yes, patience or MSDN.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
jim haras wrote: Dim person1 As New PERSON
For Each dr In dt.Rows
person1.FIRSTNAME = dr("FIRSTNAME").ToString()
...
You're reading the values from each row and storing them in properties of the same object. If you want to convert each row to a Person object, you're going to have to create a new instance of the Person class for each source row, and store them in a list.
jim haras wrote: PERSON = New PERSON() {person1}
That doesn't look like a valid statement to me.
jim haras wrote: Exit For
You're exiting the loop after the first record. If you want to convert multiple records to Person objects, you'll need to loop through every record.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi there. Thank you for your answer. Can you give me an example?
Thank you.
|
|
|
|
|
Dim people As New List(Of PERSON)(dt.Rows.Count)
For Each dr In dt.Rows
Dim person As New PERSON
person.FIRSTNAME = dr("FIRSTNAME").ToString()
person.LASTNAME = dr("LASTNAME").ToString()
people.Add(person)
Next
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am creating a vb 6.0 project (with sql 2008 as database) on hospital mgmt system. here i m getting 2-3 problems mentioning below:-
1) How to find the total value of different items (i.e. In Pharmacy column i have entered price of different medicines, how to add all medicine's price to find the total price).
2) I need to make a final billing form for patient at the discharging time which will includes all the charges and fees he have to pay (like bed charge,doctor fee,pharmacy bill,tests fee), so how to link the values of all these forms in a separate form.
|
|
|
|
|
Sounds like a generic "order and orderitem" problem.
1) by looping all the stuff that the patient used, and looking up the prices.
2) this is what reports are for.
Kushal Kumar wrote: I am creating a vb 6.0 project No, you shouldn't. Make it VB.NET - it is available for free (vb6 is not free and is no longer sold), and there's a lot more examples and help for VB.NET.
VB6 has been dead for a long time.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Kushal Kumar wrote: I am creating a vb 6.0 project
For f***s sake, WHY ARE YOU USING VB6?? It's been dead and unsupported for quite a while now! As has already been said, get VB.NET and do this in a more modern language.
Kushal Kumar wrote: 1) How to find the total value of different items (i.e. In Pharmacy column i have entered price of different medicines, how to add all medicine's price to find the total price).
You have two options. Either do it in an SQL query or use a For/Next loop to iterate over the items and add each number together. Frankly, if this little part is difficult for you, STOP writing this software right now. A "hospital management system" is not something that should be attempted by someone who doesn't know the basics of what they're doing! YOU could kill someone if you screw up critical sections of code!
Kushal Kumar wrote: 2) I need to make a final billing form for patient at the discharging time which will includes all the charges and fees he have to pay (like bed charge,doctor fee,pharmacy bill,tests fee), so how to link the values of all these forms in a separate form.
Again, you don't have the slightest clue of what you're doing. STOP NOW. Learn how relational databases work. What you're proposing to write is a massive undertaking for someone who doesn't have a clue.
You're not going to get an explanation for the second question simply because it would take an entire book to relate all the concepts to you.
|
|
|
|