Esempio n. 1
0
 //供应商列表双击事件
 private void supplier_list_ltv_DoubleClick(object sender, EventArgs e)
 {
     if (isSelectingSupplier)
     {
         if (!isModifyingGoods)
         {
             CreateGoods createGoods = (CreateGoods)this.Owner;
             createGoods.selectedSupplierItem = supplier_list_ltv.SelectedItems[0];
             createGoods.Show();
             this.Dispose();
         }
         else
         {
             ModifyGoodsInfo modifyGoodsInfo = (ModifyGoodsInfo)this.Owner;
             modifyGoodsInfo.selectedSupplierItem = supplier_list_ltv.SelectedItems[0];
             modifyGoodsInfo.Show();
             this.Dispose();
         }
     }
     else
     {
         ModifySupplierInfo modifySupplierInfo = new ModifySupplierInfo(supplier_list_ltv.SelectedItems[0].SubItems);
         modifySupplierInfo.ShowDialog(this);
     }
 }
Esempio n. 2
0
 //商品分类树节点双击事件
 private void goods_type_tvw_DoubleClick(object sender, EventArgs e)
 {
     //如果正在选择商品分类
     if (isSelectingType)
     {
         //如果不是在编辑商品信息
         if (!isModifyingGoods)
         {
             //设置新增商品窗口的已选择节点为当前选择的节点,打开新增商品窗口,关闭本窗口
             CreateGoods createGoods = (CreateGoods)this.Owner;
             createGoods.selectedGoodsTypeNode = goods_type_tvw.SelectedNode;
             createGoods.Show();
             this.Dispose();
         }
         //如果是在编辑商品信息
         else
         {
             //设置编辑商品信息窗口的已选择节点为当前选择的节点,打开编辑商品信息窗口,关闭本窗口
             ModifyGoodsInfo modifyGoodsInfo = (ModifyGoodsInfo)this.Owner;
             modifyGoodsInfo.selectedGoodsTypeNode = goods_type_tvw.SelectedNode;
             modifyGoodsInfo.Show();
             this.Dispose();
         }
     }
 }