예제 #1
0
        private void CreateBll(DataRow dr, DataTable dataTable)
        {
            string modelPath = Application.StartupPath + "\\" + databasename + "\\" + tboxNamepase.Text.Trim() + ".Bll";

            if (!Directory.Exists(modelPath))
            {
                Directory.CreateDirectory(modelPath);
            }
            CsGenerator.CreateBllClass(dataTable, dr["tablemark"].ToString(), modelPath + "\\", tboxNamepase.Text.Trim());
        }
예제 #2
0
        private void CreateDal(DataRow dr, DataTable dataTable)
        {
            string modelPath = Application.StartupPath + "\\" + databasename + "\\" + tboxNamepase.Text.Trim() + ".Dal";

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

            string    selectSqlFiels = "Select a.[name],b.name as name2 From syscolumns a,systypes b Where a.xtype=b.xtype AND b.[name]<>'sysname' AND a.id=object_id('{0}')";
            DataTable dtField        = getDatable(string.Format(selectSqlFiels, dataTable.TableName));

            CsGenerator.CreateDalClass(dataTable, dr["tablemark"].ToString(), dr["tablekey"].ToString(), modelPath + "\\", dtField, tboxNamepase.Text.Trim());
        }