| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace СУБД_Альфапол
- {
- public partial class FormAddEdit : Form
- {
- public FormAddEdit()
- {
- InitializeComponent();
- }
- private void FormAddEdit_Load(object sender, EventArgs e)
- {
- // TODO: This line of code loads data into the 'dbAlphapolAGDataSet.Street' table. You can move, or remove it, as needed.
- this.streetTableAdapter.Fill(this.dbAlphapolAGDataSet.Street);
- // TODO: This line of code loads data into the 'dbAlphapolAGDataSet.IndexPartner' table. You can move, or remove it, as needed.
- this.indexPartnerTableAdapter.Fill(this.dbAlphapolAGDataSet.IndexPartner);
- // TODO: This line of code loads data into the 'dbAlphapolAGDataSet.City' table. You can move, or remove it, as needed.
- this.cityTableAdapter.Fill(this.dbAlphapolAGDataSet.City);
- // TODO: This line of code loads data into the 'dbAlphapolAGDataSet.Region' table. You can move, or remove it, as needed.
- this.regionTableAdapter.Fill(this.dbAlphapolAGDataSet.Region);
- // TODO: This line of code loads data into the 'dbAlphapolAGDataSet.TypePartner' table. You can move, or remove it, as needed.
- this.typePartnerTableAdapter.Fill(this.dbAlphapolAGDataSet.TypePartner);
- // TODO: This line of code loads data into the 'dbAlphapolAGDataSet.Partner' table. You can move, or remove it, as needed.
- this.partnerTableAdapter.Fill(this.dbAlphapolAGDataSet.Partner);
- if(lblTitle.Text == "Добавление партнера")
- {
- bsPartner.AddNew();
- }
- }
- private void btnSave_Click(object sender, EventArgs e)
- {
- bsPartner.EndEdit();
- this.partnerTableAdapter.Update(this.dbAlphapolAGDataSet.Partner);
- Close();
- }
- }
- }
|