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;
using System.IO;
using FAS_LIB;
using FAS_LIB.COLA_DMS;

namespace ImortFAS
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnUpload_Click(object sender, EventArgs e)
        {
            string Error = "Completed";
            clsFASorders FO = new clsFASorders();
            if (File.Exists("C:\\mpac open orders.txt"))
            {
                try
                {
                    // Import fas is the function we need to recover code from 
                    FO.ImportFAS("C:\\mpac open orders.txt");
                }
                catch
                {
                    Error = "Failed On Import";
                }
            }
            else
            {
                Error = "Could not Find MPAC Open Orders.txt";
            }
            MessageBox.Show(Error);
        }

        private void btnProcess_Click(object sender, EventArgs e)
        {
            DMSController obj = new DMSController();
            obj.MS2();
        }

        //private void button1_Click_1(object sender, EventArgs e)
        //{
        //    TestDelete obj = new TestDelete();
        //    //obj.dBDeleteDataByRoutingId(33002, true, false);
        //    obj.dBDeleteDataBySectionId(3161, true, false, false);
        //}
    }
}
