using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace video_club
{
    public partial class frmeditfilm : Form
    {
        public frmeditfilm()
        {
            InitializeComponent();
        }

       

        private void frmeditfilm_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dataSet1.tblfilm' table. You can move, or remove it, as needed.
            this.tblfilmTableAdapter.Fill(this.dataSet1.tblfilm);

        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void buttonX2_Click(object sender, EventArgs e)
        {
            if (txtcontry.Text == "" || txtnam.Text == "" || txtyear.Text == "")
            {
                MessageBox.Show("لطفا اطلاعات رو بطور کامل وارد کنید", "اخطار", MessageBoxButtons.OK);
            }
            else
            {
                tblfilmTableAdapter.UpdateQuery(txtnam.Text, txtcontry.Text, cmbtypfilm.Text, txtyear.Text,int.Parse(txtcount.Text), int.Parse(txtfid.Text));
                this.Close();
                MessageBox.Show(" .اطلاعات با موفقیت ویرایش و ثبت شد", "", MessageBoxButtons.OK);
            }


        }

       

      
    }
}
