static public void Delete(System.String territoryID, esSqlAccessType sqlAccessType)
        {
            var obj = new Territories();

            obj.TerritoryID = territoryID;
            obj.AcceptChanges();
            obj.MarkAsDeleted();
            obj.Save(sqlAccessType);
        }
		public TerritoriesProxyStub Territories_QueryForEntity(string serializedQuery)
		{
			TerritoriesQuery query = TerritoriesQuery.SerializeHelper.FromXml(
				serializedQuery, typeof(TerritoriesQuery), AllKnownTypes) as TerritoriesQuery;

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

			return null;
		}
		public TerritoriesProxyStub Territories_GetByPrimaryKey(System.String territoryID)
		{
			Territories obj = new Territories();
			if (obj.LoadByPrimaryKey(territoryID))
			{
				return obj;
			}
			return null;
		}
		public jsResponse<EmployeeTerritoriesCollection, EmployeeTerritories> Territories_EmployeeTerritoriesCollectionByTerritoryID(System.String territoryID)
		{
			jsResponse<EmployeeTerritoriesCollection, EmployeeTerritories> response = new jsResponse<EmployeeTerritoriesCollection, EmployeeTerritories>();

			try
			{
				Territories entity = new Territories();
				entity.TerritoryID = territoryID;
				response.collection = entity.EmployeeTerritoriesCollectionByTerritoryID;
			}
			catch (Exception ex)
			{
				response.exception = ex.Message;
			}

			return response;		
		}
		public jsResponse<RegionCollection, Region> Territories_UpToRegionByRegionID(System.String territoryID)
		{
			jsResponse<RegionCollection, Region> response = new jsResponse<RegionCollection, Region>();

			try
			{
				Territories entity = new Territories();
				entity.TerritoryID = territoryID;
				response.entity = entity.UpToRegionByRegionID;
			}
			catch (Exception ex)
			{
				response.exception = ex.Message;
			}

			return response;		
		}
		public jsResponse<TerritoriesCollection, Territories> Territories_LoadByPrimaryKey(System.String territoryID)
		{
			jsResponse<TerritoriesCollection, Territories> response = new jsResponse<TerritoriesCollection, Territories>();

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

			return response;
		}
		public jsResponse<TerritoriesCollection, Territories> Territories_Save(Territories entity)
		{
			jsResponse<TerritoriesCollection, Territories> response = new jsResponse<TerritoriesCollection, Territories>();

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

			return response;
		}
 public TerritoriesProxyStub(Territories obj, bool dirtyColumnsOnly)
 {
     theEntity             = this.entity = obj;
     this.dirtyColumnsOnly = dirtyColumnsOnly;
 }
 public TerritoriesProxyStub(Territories obj)
 {
     theEntity = this.entity = obj;
 }
Ejemplo n.º 10
0
 public void DeleteTerritories(BusinessObjects.Territories obj)
 {
     BusinessObjects.Territories.Delete(obj.TerritoryID);
 }
Ejemplo n.º 11
0
 public void UpdateTerritories(BusinessObjects.Territories obj)
 {
     obj.AcceptChanges();
     obj.MarkAllColumnsAsDirty(EntitySpaces.Interfaces.esDataRowState.Modified);
     obj.Save();
 }
Ejemplo n.º 12
0
 public void InsertTerritories(BusinessObjects.Territories obj)
 {
     obj.RowState = EntitySpaces.Interfaces.esDataRowState.Added;
     obj.Save();
 }