Exemple #1
0
        public static string GetFilePath(int ID)
        {
            string          filepath = "";
            IFileType       ftdal    = new AccessDal.CodeMaker.FileType();
            ITempletType    tdal     = new AccessDal.CodeMaker.TempletType();
            ITemplet        dal      = new AccessDal.CodeMaker.Templet();
            TempletInfo     tinfo    = dal.TempletGetInfo(ID);
            TempletTypeInfo info     = tdal.TempletTypeGetInfo(tinfo.ParentID);

            string          code   = info.Code.Substring(0, 3);
            TempletTypeInfo tyinfo = tdal.TempletTypeByCodeGetList(code);

            string path = ftdal.FileType_GetPath(tyinfo.FileTypeID);

            filepath = rootFolder + "\\" + path + "\\" + info.Code;
            return(filepath);
        }
Exemple #2
0
        public static string GetFilePath(TempletTypeInfo info)
        {
            string       filepath = "";
            IFileType    ftdal    = new AccessDal.CodeMaker.FileType();
            ITempletType tdal     = new AccessDal.CodeMaker.TempletType();

            string          code   = info.Code.Substring(0, 3);
            TempletTypeInfo tyinfo = tdal.TempletTypeByCodeGetList(code);

            string path = ftdal.FileType_GetPath(tyinfo.FileTypeID);

            filepath = rootFolder + "\\" + path + "\\" + info.Code;
            string fpath = AppDomain.CurrentDomain.BaseDirectory + filepath;

            if (!Directory.Exists(fpath))
            {
                Directory.CreateDirectory(fpath);
            }

            return(filepath);
        }