|
Oh, so not only do you want us to give you an idea for an app you can write in order to learn silverlight, you want us to write the code, too?
C'mon, be a programmer and just do it.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Oh, sorry
I just meant more details about the 'Stock Order Process' , not technical ideas about WCF,WWF , ....
anyway thanks for your time
Best wishes
|
|
|
|
|
Well, you could use WCF to simulate the ordering of items from a supplier. Use WF to control the process of orders when they come in, and the rules surrounding when orders should be placed, e.g. order this when an item goes below x. Finally, use Silverlight to maintain the details of items, and buy things so that your ordering process actually gets triggered.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
It is best to use a sample that you understand, try a bug tracking workflow, something with escalations, email alerts and feedback to the initiator.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi guys...i have a combobox on my form which is named as cmbfirma...and i fill it with a column of database..and i want user to add new firm if it doesnt exist in my database that is why i open new form and user writes new firm name to textbox and program writes new firm name to a txt file and i read it from there...and try to write that new form to my database..to do that i use code below
cmd.Parameters.AddWithValue("@firma",cmbFirma.SelectedItem.ToString());
but when i use it and check my database it writes there System.Data.DataRowView
and i tried another code below
cmd.Parameters.AddWithValue("@firma",cmbFirma.SelectedValue.ToString());
in that time it writes database normally only for the items which is listed in combobox and it gives error if i want to add the new firm name that i read from txt file...in error it says "Unable to set an object reference to an instance object"
what should i do to get rid off that errors ??
or should i use another database for my combobox ??
i use SqlExpress 2005 to create my database
thanks for your help
|
|
|
|
|
hi,
in order to help you answer this questions:
1. did you correctly create the cmd object ? show us
2. what SQL sentance did you use ? show us
Cheer's,
Alex Manolescu
|
|
|
|
|
hey man thanks for reply ...i created the cmd object like below
SqlCommand cmd; (i declared it global)
cmd= new SqlCommand("select distinct firma from Rehber", con);
and my SQL sentence is like that and i insert like below
cmd = new SqlCommand("insert into Rehber (ad_syd,firma,sektor,grup,cep_no,is_no,ev_no,fax,mail,web,msn,skype,adres,ilce,sehir,vergi_no,vrgi_daire,dgm_tarih) values (@ad_syd,@firma,@sektor,@grup,@cep_no,@is_no,@ev_no,@fax,@mail,@web,@msn,@skype,@adres,@ilce,@sehir,@vergi_no,@vrgi_daire,@dgm_tarih)", con);
cmd.Parameters.AddWithValue("@ad_syd",txtAdSyd.Text);
cmd.Parameters.AddWithValue("@firma",cmbFirma.SelectedValue.ToString());
cmd.Parameters.AddWithValue("@dgm_tarih", dateTimePicker1.Value);
cmd.Parameters.AddWithValue("@sektor",txtsektor.Text);
cmd.Parameters.AddWithValue("@grup", txtGrup.Text);
cmd.Parameters.AddWithValue("@cep_no", txtCep.Text);
cmd.Parameters.AddWithValue("@is_no",txtisTlf.Text);
cmd.Parameters.AddWithValue("@ev_no",txtEvTlf.Text);
cmd.Parameters.AddWithValue("@fax",txtFax.Text);
cmd.Parameters.AddWithValue("@mail", txtMail.Text);
cmd.Parameters.AddWithValue("@web", txtURL.Text);
cmd.Parameters.AddWithValue("@msn", txtMSn.Text);
cmd.Parameters.AddWithValue("@skype", txtSkype.Text);
cmd.Parameters.AddWithValue("@adres",txtAdres.Text);
cmd.Parameters.AddWithValue("@ilce", txtIlce.Text);
cmd.Parameters.AddWithValue("@sehir",txtSehir.Text);
cmd.Parameters.AddWithValue("@vergi_no", txtVergiNo.Text);
cmd.Parameters.AddWithValue("@vrgi_daire", txtVergiDaire.Text);
|
|
|
|
|
hi,
you wrote:
"cmd.Parameters.AddWithValue("@firma",cmbFirma.SelectedItem.ToString());
but when i use it and check my database it writes there System.Data.DataRowView"
But the ComboBox control SelectedItem property returns an object! NOT a DataRowView.
If you need the selected item from the combobox you should use:
cmbFirma.SelectedItem.ToString();
or try this:
cmbFirma.Items[cmdFirma.SelectedIndex].ToString()
Do you correctly data bound the ComboDox control ?
Anyway, it seems that you don't have a problem with the combobox!
Try to verify better the code.
You have many parameters and maby you switch someone of them..
Cheer's,
Alex Manolescu
|
|
|
|
|
hey man...i tried your suggestions and in the first one it writes again to database system.Data.DataRowView when i select the item from combobox i mean when i fill it with the datas from my db but it works for the item that i select from txt file....and it is same for the second one
|
|
|
|
|
how do you load you're new firm into the combobox ??
show us more code of you're application.
|
|
|
|
|
hey man
thanks for your help..finally it works as i wished
cmd.Parameters.AddWithValue("@firma",cmbFirma.Text);
by that way it works as i wished...thanks again for your help
|
|
|
|
|
with welcome,
cheer's man!
|
|
|
|
|
Hi. I'm having problems in showing all the data to a listbox. all of the data will be coming from a database and will be shown depending on the choices of the user. i tried to code it but it didn't work. here's my code:
public frmMainForm()
{
InitializeComponent();
string sConnection = "Provider = Microsoft.Jet.OLEDB.4.0;" + "Data Source = Schedule.mdb";
using (OleDbConnection dbConnect = new OleDbConnection(sConnection))
{
dbConnect.Open();
if (prog == "CS")
{
string sqlString = "SELECT cs_firstcourse, cs_secondcourse, cs_thirdcourse, cs_fourthcourse, cs_fifthcourse, cs_sixthcourse, cs_seventhcourse, cs_eighthcourse, cs_ninthcourse FROM CS WHERE cs_year = @chosenYear AND cs_term = @chosenTerm;";
OleDbCommand dbCmd = new OleDbCommand();
dbCmd.CommandText = sqlString;
dbCmd.Connection = dbConnect;
dbCmd.Parameters.AddWithValue("chosenYear", chosenYear);
dbCmd.Parameters.AddWithValue("chosenTerm", choseTerm);
using (OleDbDataReader dbReader = dbCmd.ExecuteReader())
{
if (dbReader.Read() == true)
{
for (int a = 0; a < 9; a++)
{
lstBoxCourses.Items.Add(dbReader[a].ToString());
}
}
else
{
MessageBox.Show("An error has occured while trying to retrieve data from the database", "Class Scheduling: Database Access Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
dbReader.Close();
}
}
dbConnect.Close();
}
}
can someone help me?
|
|
|
|
|
When you say "It didn't work" what did happen?
An Exception?
Nothing on the display?
Your computer burst into flames?
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
OriginalGriff wrote: Your computer burst into flames
Ouch, remind me never to run any of your code
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I've built hardware destroyers into embedded code before - if the software believes the hardware has been copied and the firmware pirated, it blows the PSU, and anything else it can get it's hands on. One of our asian distributors and a paraniod MD prompted that one...
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
I did something less severe several years ago. A company I worked for that I didn't completely trust used some software that I wrote in my own time that they relied on. I knew they wouldn't pay me for it (I was right) but it made my life so much easier whilst I was there so I permitted it's use making sure the T&Cs stated clearly that only I had the right to use the application at anytime and it was owned by me.
I wrote a 'bomb' in it that corrupted the exe if I didn't log on for a certain period. All the data that was used however (the data is of course their property) was placed at this point in unencrypted text files so they could access it but could no longer process it using *my* software.
After we inevitably parted company, the software went 'boom' atfter the expected ammount of time I pointed them to the text files when they rang to ask WTF and told them to go **** themselves. One of the highlights of my life
|
|
|
|
|
there's no data in the listbox that it supposed to show.
|
|
|
|
|
In that case, since it appears to be in your form constructor:
public frmMainForm()
{
...
} I assume that
if (prog == "CS") is failing - presumably because "prog" is not "CS" yet.
Where are you assigning that?
Have you put a breakpoint at the if statement, and looked as what "prog" is?
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
I declared the variable prog as global and used it to assign the value "CS" when the user has clicked the radio button. it is goes like this:
private void rdioProgCS_CheckedChanged(object sender, EventArgs e)
{
prog = "CS";
rdioProgCS.Enabled = false;
rdioProgIT.Enabled = false;
}
|
|
|
|
|
So since your code that tests it is in your constructor it will not be equal to "CS" until after the form is displayed...
By that time, it is too late, the constructor is only run once per instance.
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
ok. i understand now. i'll just transfer the code to a method (which didn't occured to me a while ago). what i first thought is if i put the code inside the method of the listbox the database will be opened once i clicked the listbox and since i need the data to be in the listbox before i click the listbox it will be too late so i put it in the constructor which i think is the best place because once the method of the form has ran the database will be open until i close the form.
|
|
|
|
|
i dont know but if you put break point and detecting the code.
|
|
|
|
|
Hi all,
txt_name.Text = (string)Session["Product_Name"];
if is a integer. . . .
How do i type it?
txt_number.Text =
Thank You
|
|
|
|
|
it is in string form you can do anything with it
{maybe Session["Product_Name"]=null}
modified on Saturday, January 30, 2010 4:51 AM
|
|
|
|
|