public CategoriesProxyStub Categories_GetByPrimaryKey(System.Int32 categoryID)
		{
			Categories obj = new Categories();
			if (obj.LoadByPrimaryKey(categoryID))
			{
				return obj;
			}
			return null;
		}
		public CategoriesProxyStub Categories_QueryForEntity(string serializedQuery)
		{
			CategoriesQuery query = CategoriesQuery.SerializeHelper.FromXml(
				serializedQuery, typeof(CategoriesQuery), AllKnownTypes) as CategoriesQuery;

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

			return null;
		}
		public jsResponse<CategoriesCollection, Categories> Categories_LoadByPrimaryKey(System.Int32 categoryID)
		{
			jsResponse<CategoriesCollection, Categories> response = new jsResponse<CategoriesCollection, Categories>();

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

			return response;
		}
		public jsResponse<CategoriesCollection, Categories> Categories_Save(Categories entity)
		{
			jsResponse<CategoriesCollection, Categories> response = new jsResponse<CategoriesCollection, Categories>();

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

			return response;
		}
		public jsResponse<ProductsCollection, Products> Categories_ProductsCollectionByCategoryID(System.Int32 categoryID)
		{
			jsResponse<ProductsCollection, Products> response = new jsResponse<ProductsCollection, Products>();

			try
			{
				Categories entity = new Categories();
				entity.CategoryID = categoryID;
				response.collection = entity.ProductsCollectionByCategoryID;
			}
			catch (Exception ex)
			{
				response.exception = ex.Message;
			}

			return response;		
		}
Esempio n. 6
0
 public void DeleteCategories(BusinessObjects.Categories obj)
 {
     BusinessObjects.Categories.Delete(obj.CategoryID.Value);
 }
Esempio n. 7
0
 public void UpdateCategories(BusinessObjects.Categories obj)
 {
     obj.AcceptChanges();
     obj.MarkAllColumnsAsDirty(EntitySpaces.Interfaces.esDataRowState.Modified);
     obj.Save();
 }
Esempio n. 8
0
 public void InsertCategories(BusinessObjects.Categories obj)
 {
     obj.RowState = EntitySpaces.Interfaces.esDataRowState.Added;
     obj.Save();
 }
Esempio n. 9
0
 public CategoriesProxyStub(Categories obj, bool dirtyColumnsOnly)
 {
     theEntity             = this.entity = obj;
     this.dirtyColumnsOnly = dirtyColumnsOnly;
 }
Esempio n. 10
0
 public CategoriesProxyStub(Categories obj)
 {
     theEntity = this.entity = obj;
 }