Esempio n. 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;
        }
Esempio n. 2
0
        /// <summary>
        /// LoadAndAddItem
        /// </summary>
        /// <param name="unitId">unitId</param>
        /// <param name="unitCode">unitCode</param>
        /// <param name="companyId">companyId</param>
        /// <param name="isWithUnitCode">isWithUnitCode</param>
        /// <param name="category">category</param>
        /// <returns>Dataset</returns>
        public DataSet LoadAndAddItem(string unitId, string unitCode, int companyId, bool isWithUnitCode, string category)
        {
            // Add item
            CreateTableStructureWitUnitCode();
            InsertWithUnitCode(unitId, unitCode);

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

            return Data;
        }
Esempio n. 3
0
        /// <summary>
        /// LoadAndAddItemByCategoryCompanyLevelId
        /// </summary>
        /// <param name="category">category</param>
        /// <param name="companyLevelId">companyLevelId</param>
        /// <param name="companyId">companyId</param>
        /// <returns>Dataset</returns>
        public DataSet LoadAndAddItemByCategoryCompanyLevelId(string category, int companyLevelId, int companyId)
        {
            // Load unit list
            UnitsListGateway unitsListGateway = new UnitsListGateway(Data);
            unitsListGateway.ClearBeforeFill = false;
            unitsListGateway.LoadByCategoryCompanyLevelIdWithUnitCodeDescription(category, companyLevelId, companyId);
            unitsListGateway.ClearBeforeFill = true;

            return Data;
        }
Esempio n. 4
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;
        }