示例#1
0
    public void EditProductTag()
    {
        int    Product_Tag_ID         = tools.CheckInt(Request.Form["Product_Tag_ID"]);
        string Product_Tag_Name       = tools.CheckStr(Request.Form["Product_Tag_Name"]);
        int    Product_Tag_IsSupplier = tools.CheckInt(Request.Form["Product_Tag_IsSupplier"]);
        int    Product_Tag_IsActive   = tools.CheckInt(Request.Form["Product_Tag_IsActive"]);
        string Tag_ProductID          = tools.NullStr(Request["favor_productid"]);
        string Product_Tag_Site       = Public.GetCurrentSite();

        ProductTagInfo entity = new ProductTagInfo();

        entity.Product_Tag_ID         = Product_Tag_ID;
        entity.Product_Tag_Name       = Product_Tag_Name;
        entity.Product_Tag_IsActive   = Product_Tag_IsActive;
        entity.Product_Tag_IsSupplier = Product_Tag_IsSupplier;
        entity.Product_Tag_Site       = Product_Tag_Site;

        if (MyBLL.EditProductTag(entity, Public.GetUserPrivilege()))
        {
            MyBLL.AddProductRelateTag(Tag_ProductID, entity.Product_Tag_ID);
            Public.Msg("positive", "操作成功", "操作成功", true, "tag.aspx");
        }
        else
        {
            Public.Msg("error", "错误信息", "操作失败,请稍后重试", false, "{back}");
        }
    }
示例#2
0
    public void DelProductTag()
    {
        int product_tag_id = tools.CheckInt(Request.QueryString["product_tag_id"]);

        ProductTagInfo tagEntity = GetProductTagByID(product_tag_id);

        if (tagEntity == null || tagEntity.Product_Tag_SupplierID != tools.NullInt(Session["supplier_id"]))
        {
            tagEntity = null;
            pub.Msg("error", "错误信息", "记录不存在", true, "tag.aspx");
        }
        tagEntity = null;

        if (MyBLL.DelProductTag(product_tag_id, pub.CreateUserPrivilege("7b8b58e2-e509-4e6c-a68e-0361225cefa6")) > 0)
        {
            MyBLL.AddProductRelateTag("", product_tag_id);

            pub.Msg("positive", "操作成功", "操作成功", true, "tag.aspx");
        }
        else
        {
            pub.Msg("error", "错误信息", "操作失败,请稍后重试", false, "{back}");
        }
    }