Records.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Text;
using System.Windows.Forms;

using CodeGen.Tool;

namespace DockPanelSample
{
    public partial class Records : WeifenLuo.WinFormsUI.Docking.DockContent
    {
        private int tableId = -1;

        private string tableName = "";
        public Records()
        {
            InitializeComponent();
        }

        public void setSource(string source)
        {
            this.txtInputArea.Text = source;
            GetCode();
        }

        public void SetTableID(int id)
        {
            this.tableId = id;
            GetCode();
        }

        private void GetCode()
        {

            DataRowView tableView = DataMarket.GetTableInfo(this.tableId);
            TableExpandDT table = new TableExpandDT(tableView);
            tableName = table.TableName;

            string sql = "select top 100 * from {0}  {1}";
            List<PKDT> pks = table.PKs;
            string order = table.GetOrderStr();
            sql = string.Format(sql, table.TableName, order);

            //CodeObject obj = Template.s_CodeObjects["tableinfo"];
            this.txtInputArea.Text = sql;
            this.dgList.DataSource = null;
            // this.txtDisplayArea.Text += this.txtInputArea.Text;
            //this.txtInputArea.

            ControlUtils.SetSQLColor(this.txtInputArea);
        }

        private void btnGetCode_Click(object sender, EventArgs e)
        {

            if (this.txtInputArea.Text.Trim() == "")
            {
后面还有 180 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。