Exemplo n.º 1
0
        protected void lbtn_Delete_Command(object sender, CommandEventArgs e)
        {
            if (!DataEval.IsEmptyQuery(e.CommandArgument.ToString()))
            {
                ProductMgr myProductMgr = new ProductMgr();

                if (myProductMgr.Chk_Product_Variant_usage(e.CommandArgument.ToString()))
                {
                    Nexus.Core.Tools.AlertMessage.Show_Alert(this.Page, "<h4>Selected product variant already have products <br /> Please delete them before apply this action.</h4>", "Action failed!");
                }
                else
                {
                    ProductVariantMgr myProductVariantMgr = new ProductVariantMgr();

                    myProductVariantMgr.Remove_Product_Variant(e.CommandArgument.ToString());

                    Control_Init();
                }
            }
        }