Ejemplo n.º 1
0
 private void btnSelectIn_Click(object sender, EventArgs e)
 {
     int goodsID = 0;
     //商品的ID号
     try
     {
         goodsID = int.Parse(this.dgvGoodsList.SelectedRows[0].Cells[0].Value.ToString());
     }
     catch
     {
         MessageBox.Show("查找不到产品信息!");
         return;
     }
     if (orderType == "采购进货")
     {
         Stock_Detial detail = new Stock_Detial();
         detail.GoodsID = goodsID;
         detail.OrderType = orderType;
         detail.goodsRefresh += new GoodsRefreshList(detail_goodsRefresh);
         detail.ShowDialog();
     }
     else
     {
         Stock_Detial detail = new Stock_Detial();
         detail.GoodsID = goodsID;
         detail.OrderType = orderType;
         detail.goodsRefresh += new GoodsRefreshList(detail_goodsRefresh);
         detail.ShowDialog();
     }
 }
Ejemplo n.º 2
0
        private void dgvGoods_DoubleClick(object sender, EventArgs e)
        {
            //商品的ID号
            int goodsID = int.Parse(this.dgvGoods.SelectedRows[0].Cells[0].Value.ToString());

            if (orderType == "采购进货")
            {
                Stock_Detial detail = new Stock_Detial();
                detail.GoodsID = goodsID;
                detail.OrderType = orderType;
                detail.goodsRefresh += new GoodsRefreshList(detail_goodsRefresh);
                detail.ShowDialog();
            }
            else
            {
                Stock_Detial detail = new Stock_Detial();
                detail.GoodsID = goodsID;
                detail.OrderType = orderType;
                detail.goodsRefresh += new GoodsRefreshList(detail_goodsRefresh);
                detail.ShowDialog();
            }
        }
Ejemplo n.º 3
0
        private void btnModify_Click(object sender, EventArgs e)
        {
            int goodsID = 0;
            if (this.dgvSelectedList.SelectedRows.Count == 0)
                return;

            goodsID = int.Parse(this.dgvSelectedList.SelectedRows[0].Cells[0].Value.ToString());
            int goodsNumber = int.Parse(this.dgvSelectedList.SelectedRows[0].Cells[5].Value.ToString());    //数量
            string buyPrice = this.dgvSelectedList.SelectedRows[0].Cells[4].Value.ToString();             //单价
            string sumMoney = this.dgvSelectedList.SelectedRows[0].Cells[6].Value.ToString();             //总金额

            if (orderType == "采购进货")
            {
                Stock_Detial stockDetail = new Stock_Detial(goodsID, goodsNumber, buyPrice, sumMoney, orderType);
                stockDetail.goodsModify += new GoodsModifyList(stockDetail_goodsModify);
                stockDetail.ShowDialog();
            }
            else
            {
                Stock_Detial stockDetail = new Stock_Detial(goodsID, goodsNumber, buyPrice, sumMoney, orderType);

                stockDetail.goodsModify += new GoodsModifyList(stockDetail_goodsModify);
                stockDetail.ShowDialog();
            }
        }