Exemplo n.º 1
0
        private void AddClientAdd()
        {
            ClientAdd client = new ClientAdd();

            ClientAddCollection.Add(client);
            SelectedClientAdd = client;
            MessageBox.Show("Click Save button after entering the new Client Address details.", "Client Location", MessageBoxButton.OK, MessageBoxImage.Warning);
        }
Exemplo n.º 2
0
        public ClientAddManagementViewModel(string ClientId)
        {
            //1. Its going to connect to DAL and bring in the results of all Instructors
            //2. we Create objects of type instructor and then add that object to our collection
            DAL       dal = new DAL();
            DataTable dt  = dal.Read("Select * from bit_client_location  where Client_Id=" + ClientId);

            PassedClientId = Convert.ToInt32(ClientId);

            // clientadd.UserID = UserId;
            foreach (DataRow dr in dt.Rows)
            {
                ClientAdd client = new ClientAdd(dr);
                ClientAddCollection.Add(client);
            }
        }
Exemplo n.º 3
0
 private void DeleteClientAdd()
 {
     try
     {
         if (MessageBox.Show("Are you sure you want to PERMANENTLY delete the Client's Location details?", "Delete Client Location?", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
         {
             SelectedClientAdd.DeleteAddress();
             ClientAddCollection.Remove(SelectedClientAdd);
             MessageBox.Show("Thank you!  The Client's Location details have been deleted!", "Delete Client Location?", MessageBoxButton.OK, MessageBoxImage.Information);
         }
         else
         {
             return;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("An Error Occured, The Client Location Details have not been deleted. Please Contact your System Administrator.", "Delete Client Location?" + ex.Message);
     }
 }