private void btnSave_Click(object sender, EventArgs e)
        {
            _tableRepository.Settings = this.textEditorControl.Text.Trim();

            DBGlobalService.Save();
            DBGlobalService.FireClearError();
            var conn = ConnectionManager.Get(DBGlobalService.ConnectionString);

            conn.Parse_TableRepository(_tableRepository.Settings);

            ConnectionManager.Update(conn);
        }
Beispiel #2
0
        void frm_Save(SqlType sql, ref int hashcode)
        {
            //hashcode = this.GetHashCode();

            //比较名称是否重复
            foreach (var n in this.Parent.Children)
            {
                if (n.Name == sql.Name)
                {
                    if (hashcode != this.GetHashCode())
                    {
                        MessageBox.Show("名称不能重复");
                        return;
                    }
                }
            }

            DBGlobalService.Save();
        }
Beispiel #3
0
 void frm_Save(SqlType sql, ref int hashcode)
 {
     foreach (var child in this.Children)
     {
         if (child.Name == sql.Name)
         {
             if (hashcode != child.GetHashCode())
             {
                 MessageBox.Show("名称不能重复");
                 return;
             }
         }
     }
     if (hashcode == 0)
     {
         SqlNode sqlNode = new SqlNode();
         sqlNode.ConnectionString = this.ConnectionString;
         sqlNode.DataInfo         = sql;
         sqlNode.Parent           = this;
         hashcode = sqlNode.GetHashCode();
     }
     DBGlobalService.Save();
 }