using FCOMMON;
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 Project._Management
{
    public partial class fLineCode : fBase
    {
        public fLineCode()
        {
            InitializeComponent();
            this.FormClosed += fLineCode_FormClosed;
        }

        void fLineCode_FormClosed(object sender, FormClosedEventArgs e)
        {
            var form = this as Form;
            FCOMMON.Util.SetFormStatus(ref form, this.Name, false);
        }
    private void fLineCode_Load(object sender, EventArgs e)
        {
            EnsureVisibleAndUsableSize();
            var form = this as Form;
            FCOMMON.Util.SetFormStatus(ref form, this.Name, true);
            this.Show();
            Application.DoEvents();
            
            
            this.ta.Fill(this.dsMSSQL.LineCode);
            this.dsMSSQL.LineCode.TableNewRow += LineCode_TableNewRow;

            

        }
        private void lineCodeBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.bs.EndEdit();
            this.tam.UpdateAll(this.dsMSSQL);

        }

    

        void LineCode_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            e.Row["wuid"] = FCOMMON.info.Login.no;
            e.Row["wdate"] = DateTime.Now;
        }
    }
}
