Ejemplo n.º 1
0
        //新增会员等级
        private void btnAddVip_Click(object sender, EventArgs e)
        {
            VipGradeModel vip = new VipGradeModel();

            vip.VGID1 = -1;
            MemberLevelEditorForm mef = new MemberLevelEditorForm(vip);

            mef.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
 //修改
 private void btnUpdateVip_Click(object sender, EventArgs e)
 {
     if (dataGridView2.SelectedCells.Count > 0)
     {
         int                   index = Convert.ToInt32(dataGridView2.Rows[dataGridView2.CurrentRow.Index].Cells[0].Value);
         string                top   = dataGridView2.Rows[dataGridView2.CurrentRow.Index].Cells[1].Value.ToString();
         double                zk    = Convert.ToDouble(dataGridView2.Rows[dataGridView2.CurrentRow.Index].Cells[2].Value);
         VipGradeModel         vip   = new VipGradeModel(index, top, zk);
         MemberLevelEditorForm mef   = new MemberLevelEditorForm(vip);
         mef.Show();
         this.Hide();
     }
     else
     {
         MessageBox.Show("请选择数据!");
     }
 }