예제 #1
0
        public List <Sobiens.Connectors.Entities.Folder> GetFolders(ISiteSetting siteSetting, Sobiens.Connectors.Entities.Folder parentFolder, int[] includedFolderTypes)
        {
            List <Sobiens.Connectors.Entities.Folder> subFolders = new List <Sobiens.Connectors.Entities.Folder>();

            if (parentFolder as Sobiens.Connectors.Entities.SQLServer.SQLServer != null)
            {
                Sobiens.Connectors.Entities.SQLServer.SQLServer sqlServer = (Sobiens.Connectors.Entities.SQLServer.SQLServer)parentFolder;
                try
                {
                    using (SqlConnection con = new SqlConnection(this.GetConnectionString(siteSetting, string.Empty)))
                    {
                        con.Open();

                        // Set up a command with the given query and associate
                        // this with the current connection.
                        using (SqlCommand cmd = new SqlCommand("SELECT name from sys.databases", con))
                        {
                            using (IDataReader dr = cmd.ExecuteReader())
                            {
                                while (dr.Read())
                                {
                                    string dbName = dr[0].ToString();
                                    if (dbName.Equals("master", StringComparison.InvariantCultureIgnoreCase) == false &&
                                        dbName.Equals("model", StringComparison.InvariantCultureIgnoreCase) == false &&
                                        dbName.Equals("tempdb", StringComparison.InvariantCultureIgnoreCase) == false &&
                                        dbName.Equals("msdb", StringComparison.InvariantCultureIgnoreCase) == false
                                        )
                                    {
                                        SQLDB list = new SQLDB(dbName, siteSetting.ID, dbName);
                                        subFolders.Add(list);
                                    }
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    string message = string.Format("SharePointService GetWebs method returned error:{0}", ex.Message);
                    Logger.Error(message, "Service");
                }
            }
            else if (parentFolder as SQLDB != null)
            {
                using (SqlConnection connection = new SqlConnection(this.GetConnectionString(siteSetting, parentFolder.Title)))
                {
                    connection.Open();
                    DataTable schema = connection.GetSchema("Tables");
                    foreach (DataRow row in schema.Rows)
                    {
                        string   tableName = row[2].ToString();
                        SQLTable table     = new SQLTable(tableName, siteSetting.ID, tableName, parentFolder.Title);

                        //table.ListName = parentFolder.Title;
                        subFolders.Add(table);
                    }
                }
            }
            return(subFolders);
        }
예제 #2
0
        public SelectView_Form(Form xParentForm, SQLTable xTbl, TableDockingFormXml xTableDockingFormXml, ViewXml CurrentViewXml, xml myXml,FormMode mode)
        {
            m_mode = mode;
            m_ParentForm = xParentForm;
            this.Owner = xParentForm;
            this.Icon = CodeTables.Properties.Resources.SelectViewIcon;
            m_xml = myXml;
            m_CurrentViewXml = CurrentViewXml;
            m_tbl = xTbl;
            m_TableDockingFormXml = xTableDockingFormXml;
            InitializeComponent();

            if (m_mode == FormMode.SELECT)
            {
                this.Text = lngRPM.s_SelectViewForTable.s + m_tbl.lngTableName.s;
                chkBoxSetAsDefault.Visible = true;
                this.btn_Select.Text = lngRPM.s_Select.s;
                this.btn_Cancel.Text = lngRPM.s_Cancel.s;
            }
            else
            {
                this.Text = lngRPM.s_DeleteViewForTable.s + m_tbl.lngTableName.s;
                chkBoxSetAsDefault.Visible = false;
                this.btn_Select.Text = lngRPM.s_Delete.s;
                this.btn_Cancel.Text = lngRPM.s_Close.s;
            }
            this.chkBoxSetAsDefault.Text = lngRPM.s_SelectAsDefaultView.s;
            lnlViewName.Text = lngRPM.s_SelectedView.s;
            foreach (ViewXml xViewXml in m_TableDockingFormXml.m_ViewXml)
            {
                this.rdblist_Views.Items.Add(xViewXml);
            }
        }
예제 #3
0
 // constructor;
 public void Define_SQL_Database_Tables(DBTableControl m_DBTables, DBSettings_TableClass.SQL_Database_Tables_Definition mt)
 {
     /* 1 */
     t_DBSettings = new SQLTable((Object)new DBSettings(), Column.Flags.FILTER_AND_UNIQUE, lngTName.lngt_DBSettings);
     t_DBSettings.AddColumn((Object)mt.m_DBSettings.ID, Column.nullTYPE.NOT_NULL, Column.Flags.UNIQUE, Column.eStyle.none, new string[] { "ID", "ID" });
     t_DBSettings.AddColumn((Object)mt.m_DBSettings.Name, Column.nullTYPE.NOT_NULL, Column.Flags.FILTER_AND_UNIQUE, Column.eStyle.TextBox_ReadOnly, new string[] { "Name", "Ime nastavitve" });
     t_DBSettings.AddColumn((Object)mt.m_DBSettings.TextValue, Column.nullTYPE.NOT_NULL, Column.Flags.FILTER_AND_UNIQUE, Column.eStyle.TextBox, new string[] { "Text value", "Vrednost" });
     m_DBTables.items.Add(t_DBSettings);
 }
예제 #4
0
        public bool CreateTable(SQLTable data)
        {
            try
            {
                StringBuilder tableQuery = new StringBuilder();
                tableQuery.AppendFormat("CREATE TABLE {0} (", data.TableName);

                if (data.Columns.Count == 0)
                {
                    return(false);
                }
                else
                {
                    int i = 0;
                    foreach (var column in data.Columns)
                    {
                        i++;
                        if (i == data.Columns.Count)
                        {
                            tableQuery.Append(column.Key + " " + column.Value + ");");
                        }
                        else
                        {
                            tableQuery.Append(column.Key + " " + column.Value + ",");
                        }
                    }
                }
                //open connection
                if (this.OpenConnection() == true)
                {
                    //create command and assign the query and connection from the constructor
                    MySqlCommand cmd = new MySqlCommand(tableQuery.ToString(), _connection);

                    //Execute command
                    cmd.ExecuteNonQuery();

                    //close connection
                    this.CloseConnection();

                    return(true);
                }
                return(false);
            }
            catch (MySqlException mex)
            {
                this.CloseConnection();
                throw mex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #5
0
        /// <summary>
        /// Realiza una consulta en una tabla de la base de datos
        /// y la devuelve en forma de tabla de tipo DataTable
        /// </summary>
        /// <param name="Table">Nombre de la tabla a consultar</param>
        /// <param name="ListFields">Lista de parámetros a consultar</param>
        /// <param name="Filter">Filtro de la búsqueda</param>
        /// <param name="OrderBy">Si es verdadero y la búsqueda no devuelve
        /// ningún resultado, se cargan todos los datos de los parámetros asignados
        /// aunque no coincidan con la búsqueda</param>
        /// <returns></returns>
        protected static DataTable GetDataTable(SQLTable Table,
                                                List <TEnum> ListFields,
                                                DataFieldTemplate Filter,
                                                bool UnconditionalReturnsAll,
                                                TEnum OrderBy)
        {
            Select <TEnum> S = new Select <TEnum>(ListFields, Table)
            {
                Conditional  = Filter,
                OrderByField = OrderBy
            };

            return(!UnconditionalReturnsAll && !S.IsConditionable ? null : S.ExecuteSelect());
        }
예제 #6
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            SQLRandomTableContent randomContent = new SQLRandomTableContent("Random", "random");
            ITable originalTable = new SQLTable(randomContent, randomContent.Numbers);
            SQLSortedTableContent sortedContent = new SQLSortedTableContent("Sorted", "sorted");
            ITable     sortedTable      = new SQLTable(sortedContent, sortedContent.Numbers);
            INumbers   originalNnumbers = new Numbers(originalTable);
            INumbers   sortedNnumbers   = new Numbers(sortedTable);
            ISorting   sorting          = new CountingSorting();
            ICore      core             = new Core(sorting, originalNnumbers, sortedNnumbers);
            MainWindow window           = new MainWindow(core);

            window.Show();
        }
예제 #7
0
 public Select(TField Field, SQLTable Table)
 {
     this.Field = Field;
     this.Table = Table;
 }
예제 #8
0
 public Select(List <TField> Fields, SQLTable Table)
 {
     this.Fields = Fields;
     this.Table  = Table;
 }
예제 #9
0
 protected static DataTable GetDataTable(SQLTable Table, List <TEnum> ListFields)
 {
     return(GetDataTable(Table, ListFields, null, false));
 }
예제 #10
0
 protected static DataTable GetDataTable(SQLTable Table, List <TEnum> ListFields, DataFieldTemplate Filter, bool UnconditionalReturnsAll)
 {
     return(GetDataTable(Table, ListFields, Filter, UnconditionalReturnsAll, ListFields[0]));
 }
예제 #11
0
        public TableView_Form(int iIndex, DBTableControl dbTables, SQLTable tbl, TableDockingForm dtF, ViewXml xViewXml)
        {
            m_Index = iIndex;
            m_DBTables = dbTables;
            m_tbl = tbl;
            m_TableDockingForm = dtF;
            m_ViewXml = xViewXml;
            m_pTableDockingFormXml = m_DBTables.m_xml.GetTableDockingFormXml(m_tbl.TableName);
            if (m_pTableDockingFormXml.m_TableViewFormXml[iIndex] == null)
            {
                m_pTableDockingFormXml.m_TableViewFormXml[iIndex] = new TableViewFormXml();
            }
            m_pTableDockingFormXml.m_TableViewFormXml[iIndex].m_DefaultViewXml = xViewXml;
            InitializeComponent();

            dataGridView_Table.ReadOnly = true;

            tsmi_Select_View.Text = lngRPM.s_SelectView.s;
            this.Text = lngRPM.s_View.s + " " + m_Index.ToString() + "   " + m_tbl.lngTableName.s;
            //            this.Text = m_tbl.lngTableName.s + " " + lngRPM.s_View.s + ":" + m_ViewXml.Name;
            string csError = "";
            this.label_PrimaryView.Text = lngRPM.s_PrimaryView.s;
            this.label_ViewName.Text = lngRPM.s_View.s;
            chkBox_BindWith_EditTable_Form.Text = lngRPM.s_ConnectWithEditTableForm.s;
            FillDataTable(ref csError);
        }
예제 #12
0
 public static void InitSidang()
 {
     dTables = new List<SQLTable>();
     dTables.Clear();
     List<string> tempItems1 = new List<string>();
     List<string> tempItems2 = new List<string>();
     List<string> tempItems3 = new List<string>();
     List<string> tempItems4 = new List<string>();
     List<string> tempItems5 = new List<string>();
     List<bool> tempKeys1 = new List<bool>();
     List<bool> tempKeys2 = new List<bool>();
     List<bool> tempKeys3 = new List<bool>();
     List<bool> tempKeys4 = new List<bool>();
     List<bool> tempKeys5 = new List<bool>();
     SQLTable tempTable1 = new SQLTable();
     SQLTable tempTable2 = new SQLTable();
     SQLTable tempTable3 = new SQLTable();
     SQLTable tempTable4 = new SQLTable();
     SQLTable tempTable5 = new SQLTable();
     //Mahasiswa
     tempItems1.Add("Mahasiswa");
     tempItems1.Add("NIM");
     tempItems1.Add("Nama");
     tempItems1.Add("Judul");
     tempItems1.Add("Bidang");
     tempItems1.Add("Pembimbing1");
     tempItems1.Add("Pembimbing2");
     tempTable1.items = tempItems1;
     tempKeys1.Add(true);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempKeys1.Add(true);
     tempKeys1.Add(true);
     tempTable1.keys = tempKeys1;
     dTables.Add(tempTable1);
     //Penguji1
     tempItems2.Add("Penguji1");
     tempItems2.Add("Penguji1");
     tempItems2.Add("Bidang11");
     tempItems2.Add("Bidang12");
     tempTable2.items = tempItems2;
     tempKeys2.Add(true);
     tempKeys2.Add(false);
     tempKeys2.Add(false);
     tempTable2.keys = tempKeys2;
     dTables.Add(tempTable2);
     //Penguji2
     tempItems3.Add("Penguji2");
     tempItems3.Add("Penguji2");
     tempItems3.Add("Bidang21");
     tempItems3.Add("Bidang22");
     tempTable3.items = tempItems3;
     tempKeys3.Add(true);
     tempKeys3.Add(false);
     tempKeys3.Add(false);
     tempTable3.keys = tempKeys3;
     dTables.Add(tempTable3);
     //Tempat
     tempItems4.Add("Tempat");
     tempItems4.Add("Ruangan");
     tempTable4.items = tempItems4;
     tempKeys4.Add(true);
     tempTable4.keys = tempKeys4;
     dTables.Add(tempTable4);
     //Waktu
     tempItems5.Add("Waktu");
     tempItems5.Add("Hari");
     tempItems5.Add("Jam");
     tempTable5.items = tempItems5;
     tempKeys5.Add(false);
     tempKeys5.Add(false);
     tempTable5.keys = tempKeys5;
     dTables.Add(tempTable5);
 }
예제 #13
0
 public static void InitSeminarII()
 {
     dTables = new List<SQLTable>();
     dTables.Clear();
     List<string> tempItems1 = new List<string>();
     List<string> tempItems2 = new List<string>();
     List<string> tempItems3 = new List<string>();
     List<bool> tempKeys1 = new List<bool>();
     List<bool> tempKeys2 = new List<bool>();
     List<bool> tempKeys3 = new List<bool>();
     SQLTable tempTable1 = new SQLTable();
     SQLTable tempTable2 = new SQLTable();
     SQLTable tempTable3 = new SQLTable();
     //kuliah
     tempItems1.Add("Mahasiswa");
     tempItems1.Add("NIM");
     tempItems1.Add("Nama");
     tempItems1.Add("Judul");
     tempItems1.Add("Bidang");
     tempItems1.Add("Pembimbing1");
     tempItems1.Add("Pembimbing2");
     tempTable1.items = tempItems1;
     tempKeys1.Add(true);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempKeys1.Add(true);
     tempKeys1.Add(true);
     tempTable1.keys = tempKeys1;
     dTables.Add(tempTable1);
     //Tempat
     tempItems2.Add("Tempat");
     tempItems2.Add("Ruangan");
     tempTable2.items = tempItems2;
     tempKeys2.Add(true);
     tempTable2.keys = tempKeys2;
     dTables.Add(tempTable2);
     //Waktu
     tempItems3.Add("Waktu");
     tempItems3.Add("Hari");
     tempItems3.Add("Jam");
     tempTable3.items = tempItems3;
     tempKeys3.Add(false);
     tempKeys3.Add(false);
     tempTable3.keys = tempKeys3;
     dTables.Add(tempTable3);
 }
예제 #14
0
 public static void InitMahasiswa()
 {
     dTables = new List<SQLTable>();
     dTables.Clear();
     List<string> tempItems1 = new List<string>();
     List<string> tempItems2 = new List<string>();
     List<string> tempItems3 = new List<string>();
     List<bool> tempKeys1 = new List<bool>();
     List<bool> tempKeys2 = new List<bool>();
     List<bool> tempKeys3 = new List<bool>();
     SQLTable tempTable1 = new SQLTable();
     SQLTable tempTable2 = new SQLTable();
     SQLTable tempTable3 = new SQLTable();
     //kuliah
     tempItems1.Add("Kuliah");
     tempItems1.Add("Kode");
     tempItems1.Add("Tingkat");
     tempItems1.Add("Kelas");
     tempItems1.Add("Pengajar");
     tempItems1.Add("Bagian");
     tempItems1.Add("Lama");
     tempItems1.Add("Mahasiswa");
     tempTable1.items = tempItems1;
     tempKeys1.Add(true);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempKeys1.Add(true);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempTable1.keys = tempKeys1;
     dTables.Add(tempTable1);
     //Tempat
     tempItems2.Add("Tempat");
     tempItems2.Add("Ruangan");
     tempItems2.Add("Kapasitas");
     tempTable2.items = tempItems2;
     tempKeys2.Add(true);
     tempKeys2.Add(false);
     tempTable2.keys = tempKeys2;
     dTables.Add(tempTable2);
     //Waktu
     tempItems3.Add("Waktu");
     tempItems3.Add("Hari");
     tempItems3.Add("Jam1");
     tempItems3.Add("Jam2");
     tempItems3.Add("Keterangan");
     tempItems3.Add("Slot");
     tempTable3.items = tempItems3;
     tempKeys3.Add(false);
     tempKeys3.Add(false);
     tempKeys3.Add(false);
     tempKeys3.Add(false);
     tempKeys3.Add(false);
     tempTable3.keys = tempKeys3;
     dTables.Add(tempTable3);
 }
예제 #15
0
 public static void InitJadwal2()
 {
     dTables = new List<SQLTable>();
     dTables.Clear();
     List<string> tempItems1 = new List<string>();
     //List<string> tempItems2 = new List<string>();
     List<string> tempItems3 = new List<string>();
     List<string> tempItems4 = new List<string>();
     List<bool> tempKeys1 = new List<bool>();
     //List<bool> tempKeys2 = new List<bool>();
     List<bool> tempKeys3 = new List<bool>();
     List<bool> tempKeys4 = new List<bool>();
     SQLTable tempTable1 = new SQLTable();
     //SQLTable tempTable2 = new SQLTable();
     SQLTable tempTable3 = new SQLTable();
     SQLTable tempTable4 = new SQLTable();
     //Mahasiswa
     tempItems1.Add("Mahasiswa");
     tempItems1.Add("NIM");
     tempItems1.Add("Nama");
     tempItems1.Add("Judul");
     tempItems1.Add("Bidang");
     tempItems1.Add("Pembimbing1");
     tempItems1.Add("Pembimbing2");
     tempTable1.items = tempItems1;
     tempKeys1.Add(true);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempKeys1.Add(false);
     tempTable1.keys = tempKeys1;
     dTables.Add(tempTable1);
     //Dosen
     //		tempItems2.Add("Dosen");
     //		tempItems2.Add("Penguji");
     //		tempItems2.Add("Bidang1");
     //		tempItems2.Add("Bidang2");
     //		tempTable2.items = tempItems2;
     //		tempKeys2.Add(false);
     //		tempKeys2.Add(false);
     //		tempKeys2.Add(false);
     //		tempTable2.keys = tempKeys2;
     //		dTables.Add(tempTable2);
     //Tempat
     tempItems3.Add("Tempat");
     tempItems3.Add("Ruangan");
     tempTable3.items = tempItems3;
     tempKeys3.Add(true);
     tempTable3.keys = tempKeys3;
     dTables.Add(tempTable3);
     //Waktu
     tempItems4.Add("Waktu");
     tempItems4.Add("Kode Waktu");
     tempItems4.Add("Hari");
     tempItems4.Add("Jam");
     tempItems4.Add("Hasil");
     tempTable4.items = tempItems4;
     tempKeys4.Add(true);
     tempKeys4.Add(false);
     tempKeys4.Add(false);
     tempKeys4.Add(false);
     tempTable4.keys = tempKeys4;
     dTables.Add(tempTable4);
 }
예제 #16
0
        static public void Apply()
        {
            SettingsMap arrAddTabs = SettingsMap.GetArray(), arrEditTabs = SettingsMap.GetArray(), arrGPP = SettingsMap.GetArray(), arrGridTabs = SettingsMap.GetArray(), arrRPP = SettingsMap.GetArray(), arrRegisterTabs = SettingsMap.GetArray(), arrViewTabs = SettingsMap.GetArray(), dIndex = null, detailsParam = SettingsMap.GetArray(), edata = SettingsMap.GetArray(), eventsData = SettingsMap.GetArray(), fdata = SettingsMap.GetArray(), fieldLabelsArray = new XVar(), fieldToolTipsArray = new XVar(), hours = null, intervalData = SettingsMap.GetArray(), masterParams = SettingsMap.GetArray(), pageTitlesArray = new XVar(), placeHoldersArray = new XVar(), popupPagesLayoutNames = SettingsMap.GetArray(), query = null, queryData_Array = new XVar(), reportGroupFields = SettingsMap.GetArray(), rgroupField = SettingsMap.GetArray(), strOriginalDetailsTable = null, tabFields = SettingsMap.GetArray(), table = null, tableKeysArray = new XVar(), tdataArray = new XVar(), tstrOrderBy = null, vdata = SettingsMap.GetArray();

            tdataArray["dbo__ABCSecurity"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".truncateText"]  = true;
            tdataArray["dbo__ABCSecurity"][".NumberOfChars"] = 80;
            tdataArray["dbo__ABCSecurity"][".ShortName"]     = "dbo__ABCSecurity";
            tdataArray["dbo__ABCSecurity"][".OwnerID"]       = "";
            tdataArray["dbo__ABCSecurity"][".OriginalTable"] = "dbo._ABCSecurity";
            fieldLabelsArray["dbo__ABCSecurity"]             = SettingsMap.GetArray();
            fieldToolTipsArray["dbo__ABCSecurity"]           = SettingsMap.GetArray();
            pageTitlesArray["dbo__ABCSecurity"]   = SettingsMap.GetArray();
            placeHoldersArray["dbo__ABCSecurity"] = SettingsMap.GetArray();
            if (CommonFunctions.mlang_getcurrentlang() == "English")
            {
                fieldLabelsArray["dbo__ABCSecurity"]["English"]               = SettingsMap.GetArray();
                fieldToolTipsArray["dbo__ABCSecurity"]["English"]             = SettingsMap.GetArray();
                placeHoldersArray["dbo__ABCSecurity"]["English"]              = SettingsMap.GetArray();
                pageTitlesArray["dbo__ABCSecurity"]["English"]                = SettingsMap.GetArray();
                fieldLabelsArray["dbo__ABCSecurity"]["English"]["ID"]         = "ID";
                fieldToolTipsArray["dbo__ABCSecurity"]["English"]["ID"]       = "";
                placeHoldersArray["dbo__ABCSecurity"]["English"]["ID"]        = "";
                fieldLabelsArray["dbo__ABCSecurity"]["English"]["username"]   = "******";
                fieldToolTipsArray["dbo__ABCSecurity"]["English"]["username"] = "";
                placeHoldersArray["dbo__ABCSecurity"]["English"]["username"]  = "";
                fieldLabelsArray["dbo__ABCSecurity"]["English"]["password"]   = "******";
                fieldToolTipsArray["dbo__ABCSecurity"]["English"]["password"] = "";
                placeHoldersArray["dbo__ABCSecurity"]["English"]["password"]  = "";
                fieldLabelsArray["dbo__ABCSecurity"]["English"]["admin"]      = "Admin";
                fieldToolTipsArray["dbo__ABCSecurity"]["English"]["admin"]    = "";
                placeHoldersArray["dbo__ABCSecurity"]["English"]["admin"]     = "";
                fieldLabelsArray["dbo__ABCSecurity"]["English"]["byear"]      = "Begin Term";
                fieldToolTipsArray["dbo__ABCSecurity"]["English"]["byear"]    = "";
                placeHoldersArray["dbo__ABCSecurity"]["English"]["byear"]     = "";
                fieldLabelsArray["dbo__ABCSecurity"]["English"]["eyear"]      = "End Term";
                fieldToolTipsArray["dbo__ABCSecurity"]["English"]["eyear"]    = "";
                placeHoldersArray["dbo__ABCSecurity"]["English"]["eyear"]     = "";
                fieldLabelsArray["dbo__ABCSecurity"]["English"]["role"]       = "Role";
                fieldToolTipsArray["dbo__ABCSecurity"]["English"]["role"]     = "";
                placeHoldersArray["dbo__ABCSecurity"]["English"]["role"]      = "";
                if (XVar.Pack(MVCFunctions.count(fieldToolTipsArray["dbo__ABCSecurity"]["English"])))
                {
                    tdataArray["dbo__ABCSecurity"][".isUseToolTips"] = true;
                }
            }
            if (CommonFunctions.mlang_getcurrentlang() == "")
            {
                fieldLabelsArray["dbo__ABCSecurity"][""]   = SettingsMap.GetArray();
                fieldToolTipsArray["dbo__ABCSecurity"][""] = SettingsMap.GetArray();
                placeHoldersArray["dbo__ABCSecurity"][""]  = SettingsMap.GetArray();
                pageTitlesArray["dbo__ABCSecurity"][""]    = SettingsMap.GetArray();
                if (XVar.Pack(MVCFunctions.count(fieldToolTipsArray["dbo__ABCSecurity"][""])))
                {
                    tdataArray["dbo__ABCSecurity"][".isUseToolTips"] = true;
                }
            }
            tdataArray["dbo__ABCSecurity"][".NCSearch"]             = true;
            tdataArray["dbo__ABCSecurity"][".shortTableName"]       = "dbo__ABCSecurity";
            tdataArray["dbo__ABCSecurity"][".nSecOptions"]          = 0;
            tdataArray["dbo__ABCSecurity"][".recsPerRowPrint"]      = 1;
            tdataArray["dbo__ABCSecurity"][".mainTableOwnerID"]     = "";
            tdataArray["dbo__ABCSecurity"][".moveNext"]             = 1;
            tdataArray["dbo__ABCSecurity"][".entityType"]           = 0;
            tdataArray["dbo__ABCSecurity"][".strOriginalTableName"] = "dbo._ABCSecurity";
            tdataArray["dbo__ABCSecurity"][".showAddInPopup"]       = false;
            tdataArray["dbo__ABCSecurity"][".showEditInPopup"]      = false;
            tdataArray["dbo__ABCSecurity"][".showViewInPopup"]      = false;
            popupPagesLayoutNames = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".popupPagesLayoutNames"] = popupPagesLayoutNames;
            tdataArray["dbo__ABCSecurity"][".fieldsForRegister"]     = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".listAjax"]                = false;
            tdataArray["dbo__ABCSecurity"][".audit"]                   = false;
            tdataArray["dbo__ABCSecurity"][".locking"]                 = false;
            tdataArray["dbo__ABCSecurity"][".edit"]                    = true;
            tdataArray["dbo__ABCSecurity"][".afterEditAction"]         = 1;
            tdataArray["dbo__ABCSecurity"][".closePopupAfterEdit"]     = 1;
            tdataArray["dbo__ABCSecurity"][".afterEditActionDetTable"] = "";
            tdataArray["dbo__ABCSecurity"][".add"]                     = true;
            tdataArray["dbo__ABCSecurity"][".afterAddAction"]          = 1;
            tdataArray["dbo__ABCSecurity"][".closePopupAfterAdd"]      = 1;
            tdataArray["dbo__ABCSecurity"][".afterAddActionDetTable"]  = "";
            tdataArray["dbo__ABCSecurity"][".list"]                    = true;
            tdataArray["dbo__ABCSecurity"][".inlineEdit"]              = true;
            tdataArray["dbo__ABCSecurity"][".reorderRecordsByHeader"]  = true;
            tdataArray["dbo__ABCSecurity"][".exportFormatting"]        = 2;
            tdataArray["dbo__ABCSecurity"][".exportDelimiter"]         = ",";
            tdataArray["dbo__ABCSecurity"][".inlineAdd"]               = true;
            tdataArray["dbo__ABCSecurity"][".view"]                    = true;
            tdataArray["dbo__ABCSecurity"][".import"]                  = true;
            tdataArray["dbo__ABCSecurity"][".exportTo"]                = true;
            tdataArray["dbo__ABCSecurity"][".printFriendly"]           = true;
            tdataArray["dbo__ABCSecurity"][".delete"]                  = true;
            tdataArray["dbo__ABCSecurity"][".showSimpleSearchOptions"] = false;
            tdataArray["dbo__ABCSecurity"][".allowShowHideFields"]     = false;
            tdataArray["dbo__ABCSecurity"][".allowFieldsReordering"]   = false;
            tdataArray["dbo__ABCSecurity"][".searchSaving"]            = false;
            tdataArray["dbo__ABCSecurity"][".showSearchPanel"]         = true;
            tdataArray["dbo__ABCSecurity"][".flexibleSearch"]          = true;
            tdataArray["dbo__ABCSecurity"][".isUseAjaxSuggest"]        = true;
            tdataArray["dbo__ABCSecurity"][".rowHighlite"]             = true;


            tdataArray["dbo__ABCSecurity"][".ajaxCodeSnippetAdded"] = false;
            tdataArray["dbo__ABCSecurity"][".buttonsAdded"]         = false;
            tdataArray["dbo__ABCSecurity"][".addPageEvents"]        = false;
            tdataArray["dbo__ABCSecurity"][".isUseTimeForSearch"]   = false;
            tdataArray["dbo__ABCSecurity"][".badgeColor"]           = "5F9EA0";
            tdataArray["dbo__ABCSecurity"][".allSearchFields"]      = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".filterFields"]         = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".requiredSearchFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".allSearchFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".allSearchFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".allSearchFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".allSearchFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".allSearchFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".googleLikeFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".googleLikeFields"].Add("ID");
            tdataArray["dbo__ABCSecurity"][".googleLikeFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".googleLikeFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".googleLikeFields"].Add("admin");
            tdataArray["dbo__ABCSecurity"][".googleLikeFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".googleLikeFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".googleLikeFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".advSearchFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".advSearchFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".advSearchFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".advSearchFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".advSearchFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".advSearchFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".tableType"] = "list";
            tdataArray["dbo__ABCSecurity"][".printerPageOrientation"]  = 0;
            tdataArray["dbo__ABCSecurity"][".nPrinterPageScale"]       = 100;
            tdataArray["dbo__ABCSecurity"][".nPrinterSplitRecords"]    = 40;
            tdataArray["dbo__ABCSecurity"][".nPrinterPDFSplitRecords"] = 40;
            tdataArray["dbo__ABCSecurity"][".geocodingEnabled"]        = false;
            tdataArray["dbo__ABCSecurity"][".listGridLayout"]          = 3;
            tdataArray["dbo__ABCSecurity"][".pageSize"]         = 20;
            tdataArray["dbo__ABCSecurity"][".warnLeavingPages"] = true;
            tstrOrderBy = "";
            if (MVCFunctions.strlen(tstrOrderBy) && MVCFunctions.strtolower(MVCFunctions.substr(tstrOrderBy, new XVar(0), new XVar(8))) != "order by")
            {
                tstrOrderBy = MVCFunctions.Concat("order by ", tstrOrderBy);
            }
            tdataArray["dbo__ABCSecurity"][".strOrderBy"]   = tstrOrderBy;
            tdataArray["dbo__ABCSecurity"][".orderindexes"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".sqlHead"]      = "SELECT ID,  	username,  	password,  	[admin],  	byear,  	eyear,  	[role]";
            tdataArray["dbo__ABCSecurity"][".sqlFrom"]      = "FROM dbo.[_ABCSecurity]";
            tdataArray["dbo__ABCSecurity"][".sqlWhereExpr"] = "";
            tdataArray["dbo__ABCSecurity"][".sqlTail"]      = "";
            arrRPP = SettingsMap.GetArray();
            arrRPP.Add(10);
            arrRPP.Add(20);
            arrRPP.Add(30);
            arrRPP.Add(50);
            arrRPP.Add(100);
            arrRPP.Add(500);
            arrRPP.Add(-1);
            tdataArray["dbo__ABCSecurity"][".arrRecsPerPage"] = arrRPP;
            arrGPP = SettingsMap.GetArray();
            arrGPP.Add(1);
            arrGPP.Add(3);
            arrGPP.Add(5);
            arrGPP.Add(10);
            arrGPP.Add(50);
            arrGPP.Add(100);
            arrGPP.Add(-1);
            tdataArray["dbo__ABCSecurity"][".arrGroupsPerPage"]       = arrGPP;
            tdataArray["dbo__ABCSecurity"][".highlightSearchResults"] = true;
            tableKeysArray["dbo__ABCSecurity"] = SettingsMap.GetArray();
            tableKeysArray["dbo__ABCSecurity"].Add("ID");
            tdataArray["dbo__ABCSecurity"][".Keys"]       = tableKeysArray["dbo__ABCSecurity"];
            tdataArray["dbo__ABCSecurity"][".listFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".listFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".listFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".listFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".listFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".listFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".hideMobileList"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".viewFields"]     = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".viewFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".viewFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".viewFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".viewFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".viewFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".addFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".addFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".addFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".addFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".addFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".addFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".masterListFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".masterListFields"].Add("ID");
            tdataArray["dbo__ABCSecurity"][".masterListFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".masterListFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".masterListFields"].Add("admin");
            tdataArray["dbo__ABCSecurity"][".masterListFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".masterListFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".masterListFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".inlineAddFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".inlineAddFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".inlineAddFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".inlineAddFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".inlineAddFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".inlineAddFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".editFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".editFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".editFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".editFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".editFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".editFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".inlineEditFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".inlineEditFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".inlineEditFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".inlineEditFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".inlineEditFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".inlineEditFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".updateSelectedFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".updateSelectedFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".updateSelectedFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".updateSelectedFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".updateSelectedFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".updateSelectedFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".exportFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".exportFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".exportFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".exportFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".exportFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".exportFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".importFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".importFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".importFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".importFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".importFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".importFields"].Add("role");
            tdataArray["dbo__ABCSecurity"][".printFields"] = SettingsMap.GetArray();
            tdataArray["dbo__ABCSecurity"][".printFields"].Add("username");
            tdataArray["dbo__ABCSecurity"][".printFields"].Add("password");
            tdataArray["dbo__ABCSecurity"][".printFields"].Add("byear");
            tdataArray["dbo__ABCSecurity"][".printFields"].Add("eyear");
            tdataArray["dbo__ABCSecurity"][".printFields"].Add("role");
            fdata                                 = SettingsMap.GetArray();
            fdata["Index"]                        = 1;
            fdata["strName"]                      = "ID";
            fdata["GoodName"]                     = "ID";
            fdata["ownerTable"]                   = "dbo._ABCSecurity";
            fdata["Label"]                        = CommonFunctions.GetFieldLabel("dbo__ABCSecurity", "ID");
            fdata["FieldType"]                    = 3;
            fdata["strField"]                     = "ID";
            fdata["isSQLExpression"]              = true;
            fdata["FullName"]                     = "ID";
            fdata["UploadFolder"]                 = "files";
            fdata["ViewFormats"]                  = SettingsMap.GetArray();
            vdata                                 = new XVar("ViewFormat", "");
            vdata["NeedEncode"]                   = true;
            fdata["ViewFormats"]["view"]          = vdata;
            fdata["EditFormats"]                  = SettingsMap.GetArray();
            edata                                 = new XVar("EditFormat", "Text field");
            edata["IsRequired"]                   = true;
            edata["acceptFileTypes"]              = ".+$";
            edata["maxNumberOfFiles"]             = 1;
            edata["HTML5InuptType"]               = "number";
            edata["EditParams"]                   = "";
            edata["controlWidth"]                 = 200;
            edata["validateAs"]                   = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"]  = SettingsMap.GetArray();
            edata["validateAs"]["customMessages"] = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"].Add(CommonFunctions.getJsValidatorName(new XVar("Number")));
            edata["validateAs"]["basicValidate"].Add("IsRequired");
            fdata["EditFormats"]["edit"]         = edata;
            fdata["isSeparate"]                  = false;
            tdataArray["dbo__ABCSecurity"]["ID"] = fdata;
            fdata                                      = SettingsMap.GetArray();
            fdata["Index"]                             = 2;
            fdata["strName"]                           = "username";
            fdata["GoodName"]                          = "username";
            fdata["ownerTable"]                        = "dbo._ABCSecurity";
            fdata["Label"]                             = CommonFunctions.GetFieldLabel("dbo__ABCSecurity", "username");
            fdata["FieldType"]                         = 202;
            fdata["bListPage"]                         = true;
            fdata["bAddPage"]                          = true;
            fdata["bInlineAdd"]                        = true;
            fdata["bEditPage"]                         = true;
            fdata["bInlineEdit"]                       = true;
            fdata["bUpdateSelected"]                   = true;
            fdata["bViewPage"]                         = true;
            fdata["bAdvancedSearch"]                   = true;
            fdata["bPrinterPage"]                      = true;
            fdata["bExportPage"]                       = true;
            fdata["strField"]                          = "username";
            fdata["isSQLExpression"]                   = true;
            fdata["FullName"]                          = "username";
            fdata["FieldPermissions"]                  = true;
            fdata["UploadFolder"]                      = "files";
            fdata["ViewFormats"]                       = SettingsMap.GetArray();
            vdata                                      = new XVar("ViewFormat", "");
            vdata["NeedEncode"]                        = true;
            fdata["ViewFormats"]["view"]               = vdata;
            fdata["EditFormats"]                       = SettingsMap.GetArray();
            edata                                      = new XVar("EditFormat", "Text field");
            edata["acceptFileTypes"]                   = ".+$";
            edata["maxNumberOfFiles"]                  = 1;
            edata["HTML5InuptType"]                    = "text";
            edata["EditParams"]                        = "";
            edata["EditParams"]                        = MVCFunctions.Concat(edata["EditParams"], " maxlength=255");
            edata["controlWidth"]                      = 200;
            edata["validateAs"]                        = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"]       = SettingsMap.GetArray();
            edata["validateAs"]["customMessages"]      = SettingsMap.GetArray();
            fdata["EditFormats"]["edit"]               = edata;
            fdata["isSeparate"]                        = false;
            fdata["searchOptionsList"]                 = new XVar(0, "Contains", 1, "Equals", 2, "Starts with", 3, "More than", 4, "Less than", 5, "Between", 6, "Empty", 7, Constants.NOT_EMPTY);
            tdataArray["dbo__ABCSecurity"]["username"] = fdata;
            fdata                                      = SettingsMap.GetArray();
            fdata["Index"]                             = 3;
            fdata["strName"]                           = "password";
            fdata["GoodName"]                          = "password";
            fdata["ownerTable"]                        = "dbo._ABCSecurity";
            fdata["Label"]                             = CommonFunctions.GetFieldLabel("dbo__ABCSecurity", "password");
            fdata["FieldType"]                         = 202;
            fdata["bListPage"]                         = true;
            fdata["bAddPage"]                          = true;
            fdata["bInlineAdd"]                        = true;
            fdata["bEditPage"]                         = true;
            fdata["bInlineEdit"]                       = true;
            fdata["bUpdateSelected"]                   = true;
            fdata["bViewPage"]                         = true;
            fdata["bAdvancedSearch"]                   = true;
            fdata["bPrinterPage"]                      = true;
            fdata["bExportPage"]                       = true;
            fdata["strField"]                          = "password";
            fdata["isSQLExpression"]                   = true;
            fdata["FullName"]                          = "password";
            fdata["FieldPermissions"]                  = true;
            fdata["UploadFolder"]                      = "files";
            fdata["ViewFormats"]                       = SettingsMap.GetArray();
            vdata                                      = new XVar("ViewFormat", "");
            vdata["NeedEncode"]                        = true;
            fdata["ViewFormats"]["view"]               = vdata;
            fdata["EditFormats"]                       = SettingsMap.GetArray();
            edata                                      = new XVar("EditFormat", "Text field");
            edata["acceptFileTypes"]                   = ".+$";
            edata["maxNumberOfFiles"]                  = 1;
            edata["HTML5InuptType"]                    = "text";
            edata["EditParams"]                        = "";
            edata["EditParams"]                        = MVCFunctions.Concat(edata["EditParams"], " maxlength=255");
            edata["controlWidth"]                      = 200;
            edata["validateAs"]                        = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"]       = SettingsMap.GetArray();
            edata["validateAs"]["customMessages"]      = SettingsMap.GetArray();
            fdata["EditFormats"]["edit"]               = edata;
            fdata["isSeparate"]                        = false;
            fdata["searchOptionsList"]                 = new XVar(0, "Contains", 1, "Equals", 2, "Starts with", 3, "More than", 4, "Less than", 5, "Between", 6, "Empty", 7, Constants.NOT_EMPTY);
            tdataArray["dbo__ABCSecurity"]["password"] = fdata;
            fdata                                      = SettingsMap.GetArray();
            fdata["Index"]                             = 4;
            fdata["strName"]                           = "admin";
            fdata["GoodName"]                          = "admin";
            fdata["ownerTable"]                        = "dbo._ABCSecurity";
            fdata["Label"]                             = CommonFunctions.GetFieldLabel("dbo__ABCSecurity", "admin");
            fdata["FieldType"]                         = 11;
            fdata["strField"]                          = "admin";
            fdata["isSQLExpression"]                   = true;
            fdata["FullName"]                          = "[admin]";
            fdata["UploadFolder"]                      = "files";
            fdata["ViewFormats"]                       = SettingsMap.GetArray();
            vdata                                      = new XVar("ViewFormat", "Checkbox");
            fdata["ViewFormats"]["view"]               = vdata;
            fdata["EditFormats"]                       = SettingsMap.GetArray();
            edata                                      = new XVar("EditFormat", "Checkbox");
            edata["acceptFileTypes"]                   = ".+$";
            edata["maxNumberOfFiles"]                  = 1;
            edata["controlWidth"]                      = 200;
            edata["validateAs"]                        = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"]       = SettingsMap.GetArray();
            edata["validateAs"]["customMessages"]      = SettingsMap.GetArray();
            fdata["EditFormats"]["edit"]               = edata;
            fdata["isSeparate"]                        = false;
            tdataArray["dbo__ABCSecurity"]["admin"]    = fdata;
            fdata                                      = SettingsMap.GetArray();
            fdata["Index"]                             = 5;
            fdata["strName"]                           = "byear";
            fdata["GoodName"]                          = "byear";
            fdata["ownerTable"]                        = "dbo._ABCSecurity";
            fdata["Label"]                             = CommonFunctions.GetFieldLabel("dbo__ABCSecurity", "byear");
            fdata["FieldType"]                         = 3;
            fdata["bListPage"]                         = true;
            fdata["bAddPage"]                          = true;
            fdata["bInlineAdd"]                        = true;
            fdata["bEditPage"]                         = true;
            fdata["bInlineEdit"]                       = true;
            fdata["bUpdateSelected"]                   = true;
            fdata["bViewPage"]                         = true;
            fdata["bAdvancedSearch"]                   = true;
            fdata["bPrinterPage"]                      = true;
            fdata["bExportPage"]                       = true;
            fdata["strField"]                          = "byear";
            fdata["isSQLExpression"]                   = true;
            fdata["FullName"]                          = "byear";
            fdata["FieldPermissions"]                  = true;
            fdata["UploadFolder"]                      = "files";
            fdata["ViewFormats"]                       = SettingsMap.GetArray();
            vdata                                      = new XVar("ViewFormat", "");
            vdata["NeedEncode"]                        = true;
            fdata["ViewFormats"]["view"]               = vdata;
            fdata["EditFormats"]                       = SettingsMap.GetArray();
            edata                                      = new XVar("EditFormat", "Text field");
            edata["acceptFileTypes"]                   = ".+$";
            edata["maxNumberOfFiles"]                  = 1;
            edata["HTML5InuptType"]                    = "number";
            edata["EditParams"]                        = "";
            edata["controlWidth"]                      = 50;
            edata["validateAs"]                        = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"]       = SettingsMap.GetArray();
            edata["validateAs"]["customMessages"]      = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"].Add(CommonFunctions.getJsValidatorName(new XVar("Number")));
            fdata["EditFormats"]["edit"]            = edata;
            fdata["isSeparate"]                     = false;
            fdata["searchOptionsList"]              = new XVar(0, "Contains", 1, "Equals", 2, "Starts with", 3, "More than", 4, "Less than", 5, "Between", 6, "Empty", 7, Constants.NOT_EMPTY);
            tdataArray["dbo__ABCSecurity"]["byear"] = fdata;
            fdata                                 = SettingsMap.GetArray();
            fdata["Index"]                        = 6;
            fdata["strName"]                      = "eyear";
            fdata["GoodName"]                     = "eyear";
            fdata["ownerTable"]                   = "dbo._ABCSecurity";
            fdata["Label"]                        = CommonFunctions.GetFieldLabel("dbo__ABCSecurity", "eyear");
            fdata["FieldType"]                    = 3;
            fdata["bListPage"]                    = true;
            fdata["bAddPage"]                     = true;
            fdata["bInlineAdd"]                   = true;
            fdata["bEditPage"]                    = true;
            fdata["bInlineEdit"]                  = true;
            fdata["bUpdateSelected"]              = true;
            fdata["bViewPage"]                    = true;
            fdata["bAdvancedSearch"]              = true;
            fdata["bPrinterPage"]                 = true;
            fdata["bExportPage"]                  = true;
            fdata["strField"]                     = "eyear";
            fdata["isSQLExpression"]              = true;
            fdata["FullName"]                     = "eyear";
            fdata["FieldPermissions"]             = true;
            fdata["UploadFolder"]                 = "files";
            fdata["ViewFormats"]                  = SettingsMap.GetArray();
            vdata                                 = new XVar("ViewFormat", "");
            vdata["NeedEncode"]                   = true;
            fdata["ViewFormats"]["view"]          = vdata;
            fdata["EditFormats"]                  = SettingsMap.GetArray();
            edata                                 = new XVar("EditFormat", "Text field");
            edata["acceptFileTypes"]              = ".+$";
            edata["maxNumberOfFiles"]             = 1;
            edata["HTML5InuptType"]               = "number";
            edata["EditParams"]                   = "";
            edata["controlWidth"]                 = 50;
            edata["validateAs"]                   = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"]  = SettingsMap.GetArray();
            edata["validateAs"]["customMessages"] = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"].Add(CommonFunctions.getJsValidatorName(new XVar("Number")));
            fdata["EditFormats"]["edit"]            = edata;
            fdata["isSeparate"]                     = false;
            fdata["searchOptionsList"]              = new XVar(0, "Contains", 1, "Equals", 2, "Starts with", 3, "More than", 4, "Less than", 5, "Between", 6, "Empty", 7, Constants.NOT_EMPTY);
            tdataArray["dbo__ABCSecurity"]["eyear"] = fdata;
            fdata                             = SettingsMap.GetArray();
            fdata["Index"]                    = 7;
            fdata["strName"]                  = "role";
            fdata["GoodName"]                 = "role";
            fdata["ownerTable"]               = "dbo._ABCSecurity";
            fdata["Label"]                    = CommonFunctions.GetFieldLabel("dbo__ABCSecurity", "role");
            fdata["FieldType"]                = 202;
            fdata["bListPage"]                = true;
            fdata["bAddPage"]                 = true;
            fdata["bInlineAdd"]               = true;
            fdata["bEditPage"]                = true;
            fdata["bInlineEdit"]              = true;
            fdata["bUpdateSelected"]          = true;
            fdata["bViewPage"]                = true;
            fdata["bAdvancedSearch"]          = true;
            fdata["bPrinterPage"]             = true;
            fdata["bExportPage"]              = true;
            fdata["strField"]                 = "role";
            fdata["isSQLExpression"]          = true;
            fdata["FullName"]                 = "[role]";
            fdata["FieldPermissions"]         = true;
            fdata["UploadFolder"]             = "files";
            fdata["ViewFormats"]              = SettingsMap.GetArray();
            vdata                             = new XVar("ViewFormat", "");
            vdata["NeedEncode"]               = true;
            fdata["ViewFormats"]["view"]      = vdata;
            fdata["EditFormats"]              = SettingsMap.GetArray();
            edata                             = new XVar("EditFormat", "Lookup wizard");
            edata["LookupType"]               = 0;
            edata["autoCompleteFieldsOnEdit"] = 0;
            edata["autoCompleteFields"]       = SettingsMap.GetArray();
            edata["LCType"]                   = 0;
            edata["LookupValues"]             = SettingsMap.GetArray();
            edata["LookupValues"].Add("admin");
            edata["LookupValues"].Add("readonly");
            edata["LookupValues"].Add("member");
            edata["SelectSize"]                              = 1;
            edata["acceptFileTypes"]                         = ".+$";
            edata["maxNumberOfFiles"]                        = 1;
            edata["controlWidth"]                            = 200;
            edata["validateAs"]                              = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"]             = SettingsMap.GetArray();
            edata["validateAs"]["customMessages"]            = SettingsMap.GetArray();
            fdata["EditFormats"]["edit"]                     = edata;
            fdata["isSeparate"]                              = false;
            fdata["defaultSearchOption"]                     = "Equals";
            fdata["searchOptionsList"]                       = new XVar(0, "Contains", 1, "Equals", 2, "Starts with", 3, "More than", 4, "Less than", 5, "Between", 6, "Empty", 7, Constants.NOT_EMPTY);
            tdataArray["dbo__ABCSecurity"]["role"]           = fdata;
            GlobalVars.tables_data["dbo._ABCSecurity"]       = tdataArray["dbo__ABCSecurity"];
            GlobalVars.field_labels["dbo__ABCSecurity"]      = fieldLabelsArray["dbo__ABCSecurity"];
            GlobalVars.fieldToolTips["dbo__ABCSecurity"]     = fieldToolTipsArray["dbo__ABCSecurity"];
            GlobalVars.placeHolders["dbo__ABCSecurity"]      = placeHoldersArray["dbo__ABCSecurity"];
            GlobalVars.page_titles["dbo__ABCSecurity"]       = pageTitlesArray["dbo__ABCSecurity"];
            GlobalVars.detailsTablesData["dbo._ABCSecurity"] = SettingsMap.GetArray();
            GlobalVars.masterTablesData["dbo._ABCSecurity"]  = SettingsMap.GetArray();


            strOriginalDetailsTable          = "dbo._ABCVotes";
            masterParams                     = SettingsMap.GetArray();
            masterParams["mDataSourceTable"] = "dbo._ABCVotes";
            masterParams["mOriginalTable"]   = strOriginalDetailsTable;
            masterParams["mShortTable"]      = "dbo__ABCVotes";
            masterParams["masterKeys"]       = SettingsMap.GetArray();
            masterParams["detailKeys"]       = SettingsMap.GetArray();
            masterParams["dispChildCount"]   = 0;
            masterParams["hideChild"]        = 0;
            masterParams["dispMasterInfo"]   = SettingsMap.GetArray();
            masterParams["previewOnList"]    = 2;
            masterParams["previewOnAdd"]     = 0;
            masterParams["previewOnEdit"]    = 0;
            masterParams["previewOnView"]    = 0;
            masterParams["proceedLink"]      = 1;
            masterParams["type"]             = Constants.PAGE_LIST;
            GlobalVars.masterTablesData["dbo._ABCSecurity"][0] = masterParams;
            GlobalVars.masterTablesData["dbo._ABCSecurity"][0]["masterKeys"] = SettingsMap.GetArray();
            GlobalVars.masterTablesData["dbo._ABCSecurity"][0]["masterKeys"].Add("committee_member");
            GlobalVars.masterTablesData["dbo._ABCSecurity"][0]["detailKeys"] = SettingsMap.GetArray();
            GlobalVars.masterTablesData["dbo._ABCSecurity"][0]["detailKeys"].Add("username");

            SQLEntity obj        = null;
            var       protoArray = SettingsMap.GetArray();

            protoArray["0"] = SettingsMap.GetArray();
            protoArray["0"]["m_strHead"]      = "SELECT";
            protoArray["0"]["m_strFieldList"] = "ID,  	username,  	password,  	[admin],  	byear,  	eyear,  	[role]";
            protoArray["0"]["m_strFrom"]      = "FROM dbo.[_ABCSecurity]";
            protoArray["0"]["m_strWhere"]     = "";
            protoArray["0"]["m_strOrderBy"]   = "";


            protoArray["0"]["cipherer"]    = null;
            protoArray["2"]                = SettingsMap.GetArray();
            protoArray["2"]["m_sql"]       = "";
            protoArray["2"]["m_uniontype"] = "SQLL_UNKNOWN";
            obj = new SQLNonParsed(new XVar("m_sql", ""));

            protoArray["2"]["m_column"]     = obj;
            protoArray["2"]["m_contained"]  = SettingsMap.GetArray();
            protoArray["2"]["m_strCase"]    = "";
            protoArray["2"]["m_havingmode"] = false;
            protoArray["2"]["m_inBrackets"] = false;
            protoArray["2"]["m_useAlias"]   = false;
            obj = new SQLLogicalExpr(protoArray["2"]);

            protoArray["0"]["m_where"]     = obj;
            protoArray["4"]                = SettingsMap.GetArray();
            protoArray["4"]["m_sql"]       = "";
            protoArray["4"]["m_uniontype"] = "SQLL_UNKNOWN";
            obj = new SQLNonParsed(new XVar("m_sql", ""));

            protoArray["4"]["m_column"]     = obj;
            protoArray["4"]["m_contained"]  = SettingsMap.GetArray();
            protoArray["4"]["m_strCase"]    = "";
            protoArray["4"]["m_havingmode"] = false;
            protoArray["4"]["m_inBrackets"] = false;
            protoArray["4"]["m_useAlias"]   = false;
            obj = new SQLLogicalExpr(protoArray["4"]);

            protoArray["0"]["m_having"]    = obj;
            protoArray["0"]["m_fieldlist"] = SettingsMap.GetArray();
            protoArray["6"] = SettingsMap.GetArray();
            obj             = new SQLField(new XVar("m_strName", "ID", "m_strTable", "dbo._ABCSecurity", "m_srcTableName", "dbo._ABCSecurity"));

            protoArray["6"]["m_sql"]          = "ID";
            protoArray["6"]["m_srcTableName"] = "dbo._ABCSecurity";
            protoArray["6"]["m_expr"]         = obj;
            protoArray["6"]["m_alias"]        = "";
            obj = new SQLFieldListItem(protoArray["6"]);

            protoArray["0"]["m_fieldlist"].Add(obj);
            protoArray["8"] = SettingsMap.GetArray();
            obj             = new SQLField(new XVar("m_strName", "username", "m_strTable", "dbo._ABCSecurity", "m_srcTableName", "dbo._ABCSecurity"));

            protoArray["8"]["m_sql"]          = "username";
            protoArray["8"]["m_srcTableName"] = "dbo._ABCSecurity";
            protoArray["8"]["m_expr"]         = obj;
            protoArray["8"]["m_alias"]        = "";
            obj = new SQLFieldListItem(protoArray["8"]);

            protoArray["0"]["m_fieldlist"].Add(obj);
            protoArray["10"] = SettingsMap.GetArray();
            obj = new SQLField(new XVar("m_strName", "password", "m_strTable", "dbo._ABCSecurity", "m_srcTableName", "dbo._ABCSecurity"));

            protoArray["10"]["m_sql"]          = "password";
            protoArray["10"]["m_srcTableName"] = "dbo._ABCSecurity";
            protoArray["10"]["m_expr"]         = obj;
            protoArray["10"]["m_alias"]        = "";
            obj = new SQLFieldListItem(protoArray["10"]);

            protoArray["0"]["m_fieldlist"].Add(obj);
            protoArray["12"] = SettingsMap.GetArray();
            obj = new SQLField(new XVar("m_strName", "admin", "m_strTable", "dbo._ABCSecurity", "m_srcTableName", "dbo._ABCSecurity"));

            protoArray["12"]["m_sql"]          = "[admin]";
            protoArray["12"]["m_srcTableName"] = "dbo._ABCSecurity";
            protoArray["12"]["m_expr"]         = obj;
            protoArray["12"]["m_alias"]        = "";
            obj = new SQLFieldListItem(protoArray["12"]);

            protoArray["0"]["m_fieldlist"].Add(obj);
            protoArray["14"] = SettingsMap.GetArray();
            obj = new SQLField(new XVar("m_strName", "byear", "m_strTable", "dbo._ABCSecurity", "m_srcTableName", "dbo._ABCSecurity"));

            protoArray["14"]["m_sql"]          = "byear";
            protoArray["14"]["m_srcTableName"] = "dbo._ABCSecurity";
            protoArray["14"]["m_expr"]         = obj;
            protoArray["14"]["m_alias"]        = "";
            obj = new SQLFieldListItem(protoArray["14"]);

            protoArray["0"]["m_fieldlist"].Add(obj);
            protoArray["16"] = SettingsMap.GetArray();
            obj = new SQLField(new XVar("m_strName", "eyear", "m_strTable", "dbo._ABCSecurity", "m_srcTableName", "dbo._ABCSecurity"));

            protoArray["16"]["m_sql"]          = "eyear";
            protoArray["16"]["m_srcTableName"] = "dbo._ABCSecurity";
            protoArray["16"]["m_expr"]         = obj;
            protoArray["16"]["m_alias"]        = "";
            obj = new SQLFieldListItem(protoArray["16"]);

            protoArray["0"]["m_fieldlist"].Add(obj);
            protoArray["18"] = SettingsMap.GetArray();
            obj = new SQLField(new XVar("m_strName", "role", "m_strTable", "dbo._ABCSecurity", "m_srcTableName", "dbo._ABCSecurity"));

            protoArray["18"]["m_sql"]          = "[role]";
            protoArray["18"]["m_srcTableName"] = "dbo._ABCSecurity";
            protoArray["18"]["m_expr"]         = obj;
            protoArray["18"]["m_alias"]        = "";
            obj = new SQLFieldListItem(protoArray["18"]);

            protoArray["0"]["m_fieldlist"].Add(obj);
            protoArray["0"]["m_fromlist"] = SettingsMap.GetArray();
            protoArray["20"]                   = SettingsMap.GetArray();
            protoArray["20"]["m_link"]         = "SQLL_MAIN";
            protoArray["21"]                   = SettingsMap.GetArray();
            protoArray["21"]["m_strName"]      = "dbo._ABCSecurity";
            protoArray["21"]["m_srcTableName"] = "dbo._ABCSecurity";
            protoArray["21"]["m_columns"]      = SettingsMap.GetArray();
            protoArray["21"]["m_columns"].Add("ID");
            protoArray["21"]["m_columns"].Add("username");
            protoArray["21"]["m_columns"].Add("password");
            protoArray["21"]["m_columns"].Add("admin");
            protoArray["21"]["m_columns"].Add("byear");
            protoArray["21"]["m_columns"].Add("eyear");
            protoArray["21"]["m_columns"].Add("role");
            obj = new SQLTable(protoArray["21"]);

            protoArray["20"]["m_table"]        = obj;
            protoArray["20"]["m_sql"]          = "dbo.[_ABCSecurity]";
            protoArray["20"]["m_alias"]        = "";
            protoArray["20"]["m_srcTableName"] = "dbo._ABCSecurity";
            protoArray["22"]                = SettingsMap.GetArray();
            protoArray["22"]["m_sql"]       = "";
            protoArray["22"]["m_uniontype"] = "SQLL_UNKNOWN";
            obj = new SQLNonParsed(new XVar("m_sql", ""));

            protoArray["22"]["m_column"]     = obj;
            protoArray["22"]["m_contained"]  = SettingsMap.GetArray();
            protoArray["22"]["m_strCase"]    = "";
            protoArray["22"]["m_havingmode"] = false;
            protoArray["22"]["m_inBrackets"] = false;
            protoArray["22"]["m_useAlias"]   = false;
            obj = new SQLLogicalExpr(protoArray["22"]);

            protoArray["20"]["m_joinon"] = obj;
            obj = new SQLFromListItem(protoArray["20"]);

            protoArray["0"]["m_fromlist"].Add(obj);
            protoArray["0"]["m_groupby"]      = SettingsMap.GetArray();
            protoArray["0"]["m_orderby"]      = SettingsMap.GetArray();
            protoArray["0"]["m_srcTableName"] = "dbo._ABCSecurity";
            obj = new SQLQuery(protoArray["0"]);

            queryData_Array["dbo__ABCSecurity"] = obj;



            tdataArray["dbo__ABCSecurity"][".sqlquery"]  = queryData_Array["dbo__ABCSecurity"];
            GlobalVars.tableEvents["dbo._ABCSecurity"]   = new eventsBase();
            tdataArray["dbo__ABCSecurity"][".hasEvents"] = false;
            GlobalVars.tables_data["dbo__ABCSecurity"]   = tdataArray["dbo__ABCSecurity"];
        }
예제 #17
0
        static public void Apply()
        {
            SettingsMap arrGPP = SettingsMap.GetArray(), arrGridTabs = SettingsMap.GetArray(), arrRPP = SettingsMap.GetArray(), dIndex = null, detailsParam = SettingsMap.GetArray(), edata = SettingsMap.GetArray(), eventsData = SettingsMap.GetArray(), fdata = SettingsMap.GetArray(), fieldLabelsArray = new XVar(), fieldToolTipsArray = new XVar(), hours = null, intervalData = SettingsMap.GetArray(), masterParams = SettingsMap.GetArray(), pageTitlesArray = new XVar(), placeHoldersArray = new XVar(), popupPagesLayoutNames = SettingsMap.GetArray(), query = null, queryData_Array = new XVar(), reportGroupFields = SettingsMap.GetArray(), rgroupField = SettingsMap.GetArray(), strOriginalDetailsTable = null, table = null, tableKeysArray = new XVar(), tdataArray = new XVar(), tstrOrderBy = null, vdata = SettingsMap.GetArray();

            tdataArray["dbo_Preferencias"] = SettingsMap.GetArray();
            tdataArray["dbo_Preferencias"][".searchableFields"] = SettingsMap.GetArray();
            tdataArray["dbo_Preferencias"][".truncateText"]     = true;
            tdataArray["dbo_Preferencias"][".NumberOfChars"]    = 80;
            tdataArray["dbo_Preferencias"][".ShortName"]        = "dbo_Preferencias";
            tdataArray["dbo_Preferencias"][".OwnerID"]          = "";
            tdataArray["dbo_Preferencias"][".OriginalTable"]    = "dbo.Preferencias";
            GlobalVars.defaultPages = MVCFunctions.my_json_decode(new XVar("{\"edit\":\"edit\",\"list\":\"list\",\"search\":\"search\"}"));
            tdataArray["dbo_Preferencias"][".pages"]        = CommonFunctions.types2pages(MVCFunctions.my_json_decode(new XVar("{\"edit\":[\"edit\"],\"list\":[\"list\"],\"search\":[\"search\"]}")));
            tdataArray["dbo_Preferencias"][".defaultPages"] = GlobalVars.defaultPages;
            fieldLabelsArray["dbo_Preferencias"]            = SettingsMap.GetArray();
            fieldToolTipsArray["dbo_Preferencias"]          = SettingsMap.GetArray();
            pageTitlesArray["dbo_Preferencias"]             = SettingsMap.GetArray();
            placeHoldersArray["dbo_Preferencias"]           = SettingsMap.GetArray();
            if (CommonFunctions.mlang_getcurrentlang() == "Spanish")
            {
                fieldLabelsArray["dbo_Preferencias"]["Spanish"]                  = SettingsMap.GetArray();
                fieldToolTipsArray["dbo_Preferencias"]["Spanish"]                = SettingsMap.GetArray();
                placeHoldersArray["dbo_Preferencias"]["Spanish"]                 = SettingsMap.GetArray();
                pageTitlesArray["dbo_Preferencias"]["Spanish"]                   = SettingsMap.GetArray();
                fieldLabelsArray["dbo_Preferencias"]["Spanish"]["ID"]            = "ID";
                fieldToolTipsArray["dbo_Preferencias"]["Spanish"]["ID"]          = "";
                placeHoldersArray["dbo_Preferencias"]["Spanish"]["ID"]           = "";
                fieldLabelsArray["dbo_Preferencias"]["Spanish"]["nombre_jefe"]   = "Nombre Jefe";
                fieldToolTipsArray["dbo_Preferencias"]["Spanish"]["nombre_jefe"] = "";
                placeHoldersArray["dbo_Preferencias"]["Spanish"]["nombre_jefe"]  = "";
                fieldLabelsArray["dbo_Preferencias"]["Spanish"]["division"]      = "Division";
                fieldToolTipsArray["dbo_Preferencias"]["Spanish"]["division"]    = "";
                placeHoldersArray["dbo_Preferencias"]["Spanish"]["division"]     = "";
                if (XVar.Pack(MVCFunctions.count(fieldToolTipsArray["dbo_Preferencias"]["Spanish"])))
                {
                    tdataArray["dbo_Preferencias"][".isUseToolTips"] = true;
                }
            }
            tdataArray["dbo_Preferencias"][".NCSearch"]             = true;
            tdataArray["dbo_Preferencias"][".shortTableName"]       = "dbo_Preferencias";
            tdataArray["dbo_Preferencias"][".nSecOptions"]          = 0;
            tdataArray["dbo_Preferencias"][".mainTableOwnerID"]     = "";
            tdataArray["dbo_Preferencias"][".entityType"]           = 0;
            tdataArray["dbo_Preferencias"][".strOriginalTableName"] = "dbo.Preferencias";
            tdataArray["dbo_Preferencias"][".showAddInPopup"]       = false;
            tdataArray["dbo_Preferencias"][".showEditInPopup"]      = false;
            tdataArray["dbo_Preferencias"][".showViewInPopup"]      = false;
            popupPagesLayoutNames = SettingsMap.GetArray();
            tdataArray["dbo_Preferencias"][".popupPagesLayoutNames"] = popupPagesLayoutNames;
            tdataArray["dbo_Preferencias"][".listAjax"] = false;
            tdataArray["dbo_Preferencias"][".listAjax"] = false;
            tdataArray["dbo_Preferencias"][".audit"]    = true;
            tdataArray["dbo_Preferencias"][".locking"]  = false;
            GlobalVars.pages = tdataArray["dbo_Preferencias"][".pages"];
            if (XVar.Pack(GlobalVars.pages[Constants.PAGE_EDIT]))
            {
                tdataArray["dbo_Preferencias"][".edit"]                    = true;
                tdataArray["dbo_Preferencias"][".afterEditAction"]         = 1;
                tdataArray["dbo_Preferencias"][".closePopupAfterEdit"]     = 1;
                tdataArray["dbo_Preferencias"][".afterEditActionDetTable"] = "";
            }
            if (XVar.Pack(GlobalVars.pages[Constants.PAGE_ADD]))
            {
                tdataArray["dbo_Preferencias"][".add"]                    = true;
                tdataArray["dbo_Preferencias"][".afterAddAction"]         = 1;
                tdataArray["dbo_Preferencias"][".closePopupAfterAdd"]     = 1;
                tdataArray["dbo_Preferencias"][".afterAddActionDetTable"] = "";
            }
            if (XVar.Pack(GlobalVars.pages[Constants.PAGE_LIST]))
            {
                tdataArray["dbo_Preferencias"][".list"] = true;
            }
            tdataArray["dbo_Preferencias"][".strSortControlSettingsJSON"] = "";
            if (XVar.Pack(GlobalVars.pages[Constants.PAGE_VIEW]))
            {
                tdataArray["dbo_Preferencias"][".view"] = true;
            }
            if (XVar.Pack(GlobalVars.pages[Constants.PAGE_IMPORT]))
            {
                tdataArray["dbo_Preferencias"][".import"] = true;
            }
            if (XVar.Pack(GlobalVars.pages[Constants.PAGE_EXPORT]))
            {
                tdataArray["dbo_Preferencias"][".exportTo"] = true;
            }
            if (XVar.Pack(GlobalVars.pages[Constants.PAGE_PRINT]))
            {
                tdataArray["dbo_Preferencias"][".printFriendly"] = true;
            }
            tdataArray["dbo_Preferencias"][".showSimpleSearchOptions"] = true;
            tdataArray["dbo_Preferencias"][".allowShowHideFields"]     = true;
            tdataArray["dbo_Preferencias"][".allowFieldsReordering"]   = true;
            tdataArray["dbo_Preferencias"][".isUseAjaxSuggest"]        = true;
            tdataArray["dbo_Preferencias"][".rowHighlite"]             = true;


            tdataArray["dbo_Preferencias"][".ajaxCodeSnippetAdded"]    = false;
            tdataArray["dbo_Preferencias"][".buttonsAdded"]            = false;
            tdataArray["dbo_Preferencias"][".addPageEvents"]           = false;
            tdataArray["dbo_Preferencias"][".isUseTimeForSearch"]      = false;
            tdataArray["dbo_Preferencias"][".badgeColor"]              = "D2691E";
            tdataArray["dbo_Preferencias"][".allSearchFields"]         = SettingsMap.GetArray();
            tdataArray["dbo_Preferencias"][".filterFields"]            = SettingsMap.GetArray();
            tdataArray["dbo_Preferencias"][".requiredSearchFields"]    = SettingsMap.GetArray();
            tdataArray["dbo_Preferencias"][".tableType"]               = "list";
            tdataArray["dbo_Preferencias"][".printerPageOrientation"]  = 0;
            tdataArray["dbo_Preferencias"][".nPrinterPageScale"]       = 100;
            tdataArray["dbo_Preferencias"][".nPrinterSplitRecords"]    = 40;
            tdataArray["dbo_Preferencias"][".nPrinterPDFSplitRecords"] = 40;
            tdataArray["dbo_Preferencias"][".geocodingEnabled"]        = false;
            tdataArray["dbo_Preferencias"][".pageSize"]         = 20;
            tdataArray["dbo_Preferencias"][".warnLeavingPages"] = true;
            tstrOrderBy = "";
            if (MVCFunctions.strlen(tstrOrderBy) && MVCFunctions.strtolower(MVCFunctions.substr(tstrOrderBy, new XVar(0), new XVar(8))) != "order by")
            {
                tstrOrderBy = MVCFunctions.Concat("order by ", tstrOrderBy);
            }
            tdataArray["dbo_Preferencias"][".strOrderBy"]   = tstrOrderBy;
            tdataArray["dbo_Preferencias"][".orderindexes"] = SettingsMap.GetArray();
            tdataArray["dbo_Preferencias"][".sqlHead"]      = "SELECT ID,  	nombre_jefe,  	division";
            tdataArray["dbo_Preferencias"][".sqlFrom"]      = "FROM dbo.Preferencias";
            tdataArray["dbo_Preferencias"][".sqlWhereExpr"] = "";
            tdataArray["dbo_Preferencias"][".sqlTail"]      = "";
            arrRPP = SettingsMap.GetArray();
            arrRPP.Add(10);
            arrRPP.Add(20);
            arrRPP.Add(30);
            arrRPP.Add(50);
            arrRPP.Add(100);
            arrRPP.Add(500);
            arrRPP.Add(-1);
            tdataArray["dbo_Preferencias"][".arrRecsPerPage"] = arrRPP;
            arrGPP = SettingsMap.GetArray();
            arrGPP.Add(1);
            arrGPP.Add(3);
            arrGPP.Add(5);
            arrGPP.Add(10);
            arrGPP.Add(50);
            arrGPP.Add(100);
            arrGPP.Add(-1);
            tdataArray["dbo_Preferencias"][".arrGroupsPerPage"]       = arrGPP;
            tdataArray["dbo_Preferencias"][".highlightSearchResults"] = true;
            tableKeysArray["dbo_Preferencias"] = SettingsMap.GetArray();
            tableKeysArray["dbo_Preferencias"].Add("ID");
            tdataArray["dbo_Preferencias"][".Keys"]           = tableKeysArray["dbo_Preferencias"];
            tdataArray["dbo_Preferencias"][".hideMobileList"] = SettingsMap.GetArray();
            fdata                                 = SettingsMap.GetArray();
            fdata["Index"]                        = 1;
            fdata["strName"]                      = "ID";
            fdata["GoodName"]                     = "ID";
            fdata["ownerTable"]                   = "dbo.Preferencias";
            fdata["Label"]                        = CommonFunctions.GetFieldLabel("dbo_Preferencias", "ID");
            fdata["FieldType"]                    = 3;
            fdata["AutoInc"]                      = true;
            fdata["strField"]                     = "ID";
            fdata["isSQLExpression"]              = true;
            fdata["FullName"]                     = "ID";
            fdata["UploadFolder"]                 = "files";
            fdata["ViewFormats"]                  = SettingsMap.GetArray();
            vdata                                 = new XVar("ViewFormat", "");
            vdata["NeedEncode"]                   = true;
            fdata["ViewFormats"]["view"]          = vdata;
            fdata["EditFormats"]                  = SettingsMap.GetArray();
            edata                                 = new XVar("EditFormat", "Text field");
            edata["IsRequired"]                   = true;
            edata["acceptFileTypes"]              = ".+$";
            edata["maxNumberOfFiles"]             = 1;
            edata["HTML5InuptType"]               = "text";
            edata["EditParams"]                   = "";
            edata["controlWidth"]                 = 200;
            edata["validateAs"]                   = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"]  = SettingsMap.GetArray();
            edata["validateAs"]["customMessages"] = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"].Add(CommonFunctions.getJsValidatorName(new XVar("Number")));
            edata["validateAs"]["basicValidate"].Add("IsRequired");
            fdata["EditFormats"]["edit"]         = edata;
            fdata["isSeparate"]                  = false;
            fdata["defaultSearchOption"]         = "Contains";
            fdata["searchOptionsList"]           = new XVar(0, "Contains", 1, "Equals", 2, "Starts with", 3, "More than", 4, "Less than", 5, "Between", 6, "Empty", 7, Constants.NOT_EMPTY);
            fdata["filterTotals"]                = 0;
            fdata["filterMultiSelect"]           = 0;
            fdata["filterFormat"]                = "Values list";
            fdata["showCollapsed"]               = false;
            fdata["sortValueType"]               = 0;
            fdata["numberOfVisibleItems"]        = 10;
            tdataArray["dbo_Preferencias"]["ID"] = fdata;
            tdataArray["dbo_Preferencias"][".searchableFields"].Add("ID");
            fdata                                         = SettingsMap.GetArray();
            fdata["Index"]                                = 2;
            fdata["strName"]                              = "nombre_jefe";
            fdata["GoodName"]                             = "nombre_jefe";
            fdata["ownerTable"]                           = "dbo.Preferencias";
            fdata["Label"]                                = CommonFunctions.GetFieldLabel("dbo_Preferencias", "nombre_jefe");
            fdata["FieldType"]                            = 200;
            fdata["strField"]                             = "nombre_jefe";
            fdata["isSQLExpression"]                      = true;
            fdata["FullName"]                             = "nombre_jefe";
            fdata["UploadFolder"]                         = "files";
            fdata["ViewFormats"]                          = SettingsMap.GetArray();
            vdata                                         = new XVar("ViewFormat", "");
            vdata["NeedEncode"]                           = true;
            fdata["ViewFormats"]["view"]                  = vdata;
            fdata["EditFormats"]                          = SettingsMap.GetArray();
            edata                                         = new XVar("EditFormat", "Text field");
            edata["acceptFileTypes"]                      = ".+$";
            edata["maxNumberOfFiles"]                     = 1;
            edata["HTML5InuptType"]                       = "text";
            edata["EditParams"]                           = "";
            edata["EditParams"]                           = MVCFunctions.Concat(edata["EditParams"], " maxlength=50");
            edata["controlWidth"]                         = 200;
            edata["validateAs"]                           = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"]          = SettingsMap.GetArray();
            edata["validateAs"]["customMessages"]         = SettingsMap.GetArray();
            fdata["EditFormats"]["edit"]                  = edata;
            fdata["isSeparate"]                           = false;
            fdata["defaultSearchOption"]                  = "Contains";
            fdata["searchOptionsList"]                    = new XVar(0, "Contains", 1, "Equals", 2, "Starts with", 3, "More than", 4, "Less than", 5, "Between", 6, "Empty", 7, Constants.NOT_EMPTY);
            fdata["filterTotals"]                         = 0;
            fdata["filterMultiSelect"]                    = 0;
            fdata["filterFormat"]                         = "Values list";
            fdata["showCollapsed"]                        = false;
            fdata["sortValueType"]                        = 0;
            fdata["numberOfVisibleItems"]                 = 10;
            tdataArray["dbo_Preferencias"]["nombre_jefe"] = fdata;
            tdataArray["dbo_Preferencias"][".searchableFields"].Add("nombre_jefe");
            fdata                                      = SettingsMap.GetArray();
            fdata["Index"]                             = 3;
            fdata["strName"]                           = "division";
            fdata["GoodName"]                          = "division";
            fdata["ownerTable"]                        = "dbo.Preferencias";
            fdata["Label"]                             = CommonFunctions.GetFieldLabel("dbo_Preferencias", "division");
            fdata["FieldType"]                         = 200;
            fdata["strField"]                          = "division";
            fdata["isSQLExpression"]                   = true;
            fdata["FullName"]                          = "division";
            fdata["UploadFolder"]                      = "files";
            fdata["ViewFormats"]                       = SettingsMap.GetArray();
            vdata                                      = new XVar("ViewFormat", "");
            vdata["NeedEncode"]                        = true;
            fdata["ViewFormats"]["view"]               = vdata;
            fdata["EditFormats"]                       = SettingsMap.GetArray();
            edata                                      = new XVar("EditFormat", "Text field");
            edata["acceptFileTypes"]                   = ".+$";
            edata["maxNumberOfFiles"]                  = 1;
            edata["HTML5InuptType"]                    = "text";
            edata["EditParams"]                        = "";
            edata["EditParams"]                        = MVCFunctions.Concat(edata["EditParams"], " maxlength=100");
            edata["controlWidth"]                      = 200;
            edata["validateAs"]                        = SettingsMap.GetArray();
            edata["validateAs"]["basicValidate"]       = SettingsMap.GetArray();
            edata["validateAs"]["customMessages"]      = SettingsMap.GetArray();
            fdata["EditFormats"]["edit"]               = edata;
            fdata["isSeparate"]                        = false;
            fdata["defaultSearchOption"]               = "Contains";
            fdata["searchOptionsList"]                 = new XVar(0, "Contains", 1, "Equals", 2, "Starts with", 3, "More than", 4, "Less than", 5, "Between", 6, "Empty", 7, Constants.NOT_EMPTY);
            fdata["filterTotals"]                      = 0;
            fdata["filterMultiSelect"]                 = 0;
            fdata["filterFormat"]                      = "Values list";
            fdata["showCollapsed"]                     = false;
            fdata["sortValueType"]                     = 0;
            fdata["numberOfVisibleItems"]              = 10;
            tdataArray["dbo_Preferencias"]["division"] = fdata;
            tdataArray["dbo_Preferencias"][".searchableFields"].Add("division");
            GlobalVars.tables_data["dbo.Preferencias"]       = tdataArray["dbo_Preferencias"];
            GlobalVars.field_labels["dbo_Preferencias"]      = fieldLabelsArray["dbo_Preferencias"];
            GlobalVars.fieldToolTips["dbo_Preferencias"]     = fieldToolTipsArray["dbo_Preferencias"];
            GlobalVars.placeHolders["dbo_Preferencias"]      = placeHoldersArray["dbo_Preferencias"];
            GlobalVars.page_titles["dbo_Preferencias"]       = pageTitlesArray["dbo_Preferencias"];
            GlobalVars.detailsTablesData["dbo.Preferencias"] = SettingsMap.GetArray();
            GlobalVars.masterTablesData["dbo.Preferencias"]  = SettingsMap.GetArray();

            SQLEntity obj        = null;
            var       protoArray = SettingsMap.GetArray();

            protoArray["0"] = SettingsMap.GetArray();
            protoArray["0"]["m_strHead"]      = "SELECT";
            protoArray["0"]["m_strFieldList"] = "ID,  	nombre_jefe,  	division";
            protoArray["0"]["m_strFrom"]      = "FROM dbo.Preferencias";
            protoArray["0"]["m_strWhere"]     = "";
            protoArray["0"]["m_strOrderBy"]   = "";


            protoArray["0"]["cipherer"]    = null;
            protoArray["2"]                = SettingsMap.GetArray();
            protoArray["2"]["m_sql"]       = "";
            protoArray["2"]["m_uniontype"] = "SQLL_UNKNOWN";
            obj = new SQLNonParsed(new XVar("m_sql", ""));

            protoArray["2"]["m_column"]     = obj;
            protoArray["2"]["m_contained"]  = SettingsMap.GetArray();
            protoArray["2"]["m_strCase"]    = "";
            protoArray["2"]["m_havingmode"] = false;
            protoArray["2"]["m_inBrackets"] = false;
            protoArray["2"]["m_useAlias"]   = false;
            obj = new SQLLogicalExpr(protoArray["2"]);

            protoArray["0"]["m_where"]     = obj;
            protoArray["4"]                = SettingsMap.GetArray();
            protoArray["4"]["m_sql"]       = "";
            protoArray["4"]["m_uniontype"] = "SQLL_UNKNOWN";
            obj = new SQLNonParsed(new XVar("m_sql", ""));

            protoArray["4"]["m_column"]     = obj;
            protoArray["4"]["m_contained"]  = SettingsMap.GetArray();
            protoArray["4"]["m_strCase"]    = "";
            protoArray["4"]["m_havingmode"] = false;
            protoArray["4"]["m_inBrackets"] = false;
            protoArray["4"]["m_useAlias"]   = false;
            obj = new SQLLogicalExpr(protoArray["4"]);

            protoArray["0"]["m_having"]    = obj;
            protoArray["0"]["m_fieldlist"] = SettingsMap.GetArray();
            protoArray["6"] = SettingsMap.GetArray();
            obj             = new SQLField(new XVar("m_strName", "ID", "m_strTable", "dbo.Preferencias", "m_srcTableName", "dbo.Preferencias"));

            protoArray["6"]["m_sql"]          = "ID";
            protoArray["6"]["m_srcTableName"] = "dbo.Preferencias";
            protoArray["6"]["m_expr"]         = obj;
            protoArray["6"]["m_alias"]        = "";
            obj = new SQLFieldListItem(protoArray["6"]);

            protoArray["0"]["m_fieldlist"].Add(obj);
            protoArray["8"] = SettingsMap.GetArray();
            obj             = new SQLField(new XVar("m_strName", "nombre_jefe", "m_strTable", "dbo.Preferencias", "m_srcTableName", "dbo.Preferencias"));

            protoArray["8"]["m_sql"]          = "nombre_jefe";
            protoArray["8"]["m_srcTableName"] = "dbo.Preferencias";
            protoArray["8"]["m_expr"]         = obj;
            protoArray["8"]["m_alias"]        = "";
            obj = new SQLFieldListItem(protoArray["8"]);

            protoArray["0"]["m_fieldlist"].Add(obj);
            protoArray["10"] = SettingsMap.GetArray();
            obj = new SQLField(new XVar("m_strName", "division", "m_strTable", "dbo.Preferencias", "m_srcTableName", "dbo.Preferencias"));

            protoArray["10"]["m_sql"]          = "division";
            protoArray["10"]["m_srcTableName"] = "dbo.Preferencias";
            protoArray["10"]["m_expr"]         = obj;
            protoArray["10"]["m_alias"]        = "";
            obj = new SQLFieldListItem(protoArray["10"]);

            protoArray["0"]["m_fieldlist"].Add(obj);
            protoArray["0"]["m_fromlist"] = SettingsMap.GetArray();
            protoArray["12"]                   = SettingsMap.GetArray();
            protoArray["12"]["m_link"]         = "SQLL_MAIN";
            protoArray["13"]                   = SettingsMap.GetArray();
            protoArray["13"]["m_strName"]      = "dbo.Preferencias";
            protoArray["13"]["m_srcTableName"] = "dbo.Preferencias";
            protoArray["13"]["m_columns"]      = SettingsMap.GetArray();
            protoArray["13"]["m_columns"].Add("nombre_jefe");
            protoArray["13"]["m_columns"].Add("division");
            protoArray["13"]["m_columns"].Add("ID");
            obj = new SQLTable(protoArray["13"]);

            protoArray["12"]["m_table"]        = obj;
            protoArray["12"]["m_sql"]          = "dbo.Preferencias";
            protoArray["12"]["m_alias"]        = "";
            protoArray["12"]["m_srcTableName"] = "dbo.Preferencias";
            protoArray["14"]                = SettingsMap.GetArray();
            protoArray["14"]["m_sql"]       = "";
            protoArray["14"]["m_uniontype"] = "SQLL_UNKNOWN";
            obj = new SQLNonParsed(new XVar("m_sql", ""));

            protoArray["14"]["m_column"]     = obj;
            protoArray["14"]["m_contained"]  = SettingsMap.GetArray();
            protoArray["14"]["m_strCase"]    = "";
            protoArray["14"]["m_havingmode"] = false;
            protoArray["14"]["m_inBrackets"] = false;
            protoArray["14"]["m_useAlias"]   = false;
            obj = new SQLLogicalExpr(protoArray["14"]);

            protoArray["12"]["m_joinon"] = obj;
            obj = new SQLFromListItem(protoArray["12"]);

            protoArray["0"]["m_fromlist"].Add(obj);
            protoArray["0"]["m_groupby"]      = SettingsMap.GetArray();
            protoArray["0"]["m_orderby"]      = SettingsMap.GetArray();
            protoArray["0"]["m_srcTableName"] = "dbo.Preferencias";
            obj = new SQLQuery(protoArray["0"]);

            queryData_Array["dbo_Preferencias"] = obj;



            tdataArray["dbo_Preferencias"][".sqlquery"]  = queryData_Array["dbo_Preferencias"];
            GlobalVars.tableEvents["dbo.Preferencias"]   = new eventsBase();
            tdataArray["dbo_Preferencias"][".hasEvents"] = false;
            GlobalVars.tables_data["dbo_Preferencias"]   = tdataArray["dbo_Preferencias"];
        }
예제 #18
0
        public void SQLiteDB_BeginTransaction_RollBack_void_ret_void()
        {
            #region Prepara

            EntityDemo entity1 = new EntityDemo
            {
                Clave1 = "Key1Get01",
                Clave2 = "Key1Get02",
                Campo1 = "Field1Get01",
                Campo2 = "Field1Get02",
                Campo3 = "Field1Get03"
            };
            EntityDemo entity2 = new EntityDemo
            {
                Clave1 = "Key2Get01",
                Clave2 = "Key2Get02",
                Campo1 = "Field2Get01",
                Campo2 = "Field2Get02",
                Campo3 = "Field2Get03"
            };
            EntityDemo entity3 = new EntityDemo
            {
                Clave1 = "Key3Get01",
                Clave2 = "Key3Get02",
                Campo1 = "Field3Get01",
                Campo2 = "Field3Get02",
                Campo3 = "Field3Get03"
            };
            IDataBase db = null;
            try
            {
                db = new SQLiteDB("TestDB");
                db.Open();
                SQLTable <EntityDemo> table = new SQLTable <EntityDemo> {
                    DB = db
                };
                table.DeleteAll();
            }
            catch (Exception)
            {
            }
            finally
            {
                db.Close();
            }

            #endregion

            // Ejecuta
            IDataBase dbTran = new SQLiteDB("TestDB");
            dbTran.Open();
            SQLTable <EntityDemo> tableTran = new SQLTable <EntityDemo> {
                DB = dbTran
            };
            tableTran.Insert(entity1);
            tableTran.Insert(entity2);
            dbTran.BeginTransaction();
            tableTran.Insert(entity3);
            dbTran.RollBack();
            dbTran.Close();

            // Comprueba
            dbTran.Open();
            EntityDemo[] entityGets = tableTran.GetAll();
            dbTran.Close();
            Assert.IsNotNull(entityGets);
            Assert.AreEqual(2, entityGets.Length);
            Assert.AreEqual("Key1Get01", entityGets[0].Clave1);
            Assert.AreEqual("Key1Get02", entityGets[0].Clave2);
            Assert.AreEqual("Field1Get01", entityGets[0].Campo1);
            Assert.AreEqual("Field1Get02", entityGets[0].Campo2);
            Assert.AreEqual("Field1Get03", entityGets[0].Campo3);
            Assert.AreEqual("Key2Get01", entityGets[1].Clave1);
            Assert.AreEqual("Key2Get02", entityGets[1].Clave2);
            Assert.AreEqual("Field2Get01", entityGets[1].Campo1);
            Assert.AreEqual("Field2Get02", entityGets[1].Campo2);
            Assert.AreEqual("Field2Get03", entityGets[1].Campo3);
        }