Ejemplo n.º 1
0
        protected void addButton_OnClick(object sender, EventArgs e)
        {
            Size aSize = new Size();

            aSize.SizeName         = sizeNameTextBox.Text;
            aSize.BrandId          = Convert.ToInt32(brandDropDownList.SelectedItem.Value);
            aSize.CategoryId       = Convert.ToInt32(categoryDropDownList.SelectedItem.Value);
            aSize.SubCategoryId    = Convert.ToInt32(subCategoryDropDownList.SelectedItem.Value);
            aSize.GenderId         = Convert.ToInt32(genderDropDOwnList.SelectedItem.Value);
            messageLabel.ForeColor = Color.Green;
            messageLabel.Text      = aProductBusinessLogic.AddSize(aSize);

            ClearSection();
        }
Ejemplo n.º 2
0
        public void AddSizeTest()
        {
            Size aSize = new Size
            {
                SizeName      = "S",
                BrandId       = 2,
                CategoryId    = 2,
                SubCategoryId = 3,
                GenderId      = 2
            };

            string actual  = "Save SuccessFully";
            string predict = aProductBusinessLogic.AddSize(aSize);

            Assert.AreEqual(actual, predict);
        }