Esempio n. 1
0
        //**************************************************************************
        ///    <Description>
        ///       Get list of Location
        ///    </Description>
        ///    <Inputs>
        ///
        ///    </Inputs>
        ///    <Outputs>
        ///
        ///    </Outputs>
        ///    <Returns>
        ///
        ///    </Returns>
        ///    <Authors>
        ///       THIENHD
        ///    </Authors>
        ///    <History>
        ///       15-Dec-2004
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************


        public DataSet GetLocation()
        {
            try
            {
                DataSet   dstLocation = new DataSet();
                DataTable dt;
                DataRow   drEmptyRow;
                //get Master Location
                MST_MasterLocationDS objMST_MasterLocationDS = new MST_MasterLocationDS();
                dt         = objMST_MasterLocationDS.List().Tables[0].Copy();
                drEmptyRow = dt.NewRow();
                dt.Rows.InsertAt(drEmptyRow, 0);
                dstLocation.Tables.Add(dt);

                //Get Location
                MST_LocationDS objMST_LocationDS = new MST_LocationDS();
                dt         = objMST_LocationDS.List().Tables[0].Copy();
                drEmptyRow = dt.NewRow();
                dt.Rows.InsertAt(drEmptyRow, 0);
                dstLocation.Tables.Add(dt);

                //Get Bin
                MST_BINDS objMST_BINDS = new MST_BINDS();
                dt         = objMST_BINDS.List().Tables[0].Copy();
                drEmptyRow = dt.NewRow();
                dt.Rows.InsertAt(drEmptyRow, 0);
                dstLocation.Tables.Add(dt);

                //Define relation for this dataset
                //1. Relation between Master Location and Location

                /*
                 * DataColumn[] dtcolMasterLocationColumnParent = new DataColumn[1]{dstLocation.Tables[MST_MasterLocationTable.TABLE_NAME].Columns[MST_MasterLocationTable.MASTERLOCATIONID_FLD]};
                 * DataColumn[] dtcolLocationColumnChild = new DataColumn[1]{dstLocation.Tables[MST_LocationTable.TABLE_NAME].Columns[MST_LocationTable.MASTERLOCATIONID_FLD]};
                 * dstLocation.Relations.Add(dtcolMasterLocationColumnParent,dtcolLocationColumnChild);
                 */


                //2.Relation between Location and Bin

                /*
                 * DataColumn[] dtcolLocationColumnParent = new DataColumn[1]{dstLocation.Tables[MST_LocationTable.TABLE_NAME].Columns[MST_LocationTable.LOCATIONID_FLD]};
                 * DataColumn[] dtcolBinColumnChild = new DataColumn[1]{dstLocation.Tables[MST_BINTable.TABLE_NAME].Columns[MST_BINTable.LOCATIONID_FLD]};
                 * dstLocation.Relations.Add(dtcolLocationColumnParent,dtcolBinColumnChild);
                 */

                return(dstLocation);
            }
            catch (PCSDBException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Get Location Info for selecting (in In-Out Stock Report)
        /// </summary>
        /// <param name="pintMasterLocationID"></param>
        /// <returns></returns>
        /// <author> Tuan TQ. 16 Jan, 2006</author>

        public DataTable GetByLocation4Selecting(int pintMasterLocationID, string pstrOtherCondition)
        {
            MST_LocationDS dsLocation = new MST_LocationDS();

            return(dsLocation.GetByLocation4Selecting(pintMasterLocationID, pstrOtherCondition));
        }
Esempio n. 3
0
        public DataTable ListLocation()
        {
            MST_LocationDS dsLocation = new MST_LocationDS();

            return(dsLocation.List().Tables[0]);
        }
Esempio n. 4
0
        /// <summary>
        /// GetMasterLocationIDByLocationID
        /// </summary>
        /// <param name="pintLocationID"></param>
        /// <returns></returns>
        /// <author>Trada</author>
        /// <date>Friday, August 18 2006</date>

        public int GetMasterLocationIDByLocationID(int pintLocationID)
        {
            MST_LocationDS dsLocation = new MST_LocationDS();

            return(dsLocation.GetMasterLocationIDByLocationID(pintLocationID));
        }
Esempio n. 5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pstrLocationCode"></param>
        /// <returns>MST_LocationVO</returns>
        public string GetLocationNameByLocationCode(string pstrLocationCode)
        {
            var objDS = new MST_LocationDS();

            return(objDS.GetNameFromCode(pstrLocationCode));
        }
Esempio n. 6
0
        /// <summary>
        /// fill Location by ProductionLineID
        /// </summary>
        /// <param name="pintLocationID"></param>
        /// <returns></returns>
        /// <author>Trada</author>
        /// <date>Tuesday, August  15 2006</date>

        public string FillLocation(int pintLocationID)
        {
            MST_LocationDS dsLocation = new MST_LocationDS();

            return(dsLocation.GetCodeFromID(pintLocationID));
        }