private void UpdateXml(TableListSchema tableListSchema) { XmlNode businessNode = this._CodeConfigHelper.GetBusinessNode(this._BusinessNodeInfo.TableName); if (businessNode == null) { MessageBox.Show(this._BusinessNodeInfo.TableName + "表未配置,请一键生成配置文件!"); } else { XmlElement xmlElement = (XmlElement)businessNode; if (xmlElement.ReadAttribute("UIProjectName", "") != this.txtUIProjectName.Text || xmlElement.ReadAttribute("UIProjectPath", "") != this.txtUIProjectPath.Text || xmlElement.ReadAttribute("ModuleID", "") != this.txtModuleID.Text || xmlElement.ReadAttribute("EditUrl", "") != this.txtEditUrl.Text) { xmlElement.SetAttribute("UIProjectName", this.txtUIProjectName.Text); xmlElement.SetAttribute("UIProjectPath", this.txtUIProjectPath.Text); xmlElement.SetAttribute("ModuleID", this.txtModuleID.Text); xmlElement.SetAttribute("EditUrl", this.txtEditUrl.Text); this._CodeConfigHelper.Save(); } } }
private void btnLoadColumn_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.txtModuleID.Text)) { MessageBox.Show("请输入模块标识"); } else { string schemaName = ""; string connectionString = this._CodeConfigHelper.GetConnectionString(this._BusinessNodeInfo.ConnectionKey, out schemaName); this._TableListSchema = SqlSchemaHelper.GetTableListSchema(schemaName, this._BusinessNodeInfo.TableName, this.txtModuleID.Text, this.txtEditUrl.Text, connectionString, this._CodeConfigHelper, this._SelectFileInfo.WTFConfigPath); this.gvdCommand.AutoGenerateColumns = false; this.gvdCommand.DataSource = (from s in this._TableListSchema.Commands orderby s.SortIndex select s).ToList <CommandSchema>(); this.gvdTableCols.AutoGenerateColumns = false; this.gvdTableCols.DataSource = (from s in this._TableListSchema.Columns where !s.FieldName.ToLower().Contains("guid") select s).ToList <ColumnListSchema>(); } }