Exemplo n.º 1
0
        /// <summary>
        /// 新增收货地址
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void skinButton4_Click(object sender, EventArgs e)
        {
            Form_AddressEdit form_AddressEdit = new Form_AddressEdit();

            form_AddressEdit.LoadingAddressmode = 0;
            form_AddressEdit.UserID             = UserID;
            form_AddressEdit.ShowDialog();
            LoadAddressList();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 修改地址
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void skinButton5_Click(object sender, EventArgs e)
        {
            if (listView2.SelectedItems.Count != 1)
            {
                MessageBox.Show("请选择修改的地址");
            }
            else
            {
                Form_AddressEdit form_AddressEdit = new Form_AddressEdit();
                form_AddressEdit.ID = listView2.SelectedItems[0].Tag.ToString();
                form_AddressEdit.LoadingAddressmode = 1;
                form_AddressEdit.consignee          = listView2.SelectedItems[0].SubItems[0].Text;
                form_AddressEdit.phone    = listView2.SelectedItems[0].SubItems[1].Text;
                form_AddressEdit.zip      = listView2.SelectedItems[0].SubItems[2].Text;
                form_AddressEdit.province = listView2.SelectedItems[0].SubItems[3].Text;
                form_AddressEdit.city     = listView2.SelectedItems[0].SubItems[4].Text;
                form_AddressEdit.district = listView2.SelectedItems[0].SubItems[5].Text;
                form_AddressEdit.address  = listView2.SelectedItems[0].SubItems[6].Text;
                form_AddressEdit.UserID   = UserID;

                form_AddressEdit.ShowDialog();
                LoadAddressList();
            }
        }