Esempio n. 1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string email    = comboboxTo.Text;
            int    receiver = controller.GetReceiver(id, value);

            if (receiver == 1)
            {
                customercontroller.CheckCustomerEmail(id, email);
                customermodel         = customercontroller.GetCustomerById(id);
                comboboxTo.DataSource = customermodel.Contacts;
                comboboxTo.DataBind();
            }
            else if (receiver == 2)
            {
                providercontroller.CheckEmail(id, email);
                providermodel         = providercontroller.GetCoreDataById(id);
                comboboxTo.DataSource = providermodel.Contacts;
                comboboxTo.DataBind();
            }
        }