 |
|
 |
hi
i wana write a program with c# that have database with sql server,
when i creat a new database in sql and want to connect it to my program, my database 's name is'nt in list, any body can help me?
thanks guys
|
|
|
|
 |
|
 |
Hi Guys!
Iam a new in codding in c# using window application, i am trying to update in the datagridiview i am using three tier i have update Method code in DAL(DATA ACCESS LAYER)and i have the same method in BLL(BUSINESS LOGIC LAYER) but in PL(PRESENTATION LAYER)I don know how to choose the row to update in the datagridview can some one help me please check if that line is correct or not :((
below is the code
private void btnupdate_Click(object sender, EventArgs e)
{
=> string custid=(dataGridView1.CurrentRow.Cells[0].Value.ToString());
int result = 0;
DataGridViewCell cell=dataGridView1.CurrentRow.Cells[0];
TextBox id = (TextBox)cell.OwningRow("textBox1");
TextBox name = (TextBox)cell.OwningRow("textbox2");
TextBox surname = (TextBox)cell.OwningRow("textBox3");
TextBox address = (TextBox)cell.("textBox4");
try
{
result = objsys1.updtCustomer(id.Text, name.Text, surname.Text, address.Text);
if (result > 0)
{
MessageBox.Show("Record Update Successfully");
}
else
{
MessageBox.Show("Upadate was Unsuccessfully!!");
}
}
catch (Exception ee)
{
MessageBox.Show(ee.Message.ToString());
}
finally
{
objsys1 = null;
}
dataGridView1.EditingPanel = -1;
BindingList();
}
|
|
|
|
 |
|
 |
really its nice described by auther
|
|
|
|
 |
|
|
 |
|
 |
DEAR FRIENDS,
I AM MAKING A INVOICE SOFTWARE AND LOOKING TO MAKE MULTIPLAY FUNTION IN MY INVOICE IE,
Product Name | QTY | Rate | 15 GST Tax | Amount
ABC PRODUCT | 10Kgs | 100 | 0 | 1000
i want Qty * Rate In Gridview,
when i just put value in row it should multiply automaticly .
i hope you got my idea,
WAITING FOR YOUR REPLY PLESE GIVE ME ANY HELP.
thanks,
AAMIR JAVED
|
|
|
|
 |
|
 |
Hi,
I am using checklistbox in small fixed window form.
Cheklistbox shows list of options.
Those option has width size greater than fixed window size.Because of that i have to scroll to read whole option.
Can anyone give me solution which can be used as word wrapping concept used in notepad application?
So that i can read whole option without scrolling.
please reply?
|
|
|
|
 |
|
 |
Hello Nick,
Great tutorial I think it was a nice tutorial for those in need of help with listboxes and combo boxes. This tutorial is kept nice and simple and writing code it clean. Thanks Nick.
BTW, would you have something similar but in arrays?
I am doing a project I have this address book that i am implementing with arrays. It has six textboxes firstname, lastname, address, city,state and zip code plus a listbox to display data from the textboxes. I need to create an array that will hold 20 addresses and once I select a name from the listbox it will show data corresponding to the persons name and information to textboxes. How can I actually do that? I appreciate for your feedback. This is my code below and still working on it.
I also appreciate it if you can render a feedback and guide me in the right direction.
Thanks Nick.
private void btnAdd_Click(object sender, EventArgs e)
{
string[] ArrayString = new string[20] {txtFirstName.Text, txtLastName.Text,txtAddress.Text, txtCity.Text,txtState.Text,
txtZipCode.Text};
for (int myString = 0; myString <= 20; myString++)
{
arrayNameListBox.Items.Add(ArrayString);
}
foreach (string myString in ArrayString)
{
arrayNameListBox.Items.Add(ArrayString);
}
arrayNameListBox.Items.Add(txtFirstName.Text + " " + txtLastName.Text);
arrayNameListBox.Items.Add(txtAddress.Text);
arrayNameListBox.Items.Add(txtCity.Text + " " + txtState.Text + " "
+ txtZipCode.Text + "\r" + "\n");
}
private void addToolStripMenuItem_Click(object sender, EventArgs e)
{
arrayNameListBox.Items.Add(txtFirstName.Text + " " + txtLastName.Text);
arrayNameListBox.Items.Add(txtAddress.Text);
arrayNameListBox.Items.Add(txtCity.Text + " " + txtState.Text + " "
+ txtZipCode.Text + "\r"+"\n");
}
private void btnDelete_Click(object sender, EventArgs e)
{
if (arrayNameListBox.SelectedIndex > -1)
arrayNameListBox.Items.RemoveAt(arrayNameListBox.SelectedIndex);
}
private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
{
if (arrayNameListBox.SelectedIndex > -1)
arrayNameListBox.Items.RemoveAt(arrayNameListBox.SelectedIndex);
arrayNameListBox.Select();
}
}
When I built the program this error occurred which is driving me crazy.
The error points to this section of the array (new string[20], {txtFirstName.Text)I used a comma to indicate the area of the error.
Error1 Invalid rank specifier: expected ',' or ']'
Please, can you help me?
Thanks.
Desi Bravo
bravo659
|
|
|
|
 |
|
 |
I want to make a one ComboBox with 3 color red , blue and white for backcolor.... so , what can I do for this ?
Please help me !
THX.
Valeriu.
|
|
|
|
 |
|
 |
I'm a newbie so forgive the stupid question, but I am using VS2003, downloaded this code sample and cannot get either the combobox or the listbox to display entries - no matter what I do. The items are there though - the number of entries in each control that should be there are selectable.
Any thoughts as to why this would be happening?
|
|
|
|
 |
|
 |
Thank you for the example.
I'm new to C# Win-Apps, so please keep it simple.
I'm a wannabi Hardcore C#-programmer,
but that can wait till i have learned the basics
Jacob Stokholm
Copenhagen, Denmark
|
|
|
|
 |
|
 |
When your first starting out, something like this is perfect.
Please remember that many people are learning a new IDE and a new language at the same time.
Spelling things out super simple are helpful at this point.
Mustafa, negative comments like yours, add nothing to the code project community.
|
|
|
|
 |
|
 |
If you were given a large application to develop, one with several seperate MDI/SDI modules along with many dozens of dialog boxes etc, would you choose C#/.Net or MFC?
Personally, after looking at the .Net environment for a couple of weeks, I would still go with MFC. IMHO, it remains the most robust and complete windows application development tool in town.
"There's a slew of slip 'twixt cup and lip"
|
|
|
|
 |
|
 |
In response, I am a VB developer by trade, so I would probably choose neither. I am only trying to get a feel for what C# has to offer, which I think right now is quite a lot. I love the idea of namespaces with .Net, it keeps me from having to write a module just to gain access to some Windows API function. You do raise a good question though, where do we go with this new language technology? How does everyone else feel? I suppose in short, time will tell. Thanks
Nick Parker
|
|
|
|
 |
|
 |
I agree with you.
I did not found any MDI/SDI support in C#, and for large applications C# is pretty messy.
|
|
|
|
 |
|
 |
Then I suppose nobody uses Java, huh?
Anyway, do yourself (or your clients at least) a favor and forget MFC. Use WTL. If you know MFC then there's no reason you can't do WTL.
BTW, until C# compiles to native code (which I think is unlikely, as I understand C# and the .NET framework were "made" for each other), I wouldn't use it for "serious" work.
|
|
|
|
 |
|
 |
"BTW, until C# compiles to native code (which I think is unlikely, as I understand C# and the .NET framework were "made" for each other), I wouldn't use it for "serious" work."
I HOPE YOU KNOW WHAT YOU ARE SAYING
ANYWAYS I THINK THAT YOU SHOULD REREAD THE PURPOSE OF THE .NET FRAMEWORK AGAIN...
AFTER USING IT I GOT HOOKED, BEING A WIN32 PROGRAMMER, I HAD TO TAKE CARE OF ALL THE PROCESSING AND EVERYTHING, NOW I JUST CLICK A COUPLE WRITE SOME AND IM DONE FOR THE MOST PART.
IM PROUD TO BE A GMAIL;
|
|
|
|
 |
|
 |
sry i just noticed i had the caps on
IM PROUD TO BE A GMAIL;
|
|
|
|
 |
|
 |
tom_dx wrote:
"BTW, until C# compiles to native code (which I think is unlikely, as I understand C# and the .NET framework were "made" for each other), I wouldn't use it for "serious" work."
I HOPE YOU KNOW WHAT YOU ARE SAYING
ANYWAYS I THINK THAT YOU SHOULD REREAD THE PURPOSE OF THE .NET FRAMEWORK AGAIN...
AFTER USING IT I GOT HOOKED, BEING A WIN32 PROGRAMMER, I HAD TO TAKE CARE OF ALL THE PROCESSING AND EVERYTHING, NOW I JUST CLICK A COUPLE WRITE SOME AND IM DONE FOR THE MOST PART.
Tom, first of all, it's important that you understand that C# is just another language that is targetting the .NET Framework (and thus producing MSIL), choose whatever language you feel most comfortable with. It's important that you decide what language you are going to use based on the problem at hand, there are certain situations where C# is not the best choice, however there are many where it will fit the bill quite nicely. That said, I would like to think I do know what I am talking about, I wrote this article quite a while ago and have been working with the .NET Framework since it was a beta product. I read about the .NET Framework everyday, if you have a particular comment I would love to hear it. This article was simply an introduction into C#, I have written articles on other topics surrounding C# but I still feel this article had a purpose for those just learning C#. Thanks for the comments.
- Nick Parker My Blog | My Articles
|
|
|
|
 |
|
 |
The quality of articles became to decrease recently No offense, but this is not a tutorial. Everbody can do this in 5 minutes...
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
|
|
|
|
 |
|
 |
Mustafa,
This was just to show you how you can essentially port what you may have learned in Dr. Asad Altimeemy article to C#. I agree, there isn't a whole lot that it really complicated here, but that was also the point, just a very basic intro, we all need to learn somewhere. Thanks for the comments though.
Nick Parker
|
|
|
|
 |
|
 |
Hi Nick,
I do not wanted to feel you bad. But recently, the number of articles with 3 lines of code really increased.
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
|
|
|
|
 |
|
 |
Mustafa,
No Problem, I am trying to learn as much as I can about C# right now. I plan on writing something here in the future with a lot more code to the article, but right now I am sure there are many out there just trying to get their feet wet. Just wanted to spread the knowledge. Thanks.
Nick Parker
|
|
|
|
 |
|
 |
I have 16 years old and I create a RegEdit clone with ease. I have a knowledge of 1 years and 7 months in VC++ so learn C# takes me something like 2 weeks
It's very easy
And By the way thank you Mustafa for your help in the FileIcon2. I had the Shell part but I was unable to add it to the imagelist and you gave me what I need to do with the Icon,Bitmap things
Thanks again
BLaZe
|
|
|
|
 |
|
 |
u use VC++ w/ ou w/out MFC?? or *only* Win32 API
by CodeWarrior
|
|
|
|
 |
|
 |
this is exactly what i was looking for. having never touched C# or VS .Net before, i wanted a simple 5 minute intro - to at least get me going. i don't need a database application or a web service. maybe i'll find out in a day or so that this is totally easy, but i don't need anything more, right now.
-c
Smaller Animals Software, Inc.
You're the icing - on the cake - on the table - at my wake. Modest Mouse
|
|
|
|
 |