private void InitializeFields()
        {
            InitializeInternalFields(_baseChannelEditor);
            const string HiddenFieldName = "hfBaseChannelPlatformClientGroupID";

            _hfBaseChannelPlatformClientGroupID = GetPrivateField <HiddenField>(HiddenFieldName);
            _hfBaseChannelGuid = GetPrivateField <HiddenField>("hfBaseChannelGuid");
            _tbChannelName     = GetPrivateField <TextBox>("tbChannelName");
            _tbChannelURL      = GetPrivateField <TextBox>("tbChannelURL");
            _tbWebAddress      = GetPrivateField <TextBox>("tbWebAddress");
            _rblActive         = GetPrivateField <RadioButtonList>("rblActive");
            _rblActive.Items.Add(Yes);
            _rblActive.Items.Add(No);
            _ddlChannelType = GetPrivateField <DropDownList>("ddlChannelType");
            _ddlChannelType.Items.Add(ChannelType.Unknown.ToString());
            _ddlChannelPartnerType = GetPrivateField <DropDownList>("ddlChannelPartnerType");
            _ddlChannelPartnerType.Items.Add(GetAnyNumber().ToString());
            _ddlMSCustomer = GetPrivateField <DropDownList>("ddlMSCustomer");
            _ddlMSCustomer.Items.Add(GetAnyNumber().ToString());
            _contactEditor   = GetPrivateField <ContactEditor>("ContactEditor");
            _lblErrorMessage = GetPrivateField <Label>("lblErrorMessage");
            _tlClientGroupServiceFeatures = GetPrivateField <RadTreeList>("tlClientGroupServiceFeatures");
            InitializeInternalFields(_contactEditor);
            _contactEditor.Contact = _contact;
        }
Example #2
0
        private void Create()
        {
            Console.Clear();

            var newContact = ContactEditor.GetNewContact();

            if (contactList.HasContact(newContact))
            {
                Console.WriteLine(CONTACT_IS_DUPLICATE_MESSAGE);
                isOperationDone = false;
            }
            else
            {
                contactList.Add(newContact);
                Console.WriteLine(CONTACT_CREATED_MESSAGE);
            }
        }
Example #3
0
        private void Edit()
        {
            Console.Clear();

            contactList.PrintAll();
            Console.Write(ENTER_CONTACT_INDEX_TO_UPDATE_MESSAGE);
            var index = GetContactIndex();

            var oldContact = contactList.Contacts[index];
            var newContact = ContactEditor.Edit(oldContact);

            if (contactList.HasContact(newContact) && !oldContact.Equals(newContact))
            {
                Console.WriteLine(CONTACT_IS_DUPLICATE_MESSAGE);
                isOperationDone = false;
            }
            else
            {
                contactList.Update(index, newContact);
                Console.WriteLine(CONTACT_UPDATED_MESSAGE);
            }
        }