Exemplo n.º 1
0
        private void DeleteWorkplace(string sql)
        {
            ProductWorkplaceCollection oWorkplaceList = ProductWorkplace.LoadCollection(sql);

            foreach (ProductWorkplace oWorkplace in oWorkplaceList)
            {
                oWorkplace.Delete();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the on hand qty.
        /// </summary>
        /// <param name="workplaceId">The workplace id.</param>
        /// <param name="productId">The product id.</param>
        /// <returns></returns>
        private decimal GetOnHandQty(Guid workplaceId, Guid productId)
        {
            string           query = "ProductId = '" + productId.ToString() + "' AND WorkplaceId = '" + workplaceId.ToString() + "'";
            ProductWorkplace oPw   = ProductWorkplace.LoadWhere(query);

            if (oPw != null)
            {
                return(oPw.CDQTY);
            }
            else
            {
                return(0);
            }
        }