Exemple #1
0
        //添加
        private void toolAdd_Click(object sender, EventArgs e)
        {
            CardPopForm promotionForm = new CardPopForm(db, null);

            if (promotionForm.ShowDialog() == DialogResult.OK)
            {
                dgv_show();
            }
        }
Exemple #2
0
        //修改
        private void toolEdit_Click(object sender, EventArgs e)
        {
            if (dgv.CurrentCell == null)
            {
                GeneralClass.printWarningMsg("没有选择行!");
                return;
            }

            int selId     = Convert.ToInt32(dgv.CurrentRow.Cells[0].Value);
            var promotion = db.CardPopSale.FirstOrDefault(x => x.id == selId);

            CardPopForm editPromotion = new CardPopForm(db, promotion);

            if (editPromotion.ShowDialog() == DialogResult.OK)
            {
                dgv_show();
            }
        }
 //添加
 private void toolAdd_Click(object sender, EventArgs e)
 {
     CardPopForm promotionForm = new CardPopForm(db, null);
     if (promotionForm.ShowDialog() == DialogResult.OK)
         dgv_show();
 }
        //修改
        private void toolEdit_Click(object sender, EventArgs e)
        {
            if (dgv.CurrentCell == null)
            {
                GeneralClass.printWarningMsg("没有选择行!");
                return;
            }

            int selId = Convert.ToInt32(dgv.CurrentRow.Cells[0].Value);
            var promotion = db.CardPopSale.FirstOrDefault(x => x.id == selId);

            CardPopForm editPromotion = new CardPopForm(db, promotion);
            if (editPromotion.ShowDialog() == DialogResult.OK)
                dgv_show();
        }