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 RozenbergBrovki
{
    public partial class Редакт : Form
    {
  
        public Редакт()
        {
            InitializeComponent();
        }

        private void serviceBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
    
        }

        private void serviceBindingNavigatorSaveItem_Click_1(object sender, EventArgs e)
        {
    
        }

        private void Form3_Load(object sender, EventArgs e)
        {
           
            // TODO: данная строка кода позволяет загрузить данные в таблицу "rozenbergBrDataSet.Service". При необходимости она может быть перемещена или удалена.
            this.serviceTableAdapter.Fill(this.rozenbergBrDataSet.Service);

        }

        public void serviceBindingNavigatorSaveItem_Click_2(object sender, EventArgs e)
        {
            this.Validate();
            this.serviceBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.rozenbergBrDataSet);

        }

     
        private void dataGridView1_CellContentClick(object sender, DataGridViewRowEventArgs e)
        {

        }
          
        private void dataGridView1_UserAddedRow(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            button1.Enabled = true;
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            serviceBindingSource.MoveFirst();
        }

        private void serviceBindingNavigatorSaveItem_Click_3(object sender, EventArgs e)
        {
            this.Validate();
            this.serviceBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.rozenbergBrDataSet);

        }

        private void button2_Click(object sender, EventArgs e)
        {
            serviceBindingSource.MoveNext();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            serviceBindingSource.RemoveCurrent();
            MessageBox.Show("Данные удалены");
        }

        private void button4_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.serviceBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.rozenbergBrDataSet);
            MessageBox.Show("Данные сохранены");

        }

        private void button5_Click(object sender, EventArgs e)
        {
            serviceBindingSource.MovePrevious();
        }

        public void button6_Click(object sender, EventArgs e)
        {
            Панель.Visible = true;
            serviceBindingSource.AddNew();
        }

        private void serviceBindingNavigatorSaveItem_Click_4(object sender, EventArgs e)
        {
            this.Validate();
            this.serviceBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.rozenbergBrDataSet);
        
        }

        private void serviceBindingNavigatorSaveItem_Click_5(object sender, EventArgs e)
        {
            this.Validate();
            this.serviceBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.rozenbergBrDataSet);

        }

        private void действующая_скидкаTextBox_TextChanged(object sender, EventArgs e)
        {

        }

        private void serviceBindingNavigatorSaveItem_Click_6(object sender, EventArgs e)
        {
            this.Validate();
            this.serviceBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.rozenbergBrDataSet);

        }

        private void button7_Click(object sender, EventArgs e)
        {
            Записьклиента i = new Записьклиента();
            i.Show();
            this.Hide();
        }
    }
}
