Пример #1
0
 public static DT.ClientGroupMapping ToDto(DA.ResourceResourceGroup source)
 {
     return(new DT.ClientGroupMapping()
     {
         Child = source.ResourceId, Parent = source.ResourceGroupId
     });
 }
Пример #2
0
        public void AddResourceToGroup(DT.Resource resource, DT.ClientGroup group)
        {
            using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) {
                DA.ResourceResourceGroup rrg = new DA.ResourceResourceGroup()
                {
                    ResourceId      = resource.Id,
                    ResourceGroupId = group.Id
                };

                context.ResourceResourceGroups.InsertOnSubmit(rrg);
                context.SubmitChanges();
            }
        }
		private void detach_ResourceResourceGroups1(ResourceResourceGroup entity)
		{
			this.SendPropertyChanging();
			entity.Resource = null;
		}
		private void attach_ResourceResourceGroups(ResourceResourceGroup entity)
		{
			this.SendPropertyChanging();
			entity.ParentResource = this;
		}
 partial void DeleteResourceResourceGroup(ResourceResourceGroup instance);
 partial void UpdateResourceResourceGroup(ResourceResourceGroup instance);
 partial void InsertResourceResourceGroup(ResourceResourceGroup instance);
Пример #8
0
    public void AddResourceToGroup(DT.Resource resource, DT.ClientGroup group) {
      using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) {
        DA.ResourceResourceGroup rrg = new DA.ResourceResourceGroup() {
          ResourceId = resource.Id,
          ResourceGroupId = group.Id
        };

        context.ResourceResourceGroups.InsertOnSubmit(rrg);
        context.SubmitChanges();
      }
    }