Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="contentControls"></param>
        /// <param name="contentItems"></param>
        protected virtual void PopulateItems(ControlCollection contentControls, ItemsCollection <AbstractComponent> contentItems)
        {
            foreach (Control control in contentControls)
            {
                var cmp = control as AbstractComponent;

                if (cmp != null)
                {
                    contentItems.Add(cmp);
                    cmp.ID = cmp.ID;
                }
                else if (control is ContentPlaceHolder || control is UserControl)
                {
                    this.PopulateItems(control.Controls, contentItems);
                }
                else if (control is LiteralControl || control is Literal)
                {
                    continue;
                }
                else
                {
                    throw new Exception(string.Format(ServiceMessages.NON_LAYOUT_CONTROL, control.GetType().ToString()));
                }
            }
        }
Esempio n. 2
0
 protected internal void InitItems()
 {
     if (this.items == null)
     {
         this.items = new ItemsCollection <Component>();
         this.items.BeforeItemAdd   += this.BeforeItemAdd;
         this.items.AfterItemAdd    += this.AfterItemAdd;
         this.items.AfterItemRemove += this.AfterItemRemove;
         this.items.SingleItemMode   = this.SingleItemMode;
     }
 }
Esempio n. 3
0
    private void GenSql(Ext.Net.ItemsCollection <Ext.Net.Component> collection)
    {
        object value = "";

        foreach (var item in collection)
        {
            string colName = GetFieldName(item, ref value);
            if (!string.IsNullOrEmpty(colName))
            {
                ColumnName  += "[" + colName + "],";
                ValueList   += "N'" + value + "',";
                UpdateQuery += "[" + colName + "] = N'" + value + "',";
            }
        }
    }