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;		
		}
Example #6
0
 public void DeleteCategories(BusinessObjects.Categories obj)
 {
     BusinessObjects.Categories.Delete(obj.CategoryID.Value);
 }
Example #7
0
 public void UpdateCategories(BusinessObjects.Categories obj)
 {
     obj.AcceptChanges();
     obj.MarkAllColumnsAsDirty(EntitySpaces.Interfaces.esDataRowState.Modified);
     obj.Save();
 }
Example #8
0
 public void InsertCategories(BusinessObjects.Categories obj)
 {
     obj.RowState = EntitySpaces.Interfaces.esDataRowState.Added;
     obj.Save();
 }
Example #9
0
 public CategoriesProxyStub(Categories obj, bool dirtyColumnsOnly)
 {
     theEntity             = this.entity = obj;
     this.dirtyColumnsOnly = dirtyColumnsOnly;
 }
Example #10
0
 public CategoriesProxyStub(Categories obj)
 {
     theEntity = this.entity = obj;
 }