Beispiel #1
0
        //-------------------------------------------------------------------------------------- CSS & HTML --
        public new static string GetCssTree()
        {
            string rtn = "";

            rtn += ColumnsRow_TypeSelector.GetCssTree();
            rtn += GetCssRoot();
            return(rtn);
        }
Beispiel #2
0
        //----------------------------------------------------------------------------------------------------
        public void Instantiate_Sub()
        {
            this.jRoot = J("<li class='ColumnsRow jRoot'>");
            this.jRoot.append(this.GetHtmlRoot());
            var tmpJRoot = this.jRoot;
            var thisObj  = this;

            eval("tmpJRoot[0].UIObject = thisObj;");

            this.Original_ColumnValues = Column.Clone(this.Model);

            if (this.ViewModel.IsCreateNew)
            {
                jF2(".PK_CheckBox").show();
                jF2(".Txt_ColumnPosition").val(this.Model.OrdinalPosition.As <string>());
                jF2(".Txt_ColumnName").val("");
                jF2(".Txt_DataType").val("");
                jF2(".Txt_DefaultValue").val("");
            }
            else
            {
                if (this.Model.IsPrimaryKey)
                {
                    jF2(".PK_Selected").show();
                }
                else
                {
                    jF2(".PK_Empty").show();
                }

                this.AllowNulls_Property   = this.Model.AllowNulls;
                this.DefaultValue_Property = this.Model.DefaultValue;

                string str_FK_Counts = this.IfHas_ForeignKey_ReturnCounts();
                if (str_FK_Counts != null)
                {
                    jF2(".FK_Icon").show().attr("title", str_FK_Counts);
                }

                string str_IX_Counts = this.IfHas_Index_ReturnCount();
                if (str_IX_Counts != null)
                {
                    jF2(".IX_Icon").show().attr("title", str_IX_Counts);
                }
            }

            this.TypeSelector           = new ColumnsRow_TypeSelector();
            this.TypeSelector.ViewModel = this.ViewModel;
            this.TypeSelector.Instantiate();
            this.TypeSelector.OnChange.After.AddHandler(this, "TypeSelector_OnChange", 0);
            this.TypeSelector.Close();
            jF(".Holder_TypeSelector").append(this.TypeSelector.jRoot);


            this.BindUI();
        }