`

系统代码生成工具源码

阅读更多

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;

namespace Tools
{
    public partial class FormHome : Form
    {
        protected int num = 0;
        protected int i = 0;
        private string filepath = "";
        private string model = "";
        protected string data = "abcdefghi";
        public FormHome()
        {
            InitializeComponent();
            this.noAuto.Visible = true;
        }
        public DataTable GetTable(string sql)
        {
            DataSet ds = new DataSet();
            try
            {
                SqlConnection conn = new SqlConnection();
                conn.ConnectionString = "initial catalog=" + this.tbdata.Text.TrimEnd().ToString() + ";data source=.\\sqlserver2005;user id=" + this.tbuser.Text.TrimEnd() + ";password=" + this.tbpass.Text.TrimEnd();
                SqlCommand cmd = new SqlCommand();
                cmd.Connection = conn;
                cmd.CommandText = sql;
                SqlDataAdapter da = new SqlDataAdapter();
                da.SelectCommand = cmd;

                da.Fill(ds);

            }
            catch (Exception ex)
            {

                MessageBox.Show(ex.Message);
            }
            return ds.Tables[0];
        }

        private void BtChange_Click(object sender, EventArgs e)
        {
            StringBuilder tempChangeData = new StringBuilder();
            string tempBeforeData = this.RtbBefore.Text;
            string[] tempLines = tempBeforeData.Split('\n');
            string[] tempSingleLine = null;
            foreach (string temp in tempLines)
            {            
                    tempSingleLine = temp.Split('=');
                     if (tempSingleLine.Length==2)
                    tempChangeData.AppendFormat("{0}={1};\n", tempSingleLine[1].Replace(";", ""), tempSingleLine[0].TrimStart().TrimEnd());            
              
            }
            this.RtbAfter.Text = tempChangeData.ToString();
        }

        private void BtClear_Click(object sender, EventArgs e)
        {
            foreach (Control control in this.TpChange.Controls)
            {
                if (control.GetType().ToString() == "System.Windows.Forms.RichTextBox")
                {
                    ((System.Windows.Forms.RichTextBox)control).Text = "";
                }
            }
        }

        private void BtDataCodeMake_Click(object sender, EventArgs e)
        {
            DataTable dt = this.GetTable("select * from sysobjects where xtype in('u','v') order by status desc");
            for (int i = 0; i < dt.Rows.Count - 1; i++)
            {
                string tableBean = Convert.ToString(dt.Rows[i]["name"] ?? "").ToUpper();
                tableBean = tableBean.Length > 1 ? (tableBean.Substring(0, 1).ToUpper() + tableBean.Substring(1).ToLower()) : (tableBean.ToUpper());
                DataTable dtt = this.GetTable("select * from [" + Convert.ToString(dt.Rows[i]["name"]) + "]");
                System.Text.StringBuilder sbshu = new StringBuilder("using System;").Append(System.Environment.NewLine).Append("using System.Collections.Generic;").Append(System.Environment.NewLine).Append("using System.Text;").Append(System.Environment.NewLine).Append("using System.Data;").Append(Environment.NewLine).Append("using System.Data.SqlClient;").Append(System.Environment.NewLine).Append("").Append(System.Environment.NewLine).Append("namespace ").Append(this.tbNamespace.Text.Trim()).Append(System.Environment.NewLine).Append("{").Append(System.Environment.NewLine);

                System.Text.StringBuilder sbset = new StringBuilder("");

                System.Text.StringBuilder sbbean = new StringBuilder("public " + tableBean + " SelectById(){" + System.Environment.NewLine + tableBean + "  " + tableBean.ToLower().ToString() + " = new " + tableBean + "();" + System.Environment.NewLine + "");
                sbbean.Append("string sql = \"select * from " + tableBean + " where " + dtt.Columns[0].ColumnName.ToString() + "=@" + dtt.Columns[0].ColumnName.ToString() + "\";").Append(Environment.NewLine);
                sbbean.Append("SqlParameter[] pas = {new SqlParameter(\"").Append("@").Append(dtt.Columns[0].ColumnName.ToString()).Append("\"").Append(",").Append(dtt.Columns[0].ColumnName.ToString()).Append(")};").Append(Environment.NewLine);
                sbbean.Append("DataTable dt = db.GetTable(sql,pas);").Append(Environment.NewLine);
                sbbean.Append("  if(dt.Rows.Count>0)").Append(Environment.NewLine).Append("    {").Append(Environment.NewLine);
                //sql前半部分

                StringBuilder sbpas = new StringBuilder("SqlParameter[] pas = {");
                StringBuilder sbadd = new StringBuilder("public bool Add()");
                sbadd.Append("{");
                sbadd.Append(Environment.NewLine);
                sbshu.Append(Environment.NewLine);
                sbshu.Append("public class ");
                sbshu.Append(tableBean);
                sbshu.Append("{");
                sbshu.Append(Environment.NewLine);

                System.Text.StringBuilder sbsqlbefore = new StringBuilder("insert into ").Append(tableBean).Append("(");
                System.Text.StringBuilder sbsqlafter = new StringBuilder(" values(");
                StringBuilder sbupd = new StringBuilder("public bool Update()" + Environment.NewLine + "{" + Environment.NewLine + "string sql =\"update ").Append(tableBean).Append(" set ");
                StringBuilder sbdel = new StringBuilder("public bool Delete()").Append(Environment.NewLine).Append("{").Append("string sql = \"delete ").Append(tableBean).Append(" where ").Append("[").Append(dtt.Columns[0].ColumnName.ToString()).Append("]").Append("=").Append("@").Append(dtt.Columns[0].ColumnName.ToString()).Append("\";").Append(Environment.NewLine);
                StringBuilder sbdelpas = new StringBuilder("SqlParameter[] pas = {");
                StringBuilder sbsel = new StringBuilder("public DataTable Select()").Append(Environment.NewLine).Append("{").Append(Environment.NewLine).Append("DataTable dt = db.GetTable(\"select * from ").Append(tableBean).Append("\")??new DataTable();").Append(Environment.NewLine).Append("return dt;").Append(Environment.NewLine).Append("}");
                //循环字段
                for (int j = 0; j < dtt.Columns.Count; j++)
                {
                    sbshu.Append("private string _" + dtt.Columns[j].ColumnName.ToString() + ";" + System.Environment.NewLine);
                    sbset.Append("public string " + dtt.Columns[j].ColumnName.ToString() + "{set{this._" + dtt.Columns[j].ColumnName.ToString() + "=value;}get{return this._" + dtt.Columns[j].ColumnName.ToString() + ";}}" + System.Environment.NewLine);
                    sbbean.Append("      ").Append(tableBean.ToLower().ToString() + "." + dtt.Columns[j].ColumnName.ToString() + "=Convert.ToString(dt.Rows[0][\"" + dtt.Columns[j].ColumnName.ToString() + "\"]);").Append(System.Environment.NewLine);
                    if (j != 0)
                    {
                        sbsqlbefore.Append(",");
                        sbsqlafter.Append(",");
                    }
                    ///添加
                    sbsqlbefore.Append("[").Append(dtt.Columns[j].ColumnName.ToString()).Append("]");
                    sbsqlafter.Append("@" + dtt.Columns[j].ColumnName.ToString());
                    sbpas.Append("new SqlParameter(\"");
                    sbpas.Append("@");
                    sbpas.Append(dtt.Columns[j].ColumnName.ToString());
                    sbpas.Append("\",");
                    sbpas.Append(dtt.Columns[j].ColumnName.ToString());
                    sbpas.Append(")");
                    if (j < dtt.Columns.Count - 1)
                    {
                        sbpas.Append(",");
                    }
                    ///修改
                    if (j != 0)
                    {
                        sbupd.Append("[").Append(dtt.Columns[j].ColumnName.ToString()).Append("]").Append("=");
                        sbupd.Append("@");
                        sbupd.Append(dtt.Columns[j].ColumnName.ToString());
                        if (j < dtt.Columns.Count - 1)
                        {
                            sbupd.Append(",");
                        }
                    }


                }
                sbpas.Append("};");
                sbsqlbefore.Append(")");
                sbsqlafter.Append(")");
                ///循环字段
                sbadd.Append("string sql = \"").Append(sbsqlbefore.ToString()).Append(sbsqlafter.ToString()).Append("\"").Append(";").Append(Environment.NewLine);
                sbadd.Append(sbpas.ToString()).Append(Environment.NewLine);
                sbadd.Append("return db.GetState(sql,pas);").Append(Environment.NewLine);
                sbadd.Append("}").Append(Environment.NewLine);
                //添加结束
                ///修改
                sbupd.Append(" where ");
                sbupd.Append(dtt.Columns[0].ColumnName.ToString());
                sbupd.Append("=");
                sbupd.Append("@");
                sbupd.Append(dtt.Columns[0].ColumnName.ToString()).Append("\";").Append(Environment.NewLine);
                sbupd.Append(sbpas).Append(Environment.NewLine);
                sbupd.Append("return db.GetState(sql,pas);").Append(Environment.NewLine);
                sbupd.Append("}").Append(Environment.NewLine);
                ///删除
                sbdelpas.Append("new SqlParameter(\"").Append("@").Append(dtt.Columns[0].ColumnName.ToString()).Append("\"").Append(",").Append(dtt.Columns[0].ColumnName.ToString()).Append(")};");
                sbdel.Append(sbdelpas.ToString()).Append(Environment.NewLine);
                sbdel.Append("return db.GetState(sql,pas);").Append(Environment.NewLine).Append("}");
                //查询


                sbshu.Append(sbset.ToString()).Append(System.Environment.NewLine).Append("DbAccess db = new DbAccess();").Append(Environment.NewLine).Append(sbadd.ToString()).Append(Environment.NewLine).Append(sbupd.ToString()).Append(Environment.NewLine).Append(sbdel.ToString()).Append(Environment.NewLine).Append(sbsel.ToString()).Append(Environment.NewLine).Append("//查询").Append(System.Environment.NewLine).Append(sbbean.Append(System.Environment.NewLine).Append("    }").Append(Environment.NewLine).Append("return " + tableBean.ToLower().ToString() + ";" + System.Environment.NewLine + "}").ToString());
                ///
                sbshu.Append(System.Environment.NewLine);

                sbshu.Append(System.Environment.NewLine).Append("}").Append(System.Environment.NewLine).Append("}");
                this.RtbCodes.Text = sbshu.ToString();
                using (System.IO.StreamWriter sw = new System.IO.StreamWriter(this.filepath + "\\" + tableBean + ".cs", false, System.Text.Encoding.GetEncoding("gb2312")))
                {
                    sw.Write(sbshu.ToString());
                    sw.Flush();
                }
                this.RtbCodes.Text = sbshu.ToString();

            }
        }

        private void BtBrower_Click(object sender, EventArgs e)
        {
            this.FbdFileBrower.ShowDialog();
            this.filepath = this.FbdFileBrower.SelectedPath.ToString();
            this.model = this.filepath.Substring(this.filepath.LastIndexOf("\\") + 1);
        }

        private void BtResultChange_Click(object sender, EventArgs e)
        {
            ColumnUpdate("<asp:TextBox ID=\"Tb{0}\" runat=\"server\" Width=\"298px\"></asp:TextBox>\n");
        }

        private void BtUpdateColumn_Click(object sender, EventArgs e)
        {
            ColumnUpdate("Tb{0}.Text = "+this.TbTempName.Text+".{0};\n");
        }
        public void ColumnUpdate(string model)
        {
            StringBuilder tempChangeData = new StringBuilder();
            string tempBeforeData = this.RtbColumns.Text;
            string[] tempLines = tempBeforeData.Split(',');
            string[] tempSingleLine = null;
            foreach (string temp in tempLines)
            {
                tempChangeData.AppendFormat(model, temp.Replace("[", "").Replace("]", ""));


            }
            this.RtbColumnsResult.Text = tempChangeData.ToString();
        }

        private void BtOpenFiles_Click(object sender, EventArgs e)
        {
            DirsOpen(this.FbdFilesHtml.SelectedPath);
        }
        public void DirsOpen(string Path)
        {
         
            System.IO.DirectoryInfo dirs = new System.IO.DirectoryInfo(Path);
            foreach (FileInfo fi in dirs.GetFiles("*.htm"))
            {

                Process.Start("IExplore.exe", fi.FullName);
            }
          
            if (dirs.GetDirectories().Length > 0)
            {
                foreach (DirectoryInfo di in dirs.GetDirectories())
                {
                    Dirs(di.FullName);
                }
            }
        }

        private void BtOpen_Click(object sender, EventArgs e)
        {
            this.FbdFilesHtml.ShowDialog();
        }

        private void BtChangeHtml_Click(object sender, EventArgs e)
        {

        }

        private void BtHtmlJs_Click(object sender, EventArgs e)
        {
            StringBuilder tempChangeData = new StringBuilder();
            string tempBeforeData = this.RtbColumns.Text;
            string[] tempLines = tempBeforeData.Split('\n');
            string[] tempSingleLine = null;
            foreach (string temp in tempLines)
            {
                tempChangeData.Append(temp.Replace("\"","'"));
              }
            this.RtbColumnsResult.Text = "document.Write(\""+tempChangeData.ToString()+"\");";
        }

        private void BtSelectFile_Click(object sender, EventArgs e)
        {
            this.OpSelectFile.ShowDialog();
        }

        private void BtOp_Click(object sender, EventArgs e)
        {
            string path = this.OpSelectFile.FileName;
            string content = this.ReadData(path,System.Text.Encoding.GetEncoding("GB2312"));
            this.RtbOpmizationCode.Text = System.Text.RegularExpressions.Regex.Replace(System.Text.RegularExpressions.Regex.Replace(System.Text.RegularExpressions.Regex.Replace(System.Text.RegularExpressions.Regex.Replace(content, ">[\r\t\n ]*", ">"),"[\r\n\t ]*<","<",System.Text.RegularExpressions.RegexOptions.Multiline),">[ ]*<","><"),"[\r\n\t]*","");

           

        }
        /// <summary>
        /// 写文件数据
        /// </summary>
        /// <param name="path"></param>
        /// <param name="content"></param>
        /// <param name="encoding"></param>
        /// <param name="append"></param>
        /// <returns></returns>
        public bool WriteData(string path, string content, System.Text.Encoding encoding,bool append)
        {
            bool state = false;
            try
            {
                using (System.IO.StreamWriter sw = new StreamWriter(path, append, encoding))
                {
                sw.Write(content);
                sw.Flush();
                }
            state = true;
            }
            catch
            {
               
         
            }
            return state;
          
        }
        /// <summary>
        /// 读数据
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public string ReadData(string path,System.Text.Encoding encoding)
        {
            string content = "";
            using (System.IO.StreamReader sr = new StreamReader(path, encoding))
            {
                content = sr.ReadToEnd();
            }
            return content;
        }

        private void BtSave_Click(object sender, EventArgs e)
        {
            string path = this.OpSelectFile.FileName;
            this.WriteData(path,this.RtbOpmizationCode.Text,System.Text.Encoding.GetEncoding("Gb2312"),false);
        }

        private void BtTimer_Click(object sender, EventArgs e)
        {
            TimeStart.Interval = 1200;
            if (this.TimeStart.Enabled)
            {
                this.TimeStart.Stop();
            }
            else
            {
                this.TimeStart.Start();
            }
        }

        private void TimeStart_Tick(object sender, EventArgs e)
        {
            string path = this.FbdFileBrower.SelectedPath;
            num++;
            this.LabNum.Text = num.ToString();
            Application.DoEvents();
            //首页
            string tempGroupData = GetHttpData("http://www.domain.com/index.aspx");
            using (StreamWriter sw = new StreamWriter(path + "/Index.html", false, System.Text.Encoding.GetEncoding("utf-8")))
            {
                sw.Write(tempGroupData);
                sw.Flush();
            }
            //产业群首页
            tempGroupData = GetHttpData("http://www.domain.com/Group/index.aspx");
            if (!Directory.Exists(path + "\\Group"))
            {
                Directory.CreateDirectory(path + "\\Group");
            }
            using (StreamWriter sw = new StreamWriter(path + "/Group\\Index.html", false, System.Text.Encoding.GetEncoding("utf-8")))
            {
                sw.Write(tempGroupData);
                sw.Flush();
            }
            TimeStart.Interval = 24 * 60 * 60*1000;
        }
        public string GetHttpData(string sUrl)
        {
            string sRslt = null;
            WebResponse oWebRps = null;
            WebRequest oWebRqst = WebRequest.Create(sUrl);
            oWebRqst.Timeout = 50000;
            try
            {
                oWebRps = oWebRqst.GetResponse();
            }

            finally
            {
                if (oWebRps != null)
                {
                    StreamReader oStreamRd = new StreamReader(oWebRps.GetResponseStream(), System.Text.Encoding.GetEncoding("utf-8"));
                    sRslt = oStreamRd.ReadToEnd();
                    oStreamRd.Close();
                    oWebRps.Close();
                }
            }
            return sRslt;
        }

        private void BtWebSite_Click(object sender, EventArgs e)
        {
            this.FbdFileBrower.ShowDialog();
        }

        private void FormHome_Load(object sender, EventArgs e)
        {

        }

        private void FormHome_ResizeBegin(object sender, EventArgs e)
        {
         //   MessageBox.Show(this.WindowState.ToString());
        }

        private void FormHome_ResizeEnd(object sender, EventArgs e)
        {
            //if (this.WindowState == FormWindowState.Minimized)
            //{
            //  //  this.noAuto.Visible = true;
            //   // this.Hide();
            //    this.Visible = true;
            //}
            //else
            //{
 
            //}
            //MessageBox.Show(this.WindowState.ToString());

        }

 

        #region 还原窗体

        private void normalForm()
        {
            this.Visible = true;
            this.WindowState=FormWindowState.Normal;
        }
        #endregion

 
        private void minForm()
        {
            WindowState = FormWindowState.Minimized;
            this.Visible = false;
            this.noAuto.Visible = true;
        }

        private void noAuto_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (this.WindowState == FormWindowState.Minimized || this.Visible == false)
            {
                this.normalForm();
            }
            else
            {
                minForm();
            }
        }

        private void FormHome_Resize(object sender, EventArgs e)
        {
            if (this.WindowState == FormWindowState.Minimized)
            {
                this.Visible = false;
            }
         
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Dirs(this.FbdAllFiles.SelectedPath);
            //MessageBox.Show(this.richTextBox1.Text.Length.ToString());
        }

        private void BtObserve_Click(object sender, EventArgs e)
        {
            string tempUrl = this.TbUrl.Text.Trim();
            string tempType = this.CbType.Text.Trim();
            tempType= tempType.Length > 0 ? (tempType) : ("gb2312");
            this.RtbContent.Text = this.GetHttpData(tempUrl, tempType);

        }
        public string GetHttpData(string sUrl,string encoding)
        {
            string sRslt = null;
            WebResponse oWebRps = null;
            WebRequest oWebRqst = WebRequest.Create(sUrl);
            oWebRqst.Timeout = 50000;
            try
            {
                oWebRps = oWebRqst.GetResponse();
            }

            finally
            {
                if (oWebRps != null)
                {
                    StreamReader oStreamRd = new StreamReader(oWebRps.GetResponseStream(), System.Text.Encoding.GetEncoding(encoding));
                    sRslt = oStreamRd.ReadToEnd();
                    oStreamRd.Close();
                    oWebRps.Close();
                }
            }
            return sRslt;
        }
        //public void Dirs(string Path)
        //{

        //    System.IO.DirectoryInfo dirs = new System.IO.DirectoryInfo(Path);
        //    foreach (FileInfo fi in dirs.GetFiles("*.htm"))
        //    {

        //        Process.Start("IExplore.exe", fi.FullName);
        //    }

        //    if (dirs.GetDirectories().Length > 0)
        //    {
        //        foreach (DirectoryInfo di in dirs.GetDirectories())
        //        {
        //            Dirs(di.FullName);
        //        }
        //    }
        //}


        private void BtBrowerFiles_Click(object sender, EventArgs e)
        {
            this.FbdAllFiles.ShowDialog();
        }

        private void BtSearch_Click(object sender, EventArgs e)
        {
            //百度一下,找到相关网页约384,000篇
             string tempUrl = this.TbUrl.Text.Trim();
            string tempType = this.CbType.Text.Trim();
            tempType= tempType.Length > 0 ? (tempType) : ("gb2312");
           // this.RtbContent.Text = this.GetHttpData(tempUrl, tempType);
           Match mat = Regex.Match(GetHttpData(tempUrl, tempType), "百度一下,找到相关网页约(?<ResultCount>.*)篇", System.Text.RegularExpressions.RegexOptions.IgnoreCase | System.Text.RegularExpressions.RegexOptions.Multiline);
           MessageBox.Show(mat.Groups["ResultCount"].Value);

        }

        private void button2_Click(object sender, EventArgs e)
        {
            //百度一下,找到相关网页约384,000篇
            string tempUrl = this.TbUrl.Text.Trim();
            string tempType = this.CbType.Text.Trim();
            tempType = tempType.Length > 0 ? (tempType) : ("gb2312");
            Match mat = Regex.Match(GetHttpData(tempUrl, tempType), "has a  traffic rank of:(?<ResultCount>.*)<!--", System.Text.RegularExpressions.RegexOptions.IgnoreCase );
            MessageBox.Show(Regex.Replace(mat.Groups["ResultCount"].Value,"<[^>]*>",""));
        }
        public void Dirs(string path)
        {
            DirectoryInfo dis = new DirectoryInfo(path);
            FileInfo[] files = dis.GetFiles();
            foreach (FileInfo fi in files)
            {
                i++;
                Application.DoEvents();
                this.labCount.Text = i.ToString();
                try
                {
                    File.Delete(fi.FullName);
                }
                catch (Exception ex)
                {
                    this.rtbMessage.Text += ex.Message;

                }

                //  GetSqlFile(fi.FullName, this.textBox1.Text + fi.DirectoryName.Substring(2), fi.FullName.Substring(fi.FullName.LastIndexOf("\\") + 1), 1024, 768);
            }
            if (dis.GetDirectories().Length > 0)
            {
                for (int i = 0; i < dis.GetDirectories().Length; i++)
                {
                    Dirs(dis.GetDirectories()[i].FullName);
                }
            }


        }

        private void button6_Click(object sender, EventArgs e)
        {
            Dirs(this.textBox1.Text.Trim());
            Dirs(this.textBox2.Text.Trim());
            Dirs(this.textBox3.Text.Trim());
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.FbdSelectDeleteFile.ShowDialog();
            this.textBox1.Text = this.FbdSelectDeleteFile.SelectedPath.Trim();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            this.FbdSelectDeleteFile.ShowDialog();
            this.textBox2.Text = this.FbdSelectDeleteFile.SelectedPath.Trim();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            this.FbdSelectDeleteFile.ShowDialog();
            this.textBox3.Text = this.FbdSelectDeleteFile.SelectedPath.Trim();
        }

       


     
       
     
    }
}

分享到:
评论

相关推荐

    javaweb代码生成器源码

    这种源码生成器极大地提高了开发效率,减少了手动编写重复代码的工作量,尤其在项目初期或重构时更为实用。 在JavaWeb开发中,每个层级都有其特定的职责。服务层(services)主要负责业务逻辑,它是应用的核心部分...

    mybatis-plus最新代码生成器项目源码 :mybatis-plus-generator.zip

    mybatis-plus最新代码生成器项目源码 :mybatis-plus-generator.zip mybatis-plus最新代码生成器项目源码 :mybatis-plus-generator.zip mybatis-plus最新代码生成器项目源码 :mybatis-plus-generator.zip ...

    代码生成器(Asp.net(c#))源码

    《Asp.net(C#)代码生成器源码详解》 在软件开发过程中,代码生成器是一种提高效率的重要工具,尤其在Asp.net(C#)框架下,它能够自动生成大量基础代码,帮助开发者快速构建应用的骨架。本文将深入探讨Asp.net(C#)...

    代码生成器源码

    总之,代码生成器是提高开发效率的重要助手,而这个"代码生成器源码"的分享为开发者提供了学习和自定义代码生成逻辑的机会。通过深入研究和实践,开发者可以更好地理解代码生成器的工作机制,并将其应用到自己的项目...

    Net代码生成器源码

    【标题】"Net代码生成器源码"是一个用于.NET平台的工具,主要用于自动化生成SQL数据库相关的C#代码,显著提高开发效率。这类工具通常能够解析数据库结构,自动生成与数据库表对应的实体类、数据访问层(DAL)、业务...

    C#代码生成器源码.rar

    《C#代码生成器源码解析与应用》 在IT行业中,提高开发效率是至关重要的。C#代码生成器正是为了这一目标而设计的工具,它可以帮助开发者自动生成常见的编程元素,如实体类、数据库操作类、业务逻辑类以及存储过程,...

    动软代码生成器的开源源码

    1. **架构设计**:通过阅读源码,我们可以了解该生成器的系统架构,包括模块划分、类与类之间的关系,以及如何组织代码来实现功能。这有助于我们学习优秀的软件设计原则和模式。 2. **算法与数据结构**:代码生成...

    动软代码生成器源码.zip

    "动软代码生成器源码.zip" 是一个包含动软代码生成器—— Codematic2 Src 的源代码包。这个工具是IT开发中的一个重要辅助软件,主要用于自动化代码编写工作,节省开发者的时间并提高效率。源码的提供使得用户可以...

    《C#代码生成器源码》

    《C#代码生成器源码》是一个非常实用的工具,主要针对C#编程语言,用于自动化生成常见的代码结构,如实体类、数据访问类以及数据库文档。这个工具极大地提高了开发效率,减少了程序员手动编写重复性代码的时间,使...

    动软.Net代码生成器源码

    7. **学习与研究**:对于学习.NET开发的人来说,研究这样的代码生成器源码可以深入了解代码生成的原理,提高对.NET框架的理解,并可能启发自定义开发工具的想法。 8. **二次开发**:对于企业或团队来说,获取源码...

    win10动软代码生成器源码及EXE

    win10动软代码生成器源码及EXE 源码及直接运行包。 源码可以通过visual studio2008运行,增加了支持sql server2019。(原来支持sql server2000 2005 2008 oracle mysql 未测试)

    动软代码生成器v2.78源码+软件.rar

    动软代码生成器 软件版本: 2.78 最后更新: 2013/3/12 软件大小: 8 MB 软件性质: 简体中文/免费软件 运行环境: .Net 2.0 软件描述: 1.完善数据库加载的用户体验。 2.完善代码生成的逻辑和bug。 3....

    C#代码生成器(源码)

    4. **设计模式**:代码生成通常涉及设计模式,如工厂模式、策略模式等,理解这些模式可以帮助你更好地组织代码生成器的架构。 通过深入学习和实践,你可以将这个C#代码生成器定制为适合你项目需求的工具,无论是...

    动软代码生成器2.5附带源码

    动软代码生成器2.5是一款基于.NET平台的高效代码生成工具,它旨在帮助开发者快速生成高质量的源代码,减轻重复劳动,提高开发效率。这款工具的特色在于其附带的源码,使得用户不仅可以直接使用生成器,还可以根据...

    asp.net 代码生成器 .NET代码生成器 C#代码生成器 三层源代码生成器

    asp.net 代码生成器 【基本说明】 1、能够生成三层模式操作的所有后台代码,简单的SQL Server 2005数据库操作。 2、生成的代码包括了 MODEL、BLL、DAL、DBHelper、Config 生成的代码内有详细注释可提供参考。 ...

    javaweb代码生成工具源码

    这是一款代码生成工具,可自定义模板生成不同的代码,支持MySQL、Oracle、SQL Server、PostgreSQL。 只需要一个Java8环境,下载后即可运行使用。 步骤简单,只需配置一个数据源,然后勾选模板即可生成代码。 默认...

    rapid-generator代码生成器源码

    rapid-generator代码生成器源码

    动软代码生成器源码

    【动软代码生成器源码】是一款用于加速C#系统开发的工具,它通过自动生成代码来减少开发者的手动编写工作,从而提升开发效率。动软代码生成器的核心原理是根据预先设定的模板和规则,分析数据库结构或者设计模型,...

    SQL代码生成器源码

    在给定的“SQL代码生成器源码”中,我们可以探讨以下几个重要的知识点: 1. 数据库模式理解:生成SQL代码前,代码生成器需要解析数据库模式,包括表结构、字段类型、主键、外键和索引等信息。这涉及对SQL标准和各种...

    C#编写代码生成器源码

    C#编写代码生成器源码是针对C#编程语言的一种定制化解决方案,利用Visual Studio 2010进行开发。下面将详细介绍这个项目的核心知识点。 首先,我们要理解C#语言的基础。C#是一种面向对象的编程语言,由微软公司开发...

Global site tag (gtag.js) - Google Analytics