public void InsertCustomerNameSureNameAndLastName()
        {
            DataTable customerTable = new DataTable("Customer");

            Accounting.DAL.ConnectionManager.ConnectionManager.SetConnection("Supervisor", "admin");
            _conn = Accounting.DAL.ConnectionManager.ConnectionManager.Connection;
            UpdateBaseTableAdapter table = new Accounting.DAL.TableAdapters.CustomerTableAdapter.CustomerTableAdapter()
            {
                Connection = _conn
            };
            int count = table.Fill(customerTable);

            DataRow newRow = customerTable.NewRow();

            newRow[1]            = 123;
            newRow[2]            = 321;
            newRow["FirstName"]  = "A.";
            newRow["MiddleName"] = "N.";
            newRow["LastName"]   = "Nimus";
            newRow[6]            = DateTime.Now;
            newRow[7]            = 0;
            newRow[8]            = 1;
            newRow[9]            = 2;
            customerTable.Rows.Add(newRow);

            int insert = table.Update(customerTable);

            Assert.IsTrue(insert > 0);
        }
        public void FillCustomerTableFromArchivTest()
        {
            Accounting.DAL.TableAdapters.CustomerTableAdapter.CustomerTableAdapter table = new Accounting.DAL.TableAdapters.CustomerTableAdapter.CustomerTableAdapter()
            {
                Connection = _conn
            };
            int count = table.FillToAcrh(new DataTable(""));

            Assert.IsTrue(count > 1);
        }
        protected BaseTableAdapter GetGlossary(string name)
        {
            BaseTableAdapter table = null;

            switch (name)
            {
            case "Address":
                table = new AddressTableAdapter()
                {
                    Connection = _conn
                };
                break;

            case "Customer":
                table = new Accounting.DAL.TableAdapters.CustomerTableAdapter.CustomerTableAdapter()
                {
                    Connection = _conn
                };
                break;

            case "Invalid":
                table = new InvalidBenefitsCategoryTableAdapter()
                {
                    Connection = _conn
                };
                break;

            case "Register":
                table = new RegisterTableAdapter()
                {
                    Connection = _conn
                };
                break;
            }

            return(table);
        }