|
Hi All
I comme back with another Question.
i have followed droptiles tutorial and I would like to implement It. But I would like to display in the tile content (at the place of image) a div contening a chart. could you please help me achieve it? thanks in advance for your help!
Notice: I have around 10 of my usercontrol in the page, each one with its chart.
Sorry for my english. i hope you will understand my request.
Here is what a started
<div id="metro-sections-container" class="metro">
<div class="metro-sections">
<div class="metro-section" data-bind="foreach: tiles">
<div class="tile">
<div class="tile-icon-large">
<%----%>
<%----%>
</div>
</div>
</div>
</div>
</div>
and the script:
<script>
function Tile(param) {
this.label = ko.observable(param.label);
this.count = ko.observable(param.count);
this.icon = ko.observable(param.icon);
this.MyuserControl = ko.observable(param.MyuserControl);
}
var tile1 = new Tile({
label: "Label 1",
count: 10,
icon: "img/CutTheRope.png",
MyuserControl: "What will be here?"
});
var tile2 = new Tile({
label: "Label 2",
count: 20,
icon: "img/Desktop.png",
MyuserControl: "What will be here?"
});
var tile3 = new Tile({
label: "Label 3",
count: 30,
icon: "img/avatar474_2.gif",
MyuserControl: "What will be here?"
});
function ViewModel() {
this.tiles = ko.observableArray([]);
}
var viewModel = new ViewModel();
viewModel.tiles.push(tile1);
viewModel.tiles.push(tile2);
viewModel.tiles.push(tile3);
ko.applyBindings(viewModel);
window.setInterval(function () {
ko.utils.arrayForEach(viewModel.tiles(), function (tile) {
tile.count(tile.count() + 1);
});
}, 1000);
window.setTimeout(function () {
viewModel.tiles.push(new Tile({
label: "Label 3",
count: 30,
icon: "img/avatar474_2.gif",
MyuserControl: "What will be here?"
}));
jQuery('.metro-section').sortable();
}, 1000);
</script>
|
|
|
|
|
Wrong forum; try one of the web development forums on here.
|
|
|
|
|
I need to compare 2 tables and show the difference like this:
CurrentValue-Change Status(Delete,update,new)- PreviousValue
Test1 Update Test
Dim dtBenefitsCurrent As New DataTable=GetData()
Dim dtBenefitsPreviousYear As New DataTable=GetData()
?????
dtBenefitsCurrent.Merge(dtBenefitsCurrent)
Dim changesTable As DataTable = dtBenefitsCurrent.GetChanges ???????
|
|
|
|
|
Hi,
Can you do it this way ?
Dim tblDiff As DataTable = (From rA In dtBenefitsCurrent.AsEnumerable()Join rB In dtBenefitsPreviousYear.AsEnumerable() On rA.Field(Of Integer)("RowID") = rB.Field(Of Integer)("RowID") Into joinedRowsFrom ab In joinedRows.DefaultIfEmpty() Where ab Is NothingrA).CopyToDataTable(
I havent tested this, hence plz try and revert.
Hope this helps !!
Regards,
Praneet
|
|
|
|
|
I have copy your code and its not working
|
|
|
|
|
Hi, I am beginner and I am using Highcharts for first time but I am experiencing same difficulties.
I looking for a sample of code which can how to configure and update highcharts in vb.net (change type, set Axis format, change background-color, make refresh, etc. I am using Visual studio 2008
|
|
|
|
|
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[^]
|
|
|
|