예제 #1
0
 private static ClientDataSet.EntityNodeTypeRow GetEntityNodeType(Guid entityNodeTypeId, Guid organizationId)
 {
     using (EntityNodeTypeTableAdapter adapter = new EntityNodeTypeTableAdapter(OrganizationProvider.GetConnectionString(organizationId)))
     {
         ClientDataSet.EntityNodeTypeDataTable table = adapter.GetEntityNodeType(entityNodeTypeId);
         return((table.Count > 0) ? table[0] : null);
     }
 }
예제 #2
0
        public static void UpdateEntityNodeType(Guid organizationId, Guid entityNodeTypeId, string name, int orderNumber)
        {
            using (EntityNodeTypeTableAdapter adapter = new EntityNodeTypeTableAdapter(OrganizationProvider.GetConnectionString(organizationId)))
            {
                ClientDataSet.EntityNodeTypeDataTable table = adapter.GetEntityNodeType(entityNodeTypeId);
                if (table.Count > 0)
                {
                    ClientDataSet.EntityNodeTypeRow row = table[0];
                    row.Name        = name;
                    row.OrderNumber = orderNumber;

                    adapter.Update(row);
                }
            }
        }