Esempio n. 1
0
        private void LoadContacts(int distributorId)
        {
            IList <Contact> lst = new List <Contact>();
            Distributor     d   = ControllerManager.Distributor.GetById(distributorId);

            if (chkAll.Checked)
            {
                lst = ControllerManager.Distributor.GetOrderedByStatus(d.ID);
            }
            else
            {
                lst = d.GetActiveContacs();
            }

            rptDistributorContacts.DataSource = lst;
            rptDistributorContacts.DataBind();

            if (d.Contacts.Count <= 0)
            {
                chkAll.Enabled = false;
            }
        }