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

            if (promotionForm.ShowDialog() == DialogResult.OK)
            {
                dgv_show();
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 3
0
 //添加
 private void toolAdd_Click(object sender, EventArgs e)
 {
     CardPopForm promotionForm = new CardPopForm(db, null);
     if (promotionForm.ShowDialog() == DialogResult.OK)
         dgv_show();
 }
Esempio n. 4
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();
        }