示例#1
0
        public frmPersonDetails(ref Client client, bool edit = false, bool insert = false)
        {
            initialise(client, insert);
            txtID.DataBindings.Add("Text", client, "ClientID");

            notificationTypes = NotificationType.Select();
            BindingList <NotificationType> bl = new BindingList <NotificationType>(notificationTypes);

            bindComboBox(cmbNotificationType, bl, "Title", "Id");
            cmbNotificationType.DataBindings.Add("SelectedValue", client, "FK_NotificationTypeId");

            if (insert)
            {
                cmbNotificationType.SelectedIndex = -1;
            }
        }