Exemplo n.º 1
0
        private void LoadContact()
        {
            DataTable dt = dao.GetContact();

            foreach (DataRow dr in dt.Rows)
            {
                CtrlContactName ctrlContact = new CtrlContactName();
                ctrlContact.ID        = Int64.Parse(dr["ID"].ToString());
                ctrlContact.SurName   = dr["LastName"].ToString();
                ctrlContact.GivenName = dr["FirstName"].ToString() + " " + dr["MiddleName"].ToString();
                ctrlContact.Click    += CtrlContact_Click;
                flwContacts.Controls.Add(ctrlContact);
            }
        }
Exemplo n.º 2
0
        private void CtrlContact_Click(object sender, EventArgs e)
        {
            CtrlContactName ctrl = (CtrlContactName)sender;

            LoadContactDetail(ctrl.ID);
        }