示例#1
0
        // ////////////////////////////////////////////////////////////////////////
        // PUBLIC METHODS
        //
        /// <summary>
        /// LoadAndAddItem
        /// </summary>
        /// <param name="unitId">unitId</param>
        /// <param name="description">description</param>
        /// <param name="companyId">companyId</param>
        /// <returns>Dataset</returns>
        public DataSet LoadAndAddItem(string unitId, string description, int companyId)
        {
            // Add item
            CreateTableStructure();
            Insert(unitId, description);

            // Load unit list
            UnitsListGateway unitsListGateway = new UnitsListGateway(Data);
            unitsListGateway.ClearBeforeFill = false;
            unitsListGateway.Load(companyId);
            unitsListGateway.ClearBeforeFill = true;

            return Data;
        }
示例#2
0
        /// <summary>
        /// LoadAndAddItem
        /// </summary>        
        /// <param name="companyId">companyId</param>
        /// <returns>Dataset</returns>
        public DataSet LoadAndAddItem( int companyId)
        {
            // Load unit list
            UnitsListGateway unitsListGateway = new UnitsListGateway(Data);
            unitsListGateway.ClearBeforeFill = false;
            unitsListGateway.Load(companyId);
            unitsListGateway.ClearBeforeFill = true;

            return Data;
        }