Пример #1
0
        public void FindMethodOK()
        {
            clsCustomers ACustomer = new clsCustomers();
            Boolean      Found     = false;

            Int32 CustomerNum = 1;

            Found = ACustomer.Find(CustomerNum);
            Assert.IsTrue(Found);
        }
Пример #2
0
        public void TestCustomerNumFound()
        {
            clsCustomers ACustomer   = new clsCustomers();
            Boolean      Found       = false;
            Boolean      OK          = true;
            Int32        CustomerNum = 1;

            Found = ACustomer.Find(CustomerNum);
            if (ACustomer.customer_id != 1)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Пример #3
0
        public void TestCreateDateFound()
        {
            clsCustomers ACustomer   = new clsCustomers();
            Boolean      Found       = false;
            Boolean      OK          = true;
            Int32        CustomerNum = 1;

            Found = ACustomer.Find(CustomerNum);
            if (ACustomer.create_date != Convert.ToDateTime("30-01-2020"))
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Пример #4
0
        public void TestActiveFound()
        {
            clsCustomers ACustomer   = new clsCustomers();
            Boolean      Found       = false;
            Boolean      OK          = true;
            Int32        CustomerNum = 1;

            Found = ACustomer.Find(CustomerNum);
            if (ACustomer.active != true)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Пример #5
0
        public void TestEmailFound()
        {
            clsCustomers ACustomer   = new clsCustomers();
            Boolean      Found       = false;
            Boolean      OK          = true;
            Int32        CustomerNum = 1;

            Found = ACustomer.Find(CustomerNum);
            if (ACustomer.email != "*****@*****.**")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Пример #6
0
        public void TestLastNameFound()
        {
            clsCustomers ACustomer   = new clsCustomers();
            Boolean      Found       = false;
            Boolean      OK          = true;
            Int32        CustomerNum = 1;

            Found = ACustomer.Find(CustomerNum);
            if (ACustomer.last_name != "Schofield")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Пример #7
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        clsCustomers ACustomer = new clsCustomers();

        Int32   customer_id;
        Boolean found = false;

        customer_id = Convert.ToInt32(txtCustomer_ID.Text);
        found       = ACustomer.Find(customer_id);

        if (found == true)
        {
            txtFirstName.Text  = ACustomer.first_name;
            txtLastName.Text   = ACustomer.last_name;
            txtEmail.Text      = ACustomer.email;
            txtCreateDate.Text = ACustomer.create_date.ToString();
        }
    }