public DeposAnketAddForm(User user, PollsDataSet.POLL_DEPOSRow inputRow) { InitializeComponent(); _user = user; _oldRowDepos = inputRow; InitializeForm(); SetDefault(); _isChanges = true; acceptChangesButton.Text = "Изменить"; acceptChangesButton.DialogResult = DialogResult.OK; acceptChangesButton.Enabled = true; rejectChangesButton.Text = "Закрыть"; }
private void updatePollRow() { _oldRowDepos = Owner.pollsDataSet.POLL_DEPOS.FindByDATE_POLL_DEPOSNUMBER_POLL_DEPOSREF_OTD(_oldRowDepos.DATE_POLL_DEPOS, _oldRowDepos.NUMBER_POLL_DEPOS, _oldRowDepos.REF_OTD); _oldRowDepos.SEX = sexСomboBox.SelectedValue.ToString(); _oldRowDepos.AGE = ageUpDown.Value; _oldRowDepos.REF_RKC = (decimal)rkcComboBox.SelectedValue; _oldRowDepos.REF_OBL = (decimal)filialСomboBox.SelectedValue; _oldRowDepos.REF_USER = (decimal)_user.Id_user; _oldRowDepos.DT_LAST_ACSESS = System.DateTime.Now; foreach (QuestControl currentQuestControl in pollsTabControl.TabPages[0].Controls) { _oldRowDepos["S_" + currentQuestControl.IdQuest.ToUpper()] = (decimal)currentQuestControl.Value; _oldRowDepos["I_" + currentQuestControl.IdQuest.ToUpper()] = (decimal)currentQuestControl.Importance; } foreach (QuestControl currentQuestControl in pollsTabControl.TabPages[1].Controls) { _oldRowBank["S_" + currentQuestControl.IdQuest.ToUpper()] = (decimal)currentQuestControl.Value; _oldRowBank["I_" + currentQuestControl.IdQuest.ToUpper()] = (decimal)currentQuestControl.Importance; } Owner.polL_DEPOSTableAdapter.Update(Owner.pollsDataSet.POLL_DEPOS); Owner.pollsDataSet.POLL_DEPOS.AcceptChanges(); }