Example #1
0
 public AssembleAdd(AssembleItem assembleItem)
 {
     InitializeComponent();
     this.Text = "修改组合商品";
     //保存并新增 按钮 不可见
     simpleBtnSaveAdd.Visible = false;
     assembleAdd1.LoadAseemble(assembleItem);
 }
Example #2
0
        //加载组合商品的属性
        private void LoadProps()
        {
            AssembleItem assProduct = gVAssembleItem.GetFocusedRow() as AssembleItem;

            if (assProduct != null)
            {
                View_ShopItem item = new View_ShopItem();
                item.cid            = assProduct.Cid;
                item.props          = assProduct.Props;
                item.input_str      = assProduct.InputStr == null ? string.Empty : assProduct.InputStr;
                item.input_pids     = assProduct.InputPids == null ? string.Empty : assProduct.InputPids;
                item.property_alias = assProduct.SkuProps;
                UIHelper.LoadItemPropValue(item, categoryRowKeyProps, categoryRowSaleProps, categoryRowNotKeyProps, categoryRowStockProps);
            }
        }
Example #3
0
        //修改宝贝outer_id为当前组合商品的OuterID与商品类型
        private void btnAssociate_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                AssembleItem assProduct = gVAssembleItem.GetFocusedRow() as AssembleItem;
                if (assProduct == null || string.IsNullOrEmpty(assProduct.OuterID))
                {
                    return;
                }

                if (ReturnType.Success == ItemService.UpdateItemType(iid, assProduct.OuterID, "组合商品"))
                {
                    XtraMessageBox.Show("关联成功!", Constants.SYSTEM_PROMPT, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    //将修改后的outer_id赋给当前Form的Tag
                    this.Tag = assProduct.OuterID;
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, Constants.SYSTEM_PROMPT, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #4
0
 public static ReturnType UpdateAssembleItem(AssembleItem itemAssemble)
 {
     return(DataProviderClass.Instance().UpdateAssembleItem(itemAssemble));
 }
Example #5
0
 public static ReturnType UpdateAssembleItemProps(AssembleItem assembleItem)
 {
     return(DataProviderClass.Instance().UpdateAssembleItemProps(assembleItem));
 }
Example #6
0
 public static ReturnType UpdateAssembleItemDetails(AssembleItem itemAssemble, List <AssembleDetail> detailList)
 {
     return(DataProviderClass.Instance().UpdateAssembleItemDetails(itemAssemble, detailList));
 }