using FCOMMON;
using NetOffice.OutlookApi;
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 FEQ0000.Purchase
{
    public partial class fBatchUpdate : fBase
    {
        public fBatchUpdate(List<int> _rows) 
        {
            InitializeComponent();
            Properties.Settings.Default["gwcs"] = FCOMMON.info.CS;
            Properties.Settings.Default["EEEntities"] = FCOMMON.info.CS;
            this.Text = $"일괄변경 : {_rows.Count} 건";
            this.KeyDown += (s1, e1) => { if (e1.KeyCode == Keys.Escape) this.Close(); };
        }
        
        private void fBatchUpdate_Load(object sender, EventArgs e)
        {
            EnsureVisibleAndUsableSize();
            var code_state = DBM.getCodeTable("04");
            cmbState.DataSource = code_state;
            cmbState.DisplayMember = "Value";
            cmbState.ValueMember = "Value";
            cmbState.SelectedIndex = -1;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if(cmbState.SelectedIndex <0)
            {
                FCOMMON.Util.MsgE("값을 선택하지 않았습니다");
                return;
            }
            DialogResult = DialogResult.OK;
        }
    }
}
