Click here to Skip to main content
15,895,656 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to store OnComm values in a single string variable Pin
freakyit3-Oct-09 1:46
freakyit3-Oct-09 1:46 
AnswerRe: how to store OnComm values in a single string variable Pin
Luc Pattyn3-Oct-09 2:02
sitebuilderLuc Pattyn3-Oct-09 2:02 
AnswerRe: how to store OnComm values in a single string variable Pin
dan!sh 3-Oct-09 2:10
professional dan!sh 3-Oct-09 2:10 
AnswerRe: how to store OnComm values in a single string variable Pin
PIEBALDconsult3-Oct-09 6:34
mvePIEBALDconsult3-Oct-09 6:34 
QuestionDataGridViewCombo Pin
jacobsan43-Oct-09 0:35
jacobsan43-Oct-09 0:35 
AnswerRe: DataGridViewCombo Pin
Xmen Real 3-Oct-09 1:42
professional Xmen Real 3-Oct-09 1:42 
AnswerRe: DataGridViewCombo Pin
dan!sh 3-Oct-09 2:07
professional dan!sh 3-Oct-09 2:07 
QuestionRe: DataGridViewCombo Pin
jacobsan43-Oct-09 2:44
jacobsan43-Oct-09 2:44 
private System.Windows.Forms.DataGridView jobSheetDGV;
private SABDBDataSet6 sABDBCountryDataSet;
private System.Windows.Forms.BindingSource countrytDetailsBindingSource;
private SAB.SABDBDataSet6TableAdapters.CountryDetailsTableAdapter countryDetailsTableAdapter;

private void jobSheetDGV_CellLeave(object sender, DataGridViewCellEventArgs e)
{
int rowIndex = jobSheetDGV.CurrentCell.RowIndex;
if (e.ColumnIndex == 3)
{
if (jobSheetDGV.Rows[rowIndex ].Cells[3].Value == null)
{
string sql2 = "GetCountryIdByCountryName";
DbCommand cmd2 = _db.GetStoredProcCommand(sql2);
_db.AddInParameter(cmd2, "CountryName", DbType.String, jobSheetDGV.Rows[rowIndex].Cells[2].Value);
using (IDataReader dataReader1 = _db.ExecuteReader(cmd2))
{
while (dataReader1.Read())
{
string sql = "GetStatesByCountryId";
DbCommand cmd = _db.GetStoredProcCommand(sql);
_db.AddInParameter(cmd, "CountryId", DbType.Int32, countryId.CountryId);
using (IDataReader dataReader = _db.ExecuteReader(cmd))
{
while (dataReader.Read())
{
states = new States(dataReader.GetInt32(0), dataReader.GetString(1), dataReader.GetString(2), dataReader.GetString(3),
dataReader.GetString(4), dataReader.GetInt32(5));
if (states != null)
States.Items.Add(states);


}
}
}
}

In this States is the column name.
The question is simple that i want to fill states in respective to the country selected.I have a country table with country id as primary key and a state table with country id as foreign key..
}
}
}
QuestionImplementing MVC architecture in Windows Form Pin
srikrishnakrishna murthy2-Oct-09 23:46
srikrishnakrishna murthy2-Oct-09 23:46 
AnswerRe: Implementing MVC architecture in Windows Form Pin
Christian Graus2-Oct-09 23:51
protectorChristian Graus2-Oct-09 23:51 
GeneralRe: Implementing MVC architecture in Windows Form Pin
srikrishnakrishna murthy3-Oct-09 0:17
srikrishnakrishna murthy3-Oct-09 0:17 
GeneralRe: Implementing MVC architecture in Windows Form Pin
Christian Graus3-Oct-09 10:54
protectorChristian Graus3-Oct-09 10:54 
QuestionC# Programming ? Pin
Dossa2-Oct-09 23:11
Dossa2-Oct-09 23:11 
AnswerRe: C# Programming ? Pin
nagendrathecoder2-Oct-09 23:13
nagendrathecoder2-Oct-09 23:13 
AnswerRe: C# Programming ? Pin
Christian Graus2-Oct-09 23:13
protectorChristian Graus2-Oct-09 23:13 
QuestionException....PLSSSS HELPPPP :(( Pin
linto_112-Oct-09 22:54
linto_112-Oct-09 22:54 
AnswerRe: Exception....PLSSSS HELPPPP :(( Pin
Christian Graus2-Oct-09 22:58
protectorChristian Graus2-Oct-09 22:58 
GeneralRe: Exception....PLSSSS HELPPPP :(( Pin
nagendrathecoder2-Oct-09 23:09
nagendrathecoder2-Oct-09 23:09 
GeneralRe: Exception....PLSSSS HELPPPP :(( Pin
linto_112-Oct-09 23:13
linto_112-Oct-09 23:13 
GeneralRe: Exception....PLSSSS HELPPPP :(( Pin
Christian Graus2-Oct-09 23:14
protectorChristian Graus2-Oct-09 23:14 
GeneralRe: Exception....PLSSSS HELPPPP :(( Pin
nagendrathecoder2-Oct-09 23:15
nagendrathecoder2-Oct-09 23:15 
GeneralRe: Exception....PLSSSS HELPPPP Pin
linto_112-Oct-09 23:22
linto_112-Oct-09 23:22 
GeneralRe: Exception....PLSSSS HELPPPP Pin
linto_112-Oct-09 23:25
linto_112-Oct-09 23:25 
GeneralRe: Exception....PLSSSS HELPPPP Pin
nagendrathecoder2-Oct-09 23:28
nagendrathecoder2-Oct-09 23:28 
GeneralRe: Exception....PLSSSS HELPPPP Pin
Richard MacCutchan2-Oct-09 23:29
mveRichard MacCutchan2-Oct-09 23:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.