예제 #1
0
파일: Creator.cs 프로젝트: icecoldless/-
        public void Create(string path, List <string> LstTbName)
        {
            //保存Model
            CreateData cd = new CreateData()
            {
                IsPage        = this.IsPage,
                PageSize      = this.PageSize,
                IsExistedName = this.IsExistedName,
                DalSuffix     = this.DALSuffix,
                BllSuffix     = this.BLLSuffix
            };
            Dictionary <string, string> dicM = Mc.Create(LstTbName);

            if (!Directory.Exists(path + "\\Models"))
            {
                Directory.CreateDirectory(path + "\\Models");
            }
            SaveFile(path + "\\Models\\", string.Empty, dicM);

            //save DAL
            Dictionary <string, string> dicD = Dc.Create(LstTbName, cd);

            if (!Directory.Exists(path + "\\DAL"))
            {
                Directory.CreateDirectory(path + "\\DAL");
            }
            SaveFile(path + "\\DAL\\", DALSuffix, dicD);

            //save BLL
            Dictionary <string, string> dicB = Bc.Create(LstTbName, cd);

            if (!Directory.Exists(path + "\\BLL"))
            {
                Directory.CreateDirectory(path + "\\BLL");
            }
            SaveFile(path + "\\BLL\\", BLLSuffix, dicB);
        }