Exemplo n.º 1
0
        private void btChangeDetails_Click(object sender, EventArgs e)
        {
            UpdateUserDataForm updateDetails = new UpdateUserDataForm(_currentUserId, UserDetailType.User);

            updateDetails.Text = @"Update details";
            if (ParentForm != null)
            {
                ParentForm.Visible = false;
                if (updateDetails.ShowDialog() == DialogResult.OK)
                {
                    FillUserData();
                }
                ParentForm.Visible = true;
            }
        }
Exemplo n.º 2
0
 private void btUpdateTelephone_Click(object sender, EventArgs e)
 {
     if (lvUserTelephone.SelectedItems.Count > 0)
     {
         var listViewItem = lvUserTelephone.SelectedItems[0];
         UpdateUserDataForm updatePhone = new UpdateUserDataForm(listViewItem.SubItems[3].Text.GetInt(), UserDetailType.Telephone);
         updatePhone.Text = @"Update telephone";
         if (ParentForm != null)
         {
             ParentForm.Visible = false;
             if (updatePhone.ShowDialog() == DialogResult.OK)
             {
                 FillPhonesLv();
             }
             ParentForm.Visible = true;
         }
     }
     else
     {
         MessageContainer.DisplayError("Select address to update", "Error");
     }
 }