Click here to Skip to main content
       

Database

 
Questionfirst linq for entity frame work? PinmemberMember 875182715-Nov-12 1:02 
AnswerRe: first linq for entity frame work? Pinmemberdigimanus15-Nov-12 3:17 
QuestionBEGIN TRANSACTION AND COMMIT TRANSACTION Pinmembervanikanc14-Nov-12 7:40 
AnswerRe: BEGIN TRANSACTION AND COMMIT TRANSACTION PinmemberPhanindra26114-Nov-12 8:40 
QuestionFault Exception in WCF Services PinmemberPhanindra26114-Nov-12 6:15 
AnswerRe: Fault Exception in WCF Services PinmemberEddy Vluggen14-Nov-12 6:36 
GeneralRe: Fault Exception in WCF Services PinmemberPhanindra26114-Nov-12 8:05 
QuestionRelation multiple table using in C# PinmemberYBG13-Nov-12 2:53 
Hi All ... in my form app. i have textboxs related databindings yonet_ogrt and I have 2 datagridview yonet_prg
and yonet_nbt.. so I want to all together navigate but textboxs and datagridview related yonet_prg is working but
datagridview related yonet_nbt not working... this is my trouble...
My code like this...
 
public void vt_iliski()
{
try
{
string sorgu_ogretmen = "select * from ogretmen";
string sorgu_program = "select * from program";
string sorgu_nobet = "select * from nobet";
 

ds_gnd = new DataSet();
DataTable tablo = new DataTable();
adpt_ogrt = new SqlCeDataAdapter(sorgu_ogretmen, baglan());
adpt_prg = new SqlCeDataAdapter(sorgu_program, baglan());
adpt_nbt = new SqlCeDataAdapter(sorgu_nobet, baglan());
 
adpt_ogrt.Fill(ds_gnd, "ogretmen");
adpt_prg.Fill(ds_gnd, "program");
adpt_nbt.Fill(ds_gnd, "nobet");
 
/* ********** relation -1 ****************** */
 
DataColumn ogrt_kolon = ds_gnd.Tables["ogretmen"].Columns["ogrt_ID"];
DataColumn prg_kolon = ds_gnd.Tables["program"].Columns["ogrt_ID"];

iliski1 = new DataRelation("Ogretmen_To_Program", ogrt_kolon, prg_kolon);
 

ForeignKeyConstraint kisitla = new ForeignKeyConstraint(ogrt_kolon, prg_kolon);
 
kisitla.UpdateRule = Rule.Cascade;
kisitla.DeleteRule = Rule.Cascade;
kisitla.AcceptRejectRule = AcceptRejectRule.Cascade;
 
ds_gnd.Tables["program"].Constraints.Add(kisitla);
ds_gnd.EnforceConstraints = true;

ds_gnd.Relations.Add(iliski1);

yonet_ogrt = new BindingSource(ds_gnd, ds_gnd.Tables["ogretmen"].ToString());
yonet_prg = new BindingSource(yonet_ogrt, "Ogretmen_To_Program");
 

 
/* ********** relation-2 ****************** */
DataColumn prg_kolon_nobet = ds_gnd.Tables["program"].Columns["prg_ID"];
DataColumn nobet_kolon = ds_gnd.Tables["nobet"].Columns["prg_ID"];

iliski2 = new DataRelation("Program_To_nobet",prg_kolon_nobet , nobet_kolon );
 

ForeignKeyConstraint kisitla2 = new ForeignKeyConstraint(prg_kolon_nobet, nobet_kolon);
 

kisitla2.UpdateRule = Rule.Cascade;
kisitla2.DeleteRule = Rule.Cascade;
kisitla2.AcceptRejectRule = AcceptRejectRule.Cascade;
 
ds_gnd.Tables["nobet"].Constraints.Add(kisitla2);
ds_gnd.EnforceConstraints = true;

ds_gnd.Relations.Add(iliski2);
 
yonet_prg = new BindingSource(ds_gnd, ds_gnd.Tables["Program"] .ToString());

yonet_nbt = new BindingSource(yonet_prg , "Program_To_nobet");

}
catch (Exception hata)
{
MessageBox.Show("Okul Günlük Nöbet Defteri iliskilendirme Hatasi olustu : " + hata.Message + " " + hata.StackTrace );
 
}

finally
{
baglanti.Dispose();
adpt_ogrt.Dispose();
adpt_prg.Dispose();
adpt_nbt.Dispose();

}
AnswerRe: Relation multiple table using in C# PinmemberPhanindra26114-Nov-12 8:23 
QuestionTrying to get a MySQL subquery to return multiple records PinmemberSQL Ed12-Nov-12 8:19 
AnswerRe: Trying to get a MySQL subquery to return multiple records PinmemberEddy Vluggen12-Nov-12 11:33 
QuestionSending data to database PinmemberPhanindra26111-Nov-12 19:03 
AnswerRe: Sending data to database Pinmemberjschell12-Nov-12 10:08 
AnswerRe: Sending data to database PinmemberMycroft Holmes12-Nov-12 12:51 
GeneralRe: Sending data to database PinmemberPhanindra26113-Nov-12 18:40 
QuestionHow to create reports effectively [modified] PinmemberFrygreen9-Nov-12 0:52 
AnswerRe: How to create reports effectively PinmemberDavid Mujica9-Nov-12 2:32 
AnswerRe: How to create reports effectively PinmemberMycroft Holmes9-Nov-12 4:08 
AnswerRe: How to create reports effectively PinmemberFrygreen9-Nov-12 4:10 
Suggestionsql server 2008 security PinmemberMember 36227527-Nov-12 8:00 
GeneralRe: sql server 2008 security PinmemberMycroft Holmes7-Nov-12 11:27 
GeneralRe: sql server 2008 security Pinmemberjschell8-Nov-12 8:56 
QuestionHelp me my Sql expired Pinmembermehdi_nassiri00986-Nov-12 10:03 
AnswerRe: Help me my Sql expired PinmemberJörgen Andersson6-Nov-12 10:22 
AnswerRe: Help me my Sql expired PinmemberJoy Sinha22-Nov-12 20:09 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.140926.1 | Last Updated 1 Oct 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid