Exemplo n.º 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}");
        }
    }
Exemplo n.º 2
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"]);
        int    Product_Tag_Sort       = tools.CheckInt(Request.Form["Product_Tag_Sort"]);
        //string Tag_ProductID = tools.NullStr(Request["favor_productid"]);
        string Product_Tag_Site = pub.GetCurrentSite();

        ProductTagInfo entity = GetProductTagByID(Product_Tag_ID);

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

        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 = 1;
        entity.Product_Tag_Sort       = Product_Tag_Sort;
        entity.Product_Tag_Site       = Product_Tag_Site;
        entity.Product_Tag_SupplierID = tools.NullInt(Session["supplier_id"]);

        if (MyBLL.EditProductTag(entity, pub.CreateUserPrivilege("2fea26b6-bbb2-44d8-9b46-0b1aed1cc47f")))
        {
            // MyBLL.AddProductRelateTag(Tag_ProductID, entity.Product_Tag_ID);
            pub.Msg("positive", "操作成功", "操作成功", true, "tag.aspx");
        }
        else
        {
            pub.Msg("error", "错误信息", "操作失败,请稍后重试", false, "{back}");
        }
    }