Click here to Skip to main content
15,901,871 members
Home / Discussions / C#
   

C#

 
GeneralRe: Socket Connectivity Behind Router or Proxy??? Pin
RizwanSharp23-Jul-06 8:33
RizwanSharp23-Jul-06 8:33 
GeneralRe: Socket Connectivity Behind Router or Proxy??? Pin
stancrm23-Jul-06 8:58
stancrm23-Jul-06 8:58 
QuestionTo remove errors from the program. Pin
arun.m23-Jul-06 7:14
arun.m23-Jul-06 7:14 
QuestionRe: To remove errors from the program. Pin
RizwanSharp23-Jul-06 7:40
RizwanSharp23-Jul-06 7:40 
AnswerRe: To remove errors from the program. Pin
mav.northwind23-Jul-06 10:22
mav.northwind23-Jul-06 10:22 
AnswerRe: To remove errors from the program. Pin
Christian Graus23-Jul-06 10:44
protectorChristian Graus23-Jul-06 10:44 
QuestionIVR (Interactive Voice Response) Pin
mohsen_dez23-Jul-06 7:03
mohsen_dez23-Jul-06 7:03 
Questionpassing data to another form Pin
simsen23-Jul-06 5:21
simsen23-Jul-06 5:21 
Hi,

I have the following code, which works perfect, when I makes af DataGridView with drag and drop (the code pass over the FakturaId to the new form, so I can make a select on this)

System.Data.DataRowView SelectedRowView;

fakturasystemDataSet.FakturaRow SelectedRow;


SelectedRowView = (System.Data.DataRowView)fakturaBindingSource.Current;

SelectedRow = (fakturasystemDataSet.FakturaRow)SelectedRowView.Row;

FakturaVis FakturaVisForm = new FakturaVis();

FakturaVisForm.LoadFakturaVis(SelectedRow.FakturaID);

FakturaVisForm.Show();


But now I have made my own dataset and adapter and I have some problems with the above code. I don't know, how I get the FakturaRow in intellisense (how I get this into the code, where I instansiate the dataset and the adapter)?

Is my dsView the same as, the system generated fakturaBindingSource?

My code where I instansiate the dataset and the adapters:

private void loadKundeFaktura()

{

//create a connection string to the access database

OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;

User Id=;Password=;

Data Source=" + myDB);

// Create the DataSet

ds = new DataSet("KundeFaktura");

// Fill the Dataset with Kunder, map Default Tablename

// "Table" to "Kunder".

da1 = new OleDbDataAdapter("SELECT KundeId, Navn, Adresse, Postnr, Byen,
Telefonnr, Mobilnr, EmailAdr, Noter FROM Kunder", cn);

da1.TableMappings.Add("Table", "Kunder");

da1.Fill(ds);

// Fill the Dataset with Faktura, map Default Tablename

// "Table" to "Faktura". ORDER BY FakturaID DESC

da2 = new OleDbDataAdapter("SELECT FakturaID, KundeID, Dato, BetalingsDato,
Betalt FROM Faktura ORDER BY FakturaID DESC", cn);

da2.TableMappings.Add("Table", "Faktura");

da2.Fill(ds);



// Establish the Relationship "RelOrdDet"

// between Kunder ---< [Faktura]

System.Data.DataRelation relOrdDet;

System.Data.DataColumn colMaster2;

System.Data.DataColumn colDetail2;

colMaster2 = ds.Tables["Kunder"].Columns["KundeId"];

colDetail2 = ds.Tables["Faktura"].Columns["KundeID"];

relOrdDet = new System.Data.DataRelation("RelOrdDet", colMaster2,
colDetail2);

ds.Relations.Add(relOrdDet);

// The DataViewManager returned by the DefaultViewManager

// property allows you to create custom settings for each

// DataTable in the DataSet.

dsView = ds.DefaultViewManager;

// Databinding for the Grid's

dgrKunder.DataSource = dsView;

dgrKunder.DataMember = "Kunder";

dgrFaktura.DataSource = dsView;

dgrFaktura.DataMember = "Kunder.RelOrdDet";

}


Kind regards,
simsen Smile | :)


AnswerRe: passing data to another form Pin
Christian Graus23-Jul-06 10:45
protectorChristian Graus23-Jul-06 10:45 
GeneralRe: passing data to another form Pin
simsen23-Jul-06 20:00
simsen23-Jul-06 20:00 
GeneralRe: passing data to another form Pin
Christian Graus23-Jul-06 21:11
protectorChristian Graus23-Jul-06 21:11 
GeneralRe: passing data to another form Pin
simsen24-Jul-06 1:23
simsen24-Jul-06 1:23 
GeneralRe: passing data to another form Pin
Christian Graus24-Jul-06 10:19
protectorChristian Graus24-Jul-06 10:19 
GeneralRe: passing data to another form Pin
simsen24-Jul-06 10:43
simsen24-Jul-06 10:43 
GeneralRe: passing data to another form Pin
Christian Graus24-Jul-06 10:46
protectorChristian Graus24-Jul-06 10:46 
Questiontype cast socket into stream Pin
duaaali23-Jul-06 4:22
duaaali23-Jul-06 4:22 
AnswerRe: type cast socket into stream Pin
mav.northwind23-Jul-06 4:51
mav.northwind23-Jul-06 4:51 
AnswerRe: type cast socket into stream Pin
RizwanSharp23-Jul-06 7:42
RizwanSharp23-Jul-06 7:42 
QuestionUnit-testing events [modified] Pin
WillemM23-Jul-06 2:39
WillemM23-Jul-06 2:39 
AnswerRe: Unit-testing events Pin
Roger Alsing24-Jul-06 2:04
Roger Alsing24-Jul-06 2:04 
GeneralRe: Unit-testing events Pin
WillemM24-Jul-06 2:12
WillemM24-Jul-06 2:12 
QuestionHelp how to automatic install FrameWork when PC run my programme without FrameWork Pin
breaklxx23-Jul-06 2:07
breaklxx23-Jul-06 2:07 
AnswerRe: Help how to automatic install FrameWork when PC run my programme without FrameWork Pin
Christian Graus23-Jul-06 10:46
protectorChristian Graus23-Jul-06 10:46 
QuestionImage Processing [modified] Pin
erfi23-Jul-06 1:51
erfi23-Jul-06 1:51 
AnswerRe: Image Processing Pin
mav.northwind23-Jul-06 2:08
mav.northwind23-Jul-06 2:08 

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.