public ProductsProxyStub Products_GetByPrimaryKey(System.Int32 productID)
		{
			Products obj = new Products();
			if (obj.LoadByPrimaryKey(productID))
			{
				return obj;
			}
			return null;
		}
		public jsResponse<SuppliersCollection, Suppliers> Products_UpToSuppliersBySupplierID(System.Int32 productID)
		{
			jsResponse<SuppliersCollection, Suppliers> response = new jsResponse<SuppliersCollection, Suppliers>();

			try
			{
				Products entity = new Products();
				entity.ProductID = productID;
				response.entity = entity.UpToSuppliersBySupplierID;
			}
			catch (Exception ex)
			{
				response.exception = ex.Message;
			}

			return response;		
		}
		public ProductsProxyStub Products_QueryForEntity(string serializedQuery)
		{
			ProductsQuery query = ProductsQuery.SerializeHelper.FromXml(
				serializedQuery, typeof(ProductsQuery), AllKnownTypes) as ProductsQuery;

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

			return null;
		}
		public jsResponse<OrderDetailsCollection, OrderDetails> Products_OrderDetailsCollectionByProductID(System.Int32 productID)
		{
			jsResponse<OrderDetailsCollection, OrderDetails> response = new jsResponse<OrderDetailsCollection, OrderDetails>();

			try
			{
				Products entity = new Products();
				entity.ProductID = productID;
				response.collection = entity.OrderDetailsCollectionByProductID;
			}
			catch (Exception ex)
			{
				response.exception = ex.Message;
			}

			return response;		
		}
		public jsResponse<CategoriesCollection, Categories> Products_UpToCategoriesByCategoryID(System.Int32 productID)
		{
			jsResponse<CategoriesCollection, Categories> response = new jsResponse<CategoriesCollection, Categories>();

			try
			{
				Products entity = new Products();
				entity.ProductID = productID;
				response.entity = entity.UpToCategoriesByCategoryID;
			}
			catch (Exception ex)
			{
				response.exception = ex.Message;
			}

			return response;		
		}
		public jsResponse<ProductsCollection, Products> Products_Save(Products entity)
		{
			jsResponse<ProductsCollection, Products> response = new jsResponse<ProductsCollection, Products>();

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

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

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

			return response;
		}
Esempio n. 8
0
 public void DeleteProducts(BusinessObjects.Products obj)
 {
     BusinessObjects.Products.Delete(obj.ProductID.Value);
 }
Esempio n. 9
0
 public void UpdateProducts(BusinessObjects.Products obj)
 {
     obj.AcceptChanges();
     obj.MarkAllColumnsAsDirty(EntitySpaces.Interfaces.esDataRowState.Modified);
     obj.Save();
 }
Esempio n. 10
0
 public void InsertProducts(BusinessObjects.Products obj)
 {
     obj.RowState = EntitySpaces.Interfaces.esDataRowState.Added;
     obj.Save();
 }