Beispiel #1
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            BusinessPlayer business = new BusinessPlayer(Login.UserName, Login.Password);
            int            row      = business.addProducts(name.Text, price.EditValue.ToString(), quantity.Text, content.Text, color, size, category, madein);

            if (row > 0)
            {
                MessageBox.Show("Thêm '" + name.Text + "' thành công!");
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            else
            {
                MessageBox.Show("Lỗi!");
            }
        }
Beispiel #2
0
        public int addProductsTest(
            [PexAssumeUnderTest] BusinessPlayer target,
            string name,
            string Price,
            string Quantity,
            string Content,
            string Color,
            string Size,
            string Category,
            string MadeIn
            )
        {
            int result = target.addProducts
                             (name, Price, Quantity, Content, Color, Size, Category, MadeIn);

            return(result);
            // TODO: add assertions to method BusinessPlayerTest.addProductsTest(BusinessPlayer, String, String, String, String, String, String, String, String)
        }