コード例 #1
0
		public RegionProxyStub Region_GetByPrimaryKey(System.Int32 regionID)
		{
			Region obj = new Region();
			if (obj.LoadByPrimaryKey(regionID))
			{
				return obj;
			}
			return null;
		}
コード例 #2
0
		public jsResponse<TerritoriesCollection, Territories> Region_TerritoriesCollectionByRegionID(System.Int32 regionID)
		{
			jsResponse<TerritoriesCollection, Territories> response = new jsResponse<TerritoriesCollection, Territories>();

			try
			{
				Region entity = new Region();
				entity.RegionID = regionID;
				response.collection = entity.TerritoriesCollectionByRegionID;
			}
			catch (Exception ex)
			{
				response.exception = ex.Message;
			}

			return response;		
		}
コード例 #3
0
		public RegionProxyStub Region_QueryForEntity(string serializedQuery)
		{
			RegionQuery query = RegionQuery.SerializeHelper.FromXml(
				serializedQuery, typeof(RegionQuery), AllKnownTypes) as RegionQuery;

			Region obj = new Region();
			if (obj.Load(query))
			{
				return obj;
			}

			return null;
		}
コード例 #4
0
		public jsResponse<RegionCollection, Region> Region_Save(Region entity)
		{
			jsResponse<RegionCollection, Region> response = new jsResponse<RegionCollection, Region>();

			try
			{
				entity.Save();
				response.entity = entity;
			}
			catch (Exception ex)
			{
				response.exception = ex.Message;
			}

			return response;
		}
コード例 #5
0
		public jsResponse<RegionCollection, Region> Region_LoadByPrimaryKey(System.Int32 regionID)
		{
			jsResponse<RegionCollection, Region> response = new jsResponse<RegionCollection, Region>();

			try
			{
				Region entity = new Region();
				if (entity.LoadByPrimaryKey(regionID))
				{
					response.entity = entity;
				}
			}
			catch (Exception ex)
			{
				response.exception = ex.Message;
			}

			return response;
		}
コード例 #6
0
 public void DeleteRegion(BusinessObjects.Region obj)
 {
     BusinessObjects.Region.Delete(obj.RegionID.Value);
 }
コード例 #7
0
 public void UpdateRegion(BusinessObjects.Region obj)
 {
     obj.AcceptChanges();
     obj.MarkAllColumnsAsDirty(EntitySpaces.Interfaces.esDataRowState.Modified);
     obj.Save();
 }
コード例 #8
0
 public void InsertRegion(BusinessObjects.Region obj)
 {
     obj.RowState = EntitySpaces.Interfaces.esDataRowState.Added;
     obj.Save();
 }