Exemple #1
0
        //**************************************************************************
        ///    <Description>
        ///       add a new Product Item into database and return its new ID
        ///    </Description>
        ///    <Inputs>
        ///
        ///    </Inputs>
        ///    <Outputs>
        ///
        ///    </Outputs>
        ///    <Returns>
        ///
        ///    </Returns>
        ///    <Authors>
        ///       THIENHD
        ///    </Authors>
        ///    <History>
        ///       15-Dec-2004
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************


        public int AddAndReturnID(object pObjectDetail, int pintCopyFromProductID)
        {
            // TODO:  Add ProductItemInfoBO.Add implementation
            try
            {
                if (ValidateBusiness(pObjectDetail))
                {
                    ITM_ProductDS objITM_ProductDS       = new ITM_ProductDS();
                    int           intNewlyAddedProductID = objITM_ProductDS.AddAndReturnID(pObjectDetail);
                    if (pintCopyFromProductID > 0)
                    {
                        //we have to copy its BOM, routing, and hearachy
                        //1.Copy from BOM
                        ITM_BOMDS dsITM_BOMDS = new ITM_BOMDS();
                        dsITM_BOMDS.CopyBOM(pintCopyFromProductID, intNewlyAddedProductID);
                        //2.Copy from Routing
                        ITM_RoutingDS dsITM_RoutingDS = new ITM_RoutingDS();
                        dsITM_RoutingDS.CopyRouting(pintCopyFromProductID, intNewlyAddedProductID);
                        //3.Copy hearachy
                        ITM_HierarchyDS dsITM_HierarchyDS = new ITM_HierarchyDS();
                        dsITM_HierarchyDS.CopyHierarchy(pintCopyFromProductID, intNewlyAddedProductID);
                    }
                    return(intNewlyAddedProductID);
                }
                else
                {
                    return(-1);
                }
            }
            catch (PCSException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
        public string GetProductionLineCode(int pintProductionLineID)
        {
            ITM_RoutingDS dsRouting = new ITM_RoutingDS();

            return(dsRouting.GetProductionLineCode(pintProductionLineID));
        }
Exemple #3
0
        public DataSet ListRoutingByProduct(int pintProductID)
        {
            ITM_RoutingDS dsRouting = new ITM_RoutingDS();

            return(dsRouting.ListRoutingByProduct(pintProductID));
        }
Exemple #4
0
        public void UpdateRoutingDescription(object pobjProduct)
        {
            ITM_RoutingDS dsRouting = new ITM_RoutingDS();

            dsRouting.UpdateRoutingDescription(pobjProduct);
        }
Exemple #5
0
        public void UpdateDataSet(DataSet dstData)
        {
            ITM_RoutingDS dsRouting = new ITM_RoutingDS();

            dsRouting.UpdateDataSet(dstData);
        }
Exemple #6
0
        public bool HasWorkCenterNotInProductionLine(int pintProductionLineID, string pstrWorkCenterIDs)
        {
            ITM_RoutingDS dsRouting = new ITM_RoutingDS();

            return(dsRouting.HasWorkCenterNotInProductionLine(pintProductionLineID, pstrWorkCenterIDs));
        }
Exemple #7
0
        public bool IsWorkCenterInProductionLine(int pintProductionLineID, int pintWorkCenterID)
        {
            ITM_RoutingDS dsRouting = new ITM_RoutingDS();

            return(dsRouting.IsWorkCenterInProductionLine(pintProductionLineID, pintWorkCenterID));
        }
Exemple #8
0
        public string GetCostCenterMasterCode(int pintCostCenterMasterID)
        {
            ITM_RoutingDS dsRouting = new ITM_RoutingDS();

            return(dsRouting.GetCostCenterMasterCode(pintCostCenterMasterID));
        }
Exemple #9
0
        public string GetProductGroupCode(int pintProductGroupID)
        {
            ITM_RoutingDS dsRouting = new ITM_RoutingDS();

            return(dsRouting.GetProductGroupCode(pintProductGroupID));
        }