
16.02.2011, 14:15
|
Прохожий
|
|
Регистрация: 13.01.2010
Сообщения: 27
Репутация: 10
|
|
Страдалецъ!!! Благодаря вашей помощи я нашел в чем заключается ошибка! Смысл таков! По нажатию кнопки на форме я добавляю нового игрока и затем уже добавляю позиции на поле по этому игроку. НО!!! Для того чтобы внести по этому игроку позиции надо обновить данные по игрокам, у меня видимо этого не происходит... Так что суть проблемы найдена но как ее решить я по прежнему не понимаю((
Код нажатия кнопки на добавление:
Код:
DataMForecast.dsPlayer.Insert;
DataMForecast.dsPlayer.FieldByName('CityID').AsInteger := DBLCBTown.KeyValue;
DataMForecast.dsPlayer.FieldByName('CountryID').AsInteger := DBLCBNationality.KeyValue;
DataMForecast.dsPlayer.FieldByName('PlayerStyleID').AsInteger := DBLCBPlayerStyle.KeyValue;
DataMForecast.dsPlayer.FieldByName('TeamID').AsInteger := DBLCBTeam.KeyValue;
DataMForecast.dsPlayer.FieldByName('FIO').AsString := PlayerNameEdit.Text;
DataMForecast.dsPlayer.FieldByName('PlayerHeight').AsInteger := HeightSpinEdit.Value;
DataMForecast.dsPlayer.FieldByName('PlayerWeight').AsInteger := WeightSpinEdit.Value;
DataMForecast.dsPlayer.FieldByName('Birthday').AsDateTime := BirthdayEdit.Date;
DataMForecast.dsPlayer.FieldByName('PlayerPhoto').Assign(Image1.Picture);
DataMForecast.dsPlayer.FieldByName('TeamWorkLevel').AsInteger := TeamWorkLevelSpinEdit.Value;
DataMForecast.dsPlayer.FieldByName('SkillLevel').AsInteger := SkillLevelSpinEdit.Value;
DataMForecast.dsPlayer.FieldByName('TeamNumber').AsInteger := PlayerNumberSpinEdit.Value;
DataMForecast.dsPlayer.Post;
PlayerPositionsKoeff(1,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit1.Value);
PlayerPositionsKoeff(2,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit2.Value);
PlayerPositionsKoeff(3,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit3.Value);
PlayerPositionsKoeff(4,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit4.Value);
PlayerPositionsKoeff(5,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit5.Value);
PlayerPositionsKoeff(6,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit6.Value);
PlayerPositionsKoeff(7,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit7.Value);
PlayerPositionsKoeff(8,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit8.Value);
PlayerPositionsKoeff(9,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit9.Value);
PlayerPositionsKoeff(10,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit10.Value);
PlayerPositionsKoeff(11,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit11.Value);
PlayerPositionsKoeff(12,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit12.Value);
PlayerPositionsKoeff(13,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit13.Value);
PlayerPositionsKoeff(14,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit14.Value);
PlayerPositionsKoeff(15,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit15.Value);
PlayerPositionsKoeff(16,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit16.Value);
PlayerPositionsKoeff(17,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit17.Value);
PlayerPositionsKoeff(18,DataMForecast.dsPlayerPLAYERID.AsInteger,SpinEdit18.Value);
Close;
|