Beispiel #1
0
        protected void btnSaveAttribute_Click(object sender, EventArgs e)
        {
            eshopBE.Attribute attribute = new eshopBE.Attribute();
            attribute.Name = txtName.Text;
            attribute.IsDescription = chkIsDescription.Checked;
            if (lblAttributeID.Value != string.Empty)
                attribute.AttributeID = int.Parse(lblAttributeID.Value);

            AttributeBL attributeBL = new AttributeBL();
            attributeBL.SaveAttribute(attribute);

            Response.Redirect("/administrator/attributes.aspx");
        }
Beispiel #2
0
        private int addAttribute(int categoryID, string attributeName)
        {
            AttributeBL attributeBL = new AttributeBL();
            eshopBE.Attribute attribute = new eshopBE.Attribute();
            attribute.Name = attributeName;
            attribute.Filter = false;
            int attributeID = attributeBL.SaveAttribute(attribute);

            CategoryBL categoryBL = new CategoryBL();
            attributeBL.SaveAttributeForCategory(categoryID, attributeID);

            return attributeID;
        }