Пример #1
0
        private string GetFieldControlValue()
        {
            var allValues = new List <MultipleImageUploadFieldValue>();

            foreach (var valueName in tableControlsList.Keys)
            {
                if (tableControlsList[valueName].CheckBox.Checked)
                {
                    allValues.Add(new MultipleImageUploadFieldValue
                    {
                        //Name = valueName,
                        //Checked = tableControlsList[valueName].CheckBox.Checked,
                        URL = tableControlsList[valueName].Image.ImageUrl
                    });
                }
            }

            return(MultipleImageUploadFieldValue.ToFieldValue(allValues));
        }
Пример #2
0
        protected override void CreateChildControls()
        {
            //If the field we are working on is null then exit and do nothing
            if (base.Field == null)
            {
                return;
            }

            base.CreateChildControls();

            //Now instantiate the control instance variables with the controls defined in the rendering templates.
            InstantiateMemberControls();

            var selectedValues = MultipleImageUploadFieldValue.FromFieldValue(string.Empty + this.ItemFieldValue);

            if (base.ControlMode == SPControlMode.Display)
            {
                SetupDisplayTemplateControls(selectedValues);
            }
            else
            {
                SetupEditTemplateControls(selectedValues);
            }
        }