예제 #1
0
 public virtual Ext.Net.Model GetModel()
 {
     var model = new Ext.Net.Model();
     model.Fields.Add(new ModelField()
     {
         Type = ModelFieldType.String,
         Name = "Name"
     });
     model.Fields.Add(new ModelField()
     {
         Name = "Id",
         Type = ModelFieldType.Int
     });
     return model;
 }
예제 #2
0
        public virtual Ext.Net.Model GetModel()
        {
            var model = new Ext.Net.Model();

            model.Fields.Add(new ModelField()
            {
                Type = ModelFieldType.String,
                Name = "Name"
            });
            model.Fields.Add(new ModelField()
            {
                Name = "Id",
                Type = ModelFieldType.Int
            });
            return(model);
        }
예제 #3
0
        private Store GetStore()
        {
            Store store = new Store()
                {
                    ID = "Store1"
                };

            Model model = new Model()
                {
                    Fields =
                    {
                        new ModelField("name"),
                        new ModelField("thumb"),
                        new ModelField("url"),
                        new ModelField("type")
                    }
                };
            store.Model.Add(model);

            AjaxProxy proxy = new AjaxProxy()
                {
                    Url = "~/Examples/DataView/Shared/sencha-touch-examples.json",
                    Reader =
                    {
                        new JsonReader()
                    }
                };

            store.Proxy.Add(proxy);

            return store;
        }
예제 #4
0
 public static Model GetModel(Dictionary<string,ModelFieldType> fields)
 {
     Ext.Net.Model model = new Model();
     model.Fields.AddRange(fields.Select(x => new ModelField(x.Key, x.Value)));
     return model;
 }
예제 #5
0
        private Store GetStore()
        {
            Store store = new Store()
                {
                    ID = "Store1"
                };
            store.SortOnLoad = true;

            Model model = new Model()
                {
                    Fields =
                {
                    new ModelField("name"),
                    new ModelField("thumb"),
                    new ModelField("url"),
                    new ModelField("type")
                }
                };
            store.Model.Add(model);

            AjaxProxy proxy = new AjaxProxy()
                {
                    Url = "~/Areas/DataView_Basic/Content/sencha-touch-examples.json",
                    Reader =
                    {
                        new JsonReader()
                    }
                };

            store.Proxy.Add(proxy);

            return store;
        }