예제 #1
0
 private void GoodsInsertBtn_Click(object sender, EventArgs e)
 {
     GoodsInsert goodsinsert = new GoodsInsert(this);
     goodsinsert.Owner = this;
     goodsinsert.Text = "商品信息插入";
     goodsinsert.flush();
     goodsinsert.ShowDialog();
 }
예제 #2
0
        private void GoodsEditBtn_Click(object sender, EventArgs e)
        {
            GoodsInsert goodsedit = new GoodsInsert(this);
            goodsedit.Owner = this;
            goodsedit.Text = "商品信息更新";
            if (row < 0)
            {
                MessageBox.Show("请选择要编辑的行");
                return;
            }
            goodsedit.mgoodsid =
                 goods_dataGridView.Rows[row].Cells["商品编号"].Value.ToString();

            goodsedit.mgoodsname =
                goods_dataGridView.Rows[row].Cells["商品名称"].Value.ToString();

            goodsedit.mgoodsprice =
                goods_dataGridView.Rows[row].Cells["单价"].Value.ToString();

            goodsedit.mgoodsphotoid =
                goods_dataGridView.Rows[row].Cells["图片编号"].Value.ToString();
            row = -1;
            goodsedit.flush();
            goodsedit.ShowDialog();
        }