TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ethem unver
NA
1
1.4k
save changes
Jan 2 2012 10:59 AM
MebsisEntities db = new MebsisEntities();
private void button1_Click(object sender, EventArgs e)
{
db.SaveChanges();
CalisanTelefon calisan = new CalisanTelefon();
//calisan.CalisanID = "11111101866";
//calisan.Telefon = "0 532 111 11 11";
foreach (var item in db.Calisan)
{
Random rnd=new Random();
int random = rnd.Next(1000, 10000);
calisan = new CalisanTelefon();
calisan.Telefon = "0 535 422 ";
calisan.CalisanID = item.TCKimlikNo;
calisan.Aciklama = "generated";
db.AddToCalisanTelefon(calisan);
db.SaveChanges();
// MessageBox.Show("ok"+item.Adi);
}
what is wrong with this. It gives error at db.savechanges but I dont think that is related to database :(
Reply
Answers (
1
)
How can open .ascx file to popup window in .aspx page
DataRelation class