|
No, I don't think I did it in XML. I saved the objects in a binary format.
|
|
|
|
|
larsp777 wrote: No, I don't think I did it in XML. I saved the objects in a binary format.
If you save a collection using the binary-formatter, then it'll also save the pointers. If you use XML, you'll have to save the relations yourself, or keep a list.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
So...what do you suggest I do...
|
|
|
|
|
Use the binaryformatter[^] to store it as binary data. It's that, or doing some extra work to have it correctly in XML.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
When you are saving objects with cross reference, then always be sure to choose the right format.
|
|
|
|
|
That´s the problem I guess, I don´t know what the right format is.
|
|
|
|
|
how can get today closing balance opening tomorrow or month using asp.net c# and sql2005 is it possible
|
|
|
|
|
Probably by explaining where these values are stored, and how you access them.
Use the best guess
|
|
|
|
|
sir
I store value in database SQL 2005 and reflect it on web form on month basis to text box with using ASP.net
|
|
|
|
|
Probably better to use an ATM. Or explain your problem properly, with information about your database scheme/object model.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
protected void Drp_Breed_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox47.Text = Drp_Breed.SelectedItem.Text;
//Drp_Breed.Items.Insert(0, "----------");
{
general objGen = new general();
DataSet ds2 = new DataSet();
string q2 = "select distinct cl_bal_young_m,cl_bal_young_f,cl_bal_adult_m,cl_bal_adult_f from AHD_09 where District='" + Drp_District.SelectedItem.Text + "' and SDVH_VPC='" + Drp_VH.SelectedItem.Text + "' and VH_CVD_Others='" + Drp_CVD.SelectedItem.Text + "'and VD='" + Drp_VD.SelectedItem.Text + "' and Other_Institution='" + Drp_Other.SelectedItem.Text + "' and name_breed='" + Drp_Breed.SelectedItem.Text + "' and name_breed='" + TextBox47.Text + "' and Date='" + DateTime.Now.AddMonths(0).Date.ToString() + "'";
SqlCommand cmd = new SqlCommand(q2, conn);
ds2 = objGen.que_exe(q2);
////District='" + Drp_District.SelectedItem.Text + "'and
conn.Open();
if (ds2.Tables[0].Rows.Count > 0)
{
TextBox1.Text = ds2.Tables[0].Rows[0]["cl_bal_young_m"].ToString();
TextBox2.Text = ds2.Tables[0].Rows[0]["cl_bal_young_f"].ToString();
TextBox3.Text = ds2.Tables[0].Rows[0]["cl_bal_adult_m"].ToString();
TextBox4.Text = ds2.Tables[0].Rows[0]["cl_bal_adult_f"].ToString();
}
conn.Close();
|
|
|
|
|
Modify your original question, and remember to format your code using the "code" button please. It'll make it easier to read and you'll get more help.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
you are not giving enough information / code snippets to help.
How are you storing the data? (structure and very small sample data would help!).
From the little information given I would suggest that you look at either LINQ sum() method or if you are using ADO.NET and T SQL I would then have a look at the SUM(columnName)
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
protected void Drp_Breed_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox47.Text = Drp_Breed.SelectedItem.Text;
//Drp_Breed.Items.Insert(0, "----------");
{
general objGen = new general();
DataSet ds2 = new DataSet();
string q2 = "select distinct cl_bal_young_m,cl_bal_young_f,cl_bal_adult_m,cl_bal_adult_f from AHD_09 where District='" + Drp_District.SelectedItem.Text + "' and SDVH_VPC='" + Drp_VH.SelectedItem.Text + "' and VH_CVD_Others='" + Drp_CVD.SelectedItem.Text + "'and VD='" + Drp_VD.SelectedItem.Text + "' and Other_Institution='" + Drp_Other.SelectedItem.Text + "' and name_breed='" + Drp_Breed.SelectedItem.Text + "' and name_breed='" + TextBox47.Text + "' and Date='" + DateTime.Now.AddMonths(0).Date.ToString() + "'";
SqlCommand cmd = new SqlCommand(q2, conn);
ds2 = objGen.que_exe(q2);
////District='" + Drp_District.SelectedItem.Text + "'and
conn.Open();
if (ds2.Tables[0].Rows.Count > 0)
{
TextBox1.Text = ds2.Tables[0].Rows[0]["cl_bal_young_m"].ToString();
TextBox2.Text = ds2.Tables[0].Rows[0]["cl_bal_young_f"].ToString();
TextBox3.Text = ds2.Tables[0].Rows[0]["cl_bal_adult_m"].ToString();
TextBox4.Text = ds2.Tables[0].Rows[0]["cl_bal_adult_f"].ToString();
}
conn.Close();
but it show only next month after insert value
|
|
|
|
|
first thing I would suggest is that you
1. put a break point on the SQL string q2
2. after stepping over it have a look at the SQL and run it in your database, does this give you the results that you are expecting?
3. purely is a nit pick I would look into having SQL Parameters, but do this after you have sorted out the exisitng query
SQL Parameters example[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
I am new to learn WPF and MVVM design pattern, beginner for both. So can anyone suggest me the tutorials for WPF and MVVM design pattern in C# with examples.
Thanks in advance.
|
|
|
|
|
|
Thanks Rechard for your prompt reply.
I visited this link, but don't identify from where to start as a beginner. I just want to make clear some basic understanding and idea of WPF & MVVM. After that I will go to these links for little bit more clear about its aspects.
Once again thanks.
|
|
|
|
|
|
Thanks Rechard for your reply.
|
|
|
|
|
I'm supposed to write a very simple program to display, "A, B, C (and a sentence I forgot already)".
The catch is, we're supposed to use the Unicode instead of the string literals for A, B, C.
I know the Unicode for the A character, the book I'm reading uses its Unicode as an example.
I went backwards and forwards in my book a few chapters, nowhere in it does it explain or give an example on how it got that Unicode for the capital letter A.
I new how to display the data type of a variable with:
<pre lang="c#">
Console.WriteLine(x.GetType);
</pre>
Is there a similar enumeration to find the Unicode?
(Did I use enumeration in the right context here? Trying to learn the lingo as I go.)
|
|
|
|
|
If you know the Unicode value for "A", then you can work out the rest quite easily; just by adding 1 to the value for each successive letter up to "Z". And if you need the value for any of the less common characters then the Windows Character Map application will show them to you.
Use the best guess
|
|
|
|
|
I thought about that… But, because I'm in the beginning stages of learning C#
I wanted to be sure, instead of just jumping right in.
Thanks.
PS-it would be nice to know how to convert a literal character to Unicode programmatically.
<a href="http://www.widmarkrob.com">My Coding Journey</a>
|
|
|
|
|
WidmarkRob wrote: it would be nice to know how to convert a literal character to Unicode programmatically. A literal character in C# is already a Unicode value, you just need to use a cast to get that value. For example:
char strCharacter = 'Q';
Console.WriteLine(strCharacter);
int value = (int)strCharacter;
Console.WriteLine(value);
Console.WriteLine("{0:X}", value);
Use the best guess
|
|
|
|
|
Okay, I'm missing something somewhere…
<pre lang="c#">
Console.WriteLine("\u0041");
</pre>
That Prints out to the Console Window:
A
LOL, when I change 41 into 82 it gave me the:
?
<a href="http://www.widmarkrob.com">My Coding Journey</a>
|
|
|
|