Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            string objectName = this.txtObjectName.Text;

            if (string.IsNullOrWhiteSpace(objectName))
            {
                MessageBox.Show("Please input the object name.");
                return;
            }
            Dictionary <string, Field> fields = new Dictionary <string, Field>();

            foreach (var item in this._fields.Keys.OrderBy(x => x).ToList())
            {
                fields.Add(item, this._fields[item]);
            }

            if (fields.Count > 0)
            {
                TemplateMgr.Save(fields, objectName);
            }
        }
Ejemplo n.º 2
0
        private void btnLoadColumns_Click(object sender, EventArgs e)
        {
            string objectName = this.txtObjectName.Text;

            if (string.IsNullOrWhiteSpace(objectName))
            {
                MessageBox.Show("Please input the object name.");
                return;
            }

            this._fields = TemplateMgr.LoadFieldsByObject(objectName);

            if (this._fields.Count > 0)
            {
                this.Display();
            }
            else
            {
                MessageBox.Show("The object schema not exist. Will create it.");
            }
        }