public void Specification() { var specFieldType = new SpecificationFieldType(); specFieldType.Id = Guid.NewGuid().ToString().Replace("-", ""); //Example of auto generated Id specFieldType.EntityId = 3974; //SPECIFICATION ENTITY specFieldType.Index = 1; specFieldType.DataType = DataType.String; //specFieldType.CVLId = "Color"; //specFieldType.Multivalue = true; specFieldType.Name = new LocaleString(RemoteManager.UtilityService.GetAllLanguages()); specFieldType.Name[new CultureInfo("en")] = "Main Colors"; specFieldType.Mandatory = false; specFieldType.CategoryId = "MyNewCategory"; RemoteManager.DataService.AddSpecificationFieldType(specFieldType); var f = new SpecificationField(); f.EntityId = 3932; //ENTITY TO LINK FOR (e.g. Product, Items, etc) f.Data = "My value"; f.SpecificationFieldType = RemoteManager.DataService.GetSpecificationFieldType(specFieldType.Id); //GUID RemoteManager.DataService.AddSpecificationField(f); var category = new Category(); category.Id = "MyNewCategory"; category.Index = 2; var name = new LocaleString(RemoteManager.UtilityService.GetAllLanguages()); name[new CultureInfo("en")] = "My new category"; name[new CultureInfo("sv")] = "Min nya kategori"; category.Name = name; RemoteManager.DataService.AddSpecificationCategory(category); //Enable/disable a current template (if disable it will not visible to specification) RemoteManager.DataService.EnableSpecificationTemplateFieldType(false, 3974, "7710e7b5445b4dd89ca008e6d442720c"); }
public void AddSpecificationField(SpecificationField field) { throw new NotImplementedException(); }
public SpecificationField UpdateSpecificationField(SpecificationField specificationField) { throw new NotImplementedException(); }