Example #1
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0 || dataGridView1.SelectedRows.Count > 1)
            {
                MessageBox.Show("请选择一行!");
                return;
            }
            VIPManagement vipm = new VIPManagement();

            vipm.VipCard     = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            vipm.UserName    = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            vipm.VipType     = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            vipm.PhoneNumber = dataGridView1.CurrentRow.Cells[3].Value.ToString();
            vipm.Balance     = (int)dataGridView1.CurrentRow.Cells[4].Value;
            vipm.CreateTime  = dataGridView1.CurrentRow.Cells[5].Value.ToString();
            vip = new VIPManager(vipm);
            vip.StartPosition = FormStartPosition.CenterParent;
            vip.ShowDialog();
            if (vip.DialogResult == DialogResult.OK)
            {
                MessageBox.Show("操作成功");
                vip.Close();
                button1_Click(null, null);
            }
        }
Example #2
0
 /// <summary>
 /// 新增
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button2_Click(object sender, EventArgs e)
 {
     vip = new VIPManager();
     vip.StartPosition = FormStartPosition.CenterParent;
     vip.ShowDialog();
     if (vip.DialogResult == DialogResult.OK)
     {
         MessageBox.Show("操作成功");
         vip.Close();
         button1_Click(null, null);
     }
 }
Example #3
0
 public MemberManagement()
 {
     InitializeComponent();
     vip = new VIPManager();
 }