Beispiel #1
0
 private void btAdd_Click(object sender, EventArgs e)
 {
     InfoAddFrm.Address ia = new ZS.InfoAddFrm.Address();
     ia.Text = "添加加盟商信息";
     ia.Tag  = 1;
     ia.ShowDialog(this);
     showall();
 }
Beispiel #2
0
        private void btUpdata_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.SelectedRows.Count <= 0)
            {
                MessageBox.Show("你还没选呢");
                return;
            }
            else if (this.dataGridView1.SelectedRows.Count > 1)
            {
                MessageBox.Show("一次只能选一个");
                return;
            }
            int UpdataId = int.Parse(this.dataGridView1.SelectedRows[0].Cells["id"].Value.ToString());

            InfoAddFrm.Address ib = new ZS.InfoAddFrm.Address(UpdataId);
            ib.Tag  = 2;
            ib.Text = "修改加盟信息";
            ib.ShowDialog(this);
            showall();
        }