Exemple #1
0
        private Form CreateDialogForInteraction(
            int customerId,
            Interaction interaction
            )
        {
            Form dialog = null;

            switch (interaction.InteractionType)
            {
            case InteractionType.Call:
                dialog = new CallDialog(customerId, interaction);
                break;

            case InteractionType.Email:
                dialog = new EmailDialog(customerId, interaction);
                break;
            }

            if (dialog == null)
            {
                throw new ArgumentException(String.Format("Cannot create dialog.  Unknown interaction type: {0}", interaction.InteractionType));
            }

            return(dialog);
        }
Exemple #2
0
        private void btnLogCall_Click(object sender, EventArgs e)
        {
            if (!CheckCustomerSelected())
            {
                return;
            }

            var dialog = new CallDialog(((Customer)this.cboCustomer.SelectedItem).Id.Value);
            var result = dialog.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                var interaction = dialog.Interaction;

                SupportService.Interactions.Add(interaction);
                AddInteractionToList(interaction);
            }
        }