private void CreateGroup(String groupref, String name) { var n = new GroupData(-1, StoreSettings.Current.EditLanguage); n.Ref = groupref; n.Name = name; n.DataRecord.GUIDKey = groupref; n.Save(); }
private void SaveAll() { foreach (RepeaterItem rtnItem in rpData.Items) { var isdirty = GenXmlFunctions.GetField(rtnItem, "isdirty"); var itemid = GenXmlFunctions.GetField(rtnItem, "itemid"); if (isdirty == "true" && Utils.IsNumeric(itemid)) { var grpData = new GroupData(Convert.ToInt32(itemid), StoreSettings.Current.EditLanguage); if (grpData.Exists) { grpData.Validate(); var grpname = GenXmlFunctions.GetField(rtnItem, "groupname"); var grpref = GenXmlFunctions.GetField(rtnItem, "groupref"); var grptype = GenXmlFunctions.GetField(rtnItem, "grouptype"); grpData.Name = grpname; grpData.Ref = grpref; grpData.Type = grptype; grpData.Save(); } } } }