Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Kalenderside (oversikt over underliggende hendelser med påmeldingsfunksjon og
| utlisting av påmeldte)
|
+- Kalenderhendelse1
|
+- Kalenderhendelse2
|
+- Kalenderhendelse3
Hvordan og hvor lagrer jeg enklest slik "custom data"?
DataSet ds = new DataSet();
DataTable table = new DataTable("BookingData");
ds.Tables.Add(table);
table.Columns.Add("PageID", System.Type.GetType("System.Int32"));
table.Columns.Add("SID", System.Type.GetType("System.Int32"));
table.Columns.Add("ResourceID", System.Type.GetType("System.Int32"));
table.Columns.Add("From", System.Type.GetType("System.DateTime"));
table.Columns.Add("To", System.Type.GetType("System.DateTime"));
PlugInSettings.Populate(this.GetType(), ds);
Response.Write ("Loaded " + ds.Tables["BookingData"].Rows.Count + " rows
");
DataRow row = table.NewRow();
row["PageID"] = pageID;
row["SID"] = 0;
row["ResourceID"] = 0;
row["From"] = DateTime.Now;
row["To"] = DateTime.Now.AddHours(2);
table.Rows.Add(row);
PlugInSettings.Save(this.GetType(), ds);
Response.Write ("Saved " + ds.Tables["BookingData"].Rows.Count + " rows
");
PlugInSettings.Populate(typeof(MyCustomClass), ds);
samt även Save..
PlugInSettings.Save(typeof(MyCustomClass), ds);
PageData oPage = this.CurrentPage; if (oPage.Property.Exists("custom")) { Response.Write ("Custom:" + oPage.Property["custom"].Value); } else { PropertyLongString ls = new PropertyLongString(); ls.Value = "This is some custom data for page: " + oPage.PageLink.ID.ToString(); oPage.Property.Add("custom", ls); this.CurrentPage = oPage; this.SavePage(); Response.Write ("Property set, page saved"); }