Exemple #1
0
    public static ALOModel.ALOCommon.StoreChainInfo GetStoreChainInfo(ALOModel.ALOCommon.StoreChainInfo StoreChainObject)
    {
        try
        {
            STMModel.MaintainStoreChain MSC = new STMModel.MaintainStoreChain(ConnectionDB);

            #region 輸入變數
            ArrayList ParameterList = new ArrayList();

            ParameterList.Clear();
            //通路代號
            ParameterList.Add(StoreChainObject.StoreChainID);

            #endregion

            DataTable Dt = MSC.QuerySwitch(PIC.VDS2G.GFM.STM.STMCommon.QueryType.CODE,
                                           ParameterList
                                           );

            if (Dt.Rows.Count > 0)
            {
                StoreChainObject.StoreChainGroup = StoreChainObject.StoreChainID.Substring(0, 1);
                StoreChainObject.StoreChainName = Dt.Rows[0]["NAME"].ToString();
            }
            else
            {
                StoreChainObject.StoreChainGroup = "";
                StoreChainObject.StoreChainName = "查無資料";
            }

            return StoreChainObject;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }