コード例 #1
0
        private string GetArchivePath()
        {
            PartsTable pt       = new PartsTable(KeyValue, Version);
            string     sPath    = "";
            string     sHworvd  = pt.GetDataTable().Rows[0]["hworvd"].ToString().Trim();
            string     sProject = pt.GetDataTable().Rows[0]["project"].ToString().Trim();

            string  sZeros   = "";
            decimal dVersion = Convert.ToDecimal(Version);
            int     nVersion = (int)(dVersion * 100);

            if (nVersion < 10)
            {
                sZeros += "0";
            }

            // ja - test for base directory
            if (sHworvd.Trim() == "HIWIRE")
            {
                sPath = FINISHEDPRODUCTS;
            }
            else
            {
                sPath = ARCHIVE;
            }

            // ja - create path
            sPath += "\\" + sProject.Trim();
            sPath += "\\" + KeyValue;
            sPath += "\\" + sZeros + nVersion.ToString();

            return(sPath);
        }
コード例 #2
0
ファイル: Assembly.cs プロジェクト: jasonmacleanamc/Common
        public bool InitTable()
        {
            KeyIdentifier = "Partnumber";

            string sTableName = PartsTable.GetPartNumberTable(KeyValue, Version);

            TableName = sTableName;

            // ja - for vfp the connection string has to be set after the table name is known
            ConnectionString = GetPMConnString();

            return(InitializeDatabase());
        }