16,019,427 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by phanny 2011 (Top 30 by date)
phanny 2011
9-Mar-12 4:23am
View
but in Ms SQL server, there is no data type autonumber. So I don't know what datatype that I can put.
phanny 2011
9-Mar-12 3:00am
View
thanks so much......It works now.
phanny 2011
9-Mar-12 2:43am
View
thanks, it works. But It doesn't clear the old one. So when we click on button show, it always show the duplication data...How to do?
Thanks
phanny 2011
8-Mar-12 23:20pm
View
When I click on button show then, it has an error on this line
dataGridView1.Rows.Add(i + 1, dt.Rows[i][0], dt.Rows[i][1], dt.Rows[i][2], dt.Rows[i][3]);
The error is (InvalidOperationException was unhandled.
Rows cannot be programatically added to the DataGridView's rows collection when the control is data-bound.)
Thanks for your understand.
phanny 2011
8-Mar-12 22:32pm
View
sorry, read line= red line.
phanny 2011
8-Mar-12 22:28pm
View
no, it still with read line.
phanny 2011
8-Mar-12 22:21pm
View
Here is my full code
private void btnShow_Click(object sender, EventArgs e)
{
SqlDataAdapter da = new SqlDataAdapter("Select * from tbl_stuInfo");
da.Fill(dt);
for (int i = 0; i < dt.Rows.Count; i++)
{
dataGridView1.Rows.Add(dt.Rows[i][0], dt.Rows[i][1], dt.Rows[i][2]);
}
}
phanny 2011
8-Mar-12 22:17pm
View
SqlDataAdapter da = new SqlDataAdapter("Select * from tbl_stuInfo");
The exact error is invalid argument. I really don't know
phanny 2011
8-Mar-12 22:12pm
View
no, it still error
phanny 2011
5-Mar-12 23:44pm
View
Thank so much. It works but got a problem more about the data type of dob is date and dTPdob is dateTimePicker. So how can I modified it?
phanny 2011
5-Mar-12 23:08pm
View
It's the same. fields are 9 and values are 9.
phanny 2011
5-Mar-12 22:59pm
View
no not all, like perID is int, dob is date....so how I do?
phanny 2011
17-Jan-12 2:33am
View
Yes I know. I am studying C# programming now. Just starting, so not clear about some code that I haven't seen. I am not good that why I need help.
phanny 2011
16-Jan-12 21:39pm
View
The line
string t = txt.Name.Substring(3, txt.Name.Length - 3);
I don't understand.
Thanks
phanny 2011
16-Jan-12 21:38pm
View
Deleted
The line
string t = txt.Name.Substring(3, txt.Name.Length - 3);
I don't understand.
Thanks
phanny 2011
16-Jan-12 21:37pm
View
what do you mean?
phanny 2011
10-Jan-12 20:47pm
View
Can all of you help me to convert this code to C#.net?
Thanks
phanny 2011
9-Jan-12 23:51pm
View
I want all the data in file will show all in ListView and in the different record
Thanks
phanny 2011
6-Jan-12 2:32am
View
An erro on line
listView1.Items.Add(lis);
I don't know why?
phanny 2011
5-Jan-12 23:18pm
View
Microsoft Visual Studio is a software that we can write VB.net or C#.net and ASP.net.
phanny 2011
5-Jan-12 23:03pm
View
Sorry I am using Visual Studio 2010, so please write it in Visual.
Thanks
phanny 2011
3-Jan-12 21:21pm
View
Here is my code in Form.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Practice_3
{
public partial class Form1 : Form
{
private frmGlass _frmGlass;
private frShow _frmshow;
private Turism[] indexclass = new Turism[100];
int idex = 0;
public Form1()
{
InitializeComponent();
}
Turism add = new Turism();
private void btnAdd_Click(object sender, EventArgs e)
{
if (txtid.Text == "" || txtname.Text == "" || txtgender.Text == "" || txtaddress.Text == "" || txtpassport.Text == "" || datestart.Text == "" || enddate.Text == "")
{
MessageBox.Show("Sorry!Don't have value for insert ."+"\n"+"Please insert value");
}
else
{
indexclass[idex] = new Turism();
indexclass[idex].ID = txtid.Text;
indexclass[idex].Name = txtname.Text;
indexclass[idex].Gender = txtgender.Text;
indexclass[idex].Address = txtaddress.Text;
indexclass[idex].Phone = txtphone.Text;
indexclass[idex].Passport = txtpassport.Text;
indexclass[idex].Stardate = datestart.Text;
indexclass[idex].Enddate = enddate.Text;
indexclass[idex].Discrpition = txtDetail.Text;
++idex;
clear();
btnShow.Enabled = true;
}
}
private void btnShow_Click(object sender, EventArgs e)
{
_frmGlass = new frmGlass();
_frmshow = new frShow(_frmGlass, indexclass, idex);
_frmGlass.Show();
_frmshow.Show(_frmGlass);
}
internal void clear()
{
txtid.Text = "";
txtaddress.Text = "";
txtgender.Text = "";
txtname.Text = "";
txtpassport.Text = "";
txtphone.Text = "";
txtDetail.Text = "";
}
private void btnClears_Click(object sender, EventArgs e)
{
clear();
}
private void button1_Click(object sender, EventArgs e)
{
Close();
}
private void Form1_Load(object sender, EventArgs e)
{
txtgender.Text = "Male";
btnShow.Enabled = false;
}
}
}
phanny 2011
28-Dec-11 2:37am
View
Sorry, how to check it? Thanks
phanny 2011
13-Dec-11 4:21am
View
He just focus on reading, creating or moving file or directory... So how can I do it?
phanny 2011
13-Dec-11 3:44am
View
So If the teacher let me search about file system, so I have to put
File Class
FileInfo Class
Directory Class
DirectoryInfo Class
and Stream Class
Then Explain each of them....?
Thanks
phanny 2011
7-Dec-11 2:30am
View
Thank so much.......
phanny 2011
6-Dec-11 23:10pm
View
The output of this code is No database selected.
phanny 2011
6-Dec-11 22:37pm
View
No, I just want to show it in Visual Studio cause it hides.
phanny 2011
5-Dec-11 23:36pm
View
Thank you so much. If I want to change some style of this window, how?
phanny 2011
5-Dec-11 23:17pm
View
I have to write it in Form1.cs right? but It doesn't know function show(). Thanks
Show More