Exemple #1
0
        public static string GetControlJsonName(string aControlClass)
        {
            string v = string.Empty;
            List <SqlParameter> param = new List <SqlParameter>();

            param.Add(new SqlParameter("@ControlClass", aControlClass));

            string query = "SELECT [JsonName] FROM [ControlsClasses] WHERE [ControlClass] = @ControlClass";

            if (SQLServerManagement.ExecuteReader(query, param) != null)
            {
                while (SQLServerManagement.Read())
                {
                    v = SQLServerManagement.GetValue <string>("JsonName");
                }
            }
            SQLServerManagement.ReaderClose();

            return(v);
        }
        public static string GetParentTableName(string aTable)
        {
            string v = string.Empty;
            List <SqlParameter> param = new List <SqlParameter>();

            param.Add(new SqlParameter("@Table", aTable));

            string query = "SELECT [ParentTableName] FROM [Tables] WHERE [TableName] = @Table";

            if (SQLServerManagement.ExecuteReader(query, param) != null)
            {
                while (SQLServerManagement.Read())
                {
                    v = SQLServerManagement.GetValue <string>("ParentTableName");
                }
            }
            SQLServerManagement.ReaderClose();

            return(v);
        }
        public static bool exist(string IDC)
        {
            string v = string.Empty;
            List <SqlParameter> param = new List <SqlParameter>();

            param.Add(new SqlParameter("@IDC", IDC));

            string query = "SELECT [IDC] FROM [Label] WHERE [IDC] = @IDC";

            if (SQLServerManagement.ExecuteReader(query, param) != null)
            {
                while (SQLServerManagement.Read())
                {
                    v = SQLServerManagement.GetValue <string>("IDC");
                }
            }
            SQLServerManagement.ReaderClose();

            return(v == IDC);
        }
Exemple #4
0
        public static _CONTROL GetValue()
        {
            _CONTROL cl = new _CONTROL();

            cl._module          = SQLServerManagement.GetValue <string>("Module");
            cl._filename        = SQLServerManagement.GetValue <string>("Filename");
            cl._class           = SQLServerManagement.GetValue <string>("Class");
            cl._idc             = SQLServerManagement.GetValue <string>("IDC");
            cl._generatejson    = SQLServerManagement.GetValue <bool>("GenerateJson");
            cl._classidd        = SQLServerManagement.GetValue <string>("ClassIDD");
            cl._tiletext        = SQLServerManagement.GetValue <string>("TileText");
            cl._tilesize        = SQLServerManagement.GetValue <string>("TileSize");
            cl._tilestyle       = SQLServerManagement.GetValue <int>("TileStyle");
            cl._bodyeditidc     = SQLServerManagement.GetValue <string>("BodyEditIDC");
            cl._bodyedittext    = SQLServerManagement.GetValue <string>("BodyEditText");
            cl._namespace       = SQLServerManagement.GetValue <string>("Namespace");
            cl._dbtpointer      = SQLServerManagement.GetValue <string>("DBTPointer");
            cl._dbtnamespace    = SQLServerManagement.GetValue <string>("DBTNamespace");
            cl._recordpointer   = SQLServerManagement.GetValue <string>("RecordPointer");
            cl._recordclass     = SQLServerManagement.GetValue <string>("RecordClass");
            cl._field           = SQLServerManagement.GetValue <string>("Field");
            cl._fieldnamespace  = SQLServerManagement.GetValue <string>("FieldNamespace");
            cl._text            = SQLServerManagement.GetValue <string>("Text");
            cl._combotype       = SQLServerManagement.GetValue <string>("ComboType");
            cl._runtimeclass    = SQLServerManagement.GetValue <string>("RuntimeClass");
            cl._hkl             = SQLServerManagement.GetValue <string>("HotKeyLink");
            cl._button          = SQLServerManagement.GetValue <string>("Button");
            cl._isaddlink       = SQLServerManagement.GetValue <bool>("IsAddLink");
            cl._order           = SQLServerManagement.GetValue <string>("Order");
            cl._hidden          = SQLServerManagement.GetValue <bool>("Hidden");
            cl._noChange_Grayed = SQLServerManagement.GetValue <bool>("NoChange_Grayed");
            cl._grayed          = SQLServerManagement.GetValue <bool>("Grayed");
            cl._minValue        = SQLServerManagement.GetValue <string> ("MinValue");
            cl._maxValue        = SQLServerManagement.GetValue <string> ("MaxValue");
            cl._chars           = SQLServerManagement.GetValue <string>    ("Chars");
            cl._rows            = SQLServerManagement.GetValue <string>     ("Rows");

            return(cl);
        }