123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- 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 Beauty
- {
- public partial class Service : Form
- {
- public Service()
- {
- InitializeComponent();
- }
- private void serviceBindingNavigatorSaveItem_Click(object sender, EventArgs e)
- {
- this.Validate();
- this.serviceBindingSource.EndEdit();
- this.tableAdapterManager.UpdateAll(this.makhanovISP42DataSet);
- }
- private void Service_Load(object sender, EventArgs e)
- {
- // TODO: данная строка кода позволяет загрузить данные в таблицу "makhanovISP42DataSet.service". При необходимости она может быть перемещена или удалена.
- this.serviceTableAdapter.Fill(this.makhanovISP42DataSet.service);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- serviceBindingSource.AddNew();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- serviceBindingSource.EndEdit();
- serviceTableAdapter.Update(makhanovISP42DataSet.service);
- }
- private void button3_Click(object sender, EventArgs e)
- {
- if (MessageBox.Show($"Вы точно хотите удалить выбранную запись?", "Внимание", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
- {
- try
- {
- serviceBindingSource.RemoveCurrent();
- MessageBox.Show("Запись удалена");
- serviceTableAdapter.Update(makhanovISP42DataSet.service);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message.ToString());
- }
- }
- }
- private void button4_Click(object sender, EventArgs e)
- {
- serviceBindingSource.MoveFirst();
- }
- private void button5_Click(object sender, EventArgs e)
- {
- serviceBindingSource.MoveLast();
- }
- private void button6_Click(object sender, EventArgs e)
- {
- serviceBindingSource.MoveNext();
- }
- private void button7_Click(object sender, EventArgs e)
- {
- serviceBindingSource.MovePrevious();
- }
- private void button8_Click(object sender, EventArgs e)
- {
- Form1 main = new Form1();
- main.Show();
- this.Hide();
- }
- }
- }
|