| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > Базы данных под .NET > Как добавить данные в DataGridView с дочер. формы? |
| Автор: Romeo163 17.5.2008, 23:07 |
| Гуру помогите плиз! Знаю как добавить данные в DataGridView из родительской формы, а как из дочерней что то не получается... Когда DataGridView находится на родительской форме: int patientID; patientID=Rand.Next(); this->PatientTableAdapter->Insert(Rand.Next(), textBox6->Text, textBox5->Text, textBox4->Text, comboBox6->Text, true, Convert::ToDateTime("19.05.1987"), 12, 123); this->PatientTableAdapter->Fill(this->bd_RegistraturaDataSet->Patient); А как с дочерней??? Если пишу этот же код выдает ошибки: 1>c:\users\alexander\documents\visual studio 2005\projects\bd_registratura\bd_registratura\Form4.h(1563) : error C2664: 'bd_Registratura::bd_RegistraturaDataSetTableAdapters::PatientTableAdapter::Insert' : cannot convert parameter 5 from 'System::String ^' to 'System::Nullable<T>' 1> with 1> [ 1> T=bool 1> ] 1> No user-defined-conversion operator available, or 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called 1>c:\users\alexander\documents\visual studio 2005\projects\bd_registratura\bd_registratura\Form4.h(1564) : error C2039: 'bd_RegistraturaDataSet' : is not a member of 'bd_Registratura::Form4' 1> c:\users\alexander\documents\visual studio 2005\projects\bd_registratura\bd_registratura\Form4.h(24) : see declaration of 'bd_Registratura::Form4' 1>c:\users\alexander\documents\visual studio 2005\projects\bd_registratura\bd_registratura\Form4.h(1564) : error C2227: left of '->Patient' must point to class/struct/union/generic type 1>bd_Registratura.cpp 1>c:\users\alexander\documents\visual studio 2005\projects\bd_registratura\bd_registratura\Form4.h(1563) : error C2664: 'bd_Registratura::bd_RegistraturaDataSetTableAdapters::PatientTableAdapter::Insert' : cannot convert parameter 5 from 'System::String ^' to 'System::Nullable<T>' 1> with 1> [ 1> T=bool 1> ] 1> No user-defined-conversion operator available, or 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called 1>c:\users\alexander\documents\visual studio 2005\projects\bd_registratura\bd_registratura\Form4.h(1564) : error C2039: 'bd_RegistraturaDataSet' : is not a member of 'bd_Registratura::Form4' 1> c:\users\alexander\documents\visual studio 2005\projects\bd_registratura\bd_registratura\Form4.h(24) : see declaration of 'bd_Registratura::Form4' 1>c:\users\alexander\documents\visual studio 2005\projects\bd_registratura\bd_registratura\Form4.h(1564) : error C2227: left of '->Patient' must point to class/struct/union/generic type Как быть помогите! |