Exemplo n.º 1
0
        private void ContactInformationsCompleted(Object sender, Server.Application.EntityContactInformationsGetCompletedEventArgs e)
        {
            if ((!e.Cancelled) && (e.Error == null))
            {
                // TODO: SILVERLIGHT CONVERSION

                // contactInformations = e.Result.Collection;


                NotifyPropertyChanged("ContactInformation");


                NotifyPropertyChanged("CurrentContactTelephone");

                NotifyPropertyChanged("CurrentContactFacsimile");

                NotifyPropertyChanged("CurrentContactEmail");

                NotifyPropertyChanged("CurrentContactEmergencyPhone");

                NotifyPropertyChanged("CurrentContactCellPhone");

                NotifyPropertyChanged("CurrentContactPager");
            }

            return;
        }
        protected void InitializeEntityContactInformations(Object sender, Server.Application.EntityContactInformationsGetCompletedEventArgs e)
        {
            if (Window.SetExceptionMessage(e))
            {
                return;
            }

            EntityContactInformationGrid.ItemsSource = Client.Converters.ServerCollectionToClient.EntityContactInformationCollection(MercuryApplication, e.Result.Collection);

            return;
        }
Exemplo n.º 3
0
        private void InitializeEntityContactInformations(Object sender, Server.Application.EntityContactInformationsGetCompletedEventArgs e)
        {
            if (!e.Result.HasException)
            {
                System.Collections.ObjectModel.ObservableCollection <Server.Application.EntityContactInformation> itemSource = new System.Collections.ObjectModel.ObservableCollection <Mercury.Server.Application.EntityContactInformation> ();

                foreach (Server.Application.EntityContactInformation currentInformation in e.Result.Collection)
                {
                    itemSource.Add(currentInformation);
                }


                Server.Application.EntityContactInformation contactInPerson = new Mercury.Server.Application.EntityContactInformation();

                contactInPerson.ContactType = Mercury.Server.Application.EntityContactType.InPerson;

                itemSource.Add(contactInPerson);


                Server.Application.EntityContactInformation contactByMail = new Mercury.Server.Application.EntityContactInformation();

                contactByMail.ContactType = Mercury.Server.Application.EntityContactType.ByMail;

                itemSource.Add(contactByMail);


                EntityContactInformationGrid.ItemsSource = itemSource;

                EntityContactInformationGrid.SelectedItem = itemSource[0];


                EntityContactInformationGrid.IsBusy = false;

                // EntityName.Text = "Contact " + Entity.EntityType.ToString () + ": " + Entity.Name;

                ButtonOk.IsEnabled = true;
            }

            else
            {
                SetValidationMessage(e.Result.Exception.Message);

                ButtonCancel.IsEnabled = true;
            }

            return;
        }