Example #1
0
        public Dictionary.DropView DROP_Dictionary_View(IConnectToDB _Connect, string ViewName)
        {
            List <DBParameters> EntryProcedureParameters = new List <DBParameters>();

            ER_Query.Parameter_Run SQlin = new ER_Query.Parameter_Run
            {
                sqlIn         = "Select * from CSA.ER_VIEWS where UPPER(VIEW_NAME) = @VIEW_NAME",
                _dbParameters = new List <DBParameters> {
                    new DBParameters {
                        ParamName = "VIEW_NAME", MSSqlParamDataType = SqlDbType.VarChar, ParamValue = ViewName.ToUpper()
                    }
                }
            };

            DataTable            _DT = ER_Query._RUN_PARAMETER_QUERY(_Connect, SQlin);
            DataColumnCollection DCC = _DT.Columns;

            Dictionary.DropView thisModel = new Dictionary.DropView();

            if (_DT.Rows.Count > 0 && DCC.Contains("ER_VIEWS_ID"))
            {
                thisModel = new Dictionary.DropView {
                    I_ER_VIEWS_ID = _DT.Rows[0].Field <long?>("ER_VIEWS_ID")
                };
                Universal_Call <Dictionary.DropView> dv = new Universal_Call <Dictionary.DropView>();
                thisModel = dv.GenericInputProcedure(_Connect, thisModel);
            }

            return(thisModel);
        }
Example #2
0
        public Dictionary.AddIndex ADD_Dictionary_Index(IConnectToDB _Connect, Dictionary.AddIndex thisModel) //, string index_name, string index_type, string source_name, string source_type
        {
            Universal_Call <Dictionary.AddIndex> _uFKKey = new Universal_Call <Dictionary.AddIndex>();

            thisModel = _uFKKey.GenericInputProcedure(_Connect, thisModel);

            return(thisModel);
        }
Example #3
0
        public Dictionary.AddView ADD_Dictionary_View(IConnectToDB _Connect, Dictionary.AddView thisModel) //, string ViewName, string ViewType, string VIEWDATA
        {
            Universal_Call <Dictionary.AddView> _uFKKey = new Universal_Call <Dictionary.AddView>();

            thisModel = _uFKKey.GenericInputProcedure(_Connect, thisModel);

            return(thisModel);
        }
Example #4
0
        public Dictionary.AddUniqueKeyColumn ADD_Dictionary_UK_Column(IConnectToDB _Connect, Dictionary.AddUniqueKeyColumn thisModel)
        {
            Universal_Call <Dictionary.AddUniqueKeyColumn> _uFKKey = new Universal_Call <Dictionary.AddUniqueKeyColumn>();

            thisModel = _uFKKey.GenericInputProcedure(_Connect, thisModel);

            return(thisModel);
        }
Example #5
0
        public Dictionary.AddPrimaryKeyColumns ADD_Dictionary_PK_Columns(IConnectToDB _Connect, Dictionary.AddPrimaryKeyColumns thisModel)
        {
            Universal_Call <Dictionary.AddPrimaryKeyColumns> universalCall = new Universal_Call <Dictionary.AddPrimaryKeyColumns>();

            thisModel = universalCall.GenericInputProcedure(_Connect, thisModel);

            return(thisModel);
        }
Example #6
0
        public Dictionary.AddTable ADD_Dictionary_Table(IConnectToDB _Connect, Dictionary.AddTable thisModel)
        {
            Universal_Call <Dictionary.AddTable> universalCall = new Universal_Call <Dictionary.AddTable>();

            thisModel = universalCall.GenericInputProcedure(_Connect, thisModel);

            return(thisModel);
        }
Example #7
0
        public RevampNucleus.AddOwnerSeed ADD_Owner_Seed(IConnectToDB _Connect, RevampNucleus.AddOwnerSeed thisModel)
        {
            Universal_Call <RevampNucleus.AddOwnerSeed> universalCall = new Universal_Call <RevampNucleus.AddOwnerSeed>();

            thisModel = universalCall.GenericInputProcedure(_Connect, thisModel);

            return(thisModel);
        }
Example #8
0
        public Dictionary.AddUniqueKey ADD_Dictionary_UK(IConnectToDB _Connect, Dictionary.AddUniqueKey thisModel)
        {
            Universal_Call <Dictionary.AddUniqueKey> _uFKKey = new Universal_Call <Dictionary.AddUniqueKey>();

            thisModel = _uFKKey.GenericInputProcedure(_Connect, thisModel);

            if (thisModel.O_ER_UNIQUE_KEYS_ID > 0 && thisModel.V_UK_ColumnsList1 != null)
            {
                foreach (Dictionary.AddUniqueKeyColumn i in thisModel.V_UK_ColumnsList1)
                {
                    i.I_ER_UNIQUE_KEYS_ID = thisModel.O_ER_UNIQUE_KEYS_ID;
                    ADD_Dictionary_UK_Column(_Connect, i);
                }
            }

            return(thisModel);
        }
Example #9
0
        public Dictionary.AddForeignKey ADD_Dictionary_FK(IConnectToDB _Connect, Dictionary.AddForeignKey thisModel)
        {
            Universal_Call <Dictionary.AddForeignKey> _uFKKey = new Universal_Call <Dictionary.AddForeignKey>();

            thisModel = _uFKKey.GenericInputProcedure(_Connect, thisModel);

            if (thisModel.O_ER_FOREIGN_KEYS_ID > 0)
            {
                foreach (Dictionary.AddForeignKeyColumn i in thisModel.V_FK_ColumnsList1)
                {
                    i.I_ER_FOREIGN_KEYS_ID = thisModel.O_ER_FOREIGN_KEYS_ID;
                    ADD_Dictionary_FK_Column(_Connect, i);
                }
            }

            return(thisModel);
        }
Example #10
0
        public Dictionary.AddPrimaryKey ADD_Dictionary_PK(IConnectToDB _Connect, Dictionary.AddPrimaryKey thisModel)
        {
            Universal_Call <Dictionary.AddPrimaryKey> universalCall = new Universal_Call <Dictionary.AddPrimaryKey>();

            thisModel = universalCall.GenericInputProcedure(_Connect, thisModel);

            if (thisModel.O_ER_PRIMARY_KEYS_ID > 0)
            {
                for (int i = 0; i < thisModel.Columns.Count; i++)
                {
                    thisModel.Columns[i].I_ER_PRIMARY_KEYS_ID = thisModel.O_ER_PRIMARY_KEYS_ID;
                    thisModel.Columns[i] = ADD_Dictionary_PK_Columns(_Connect, thisModel.Columns[i]);
                }
            }

            return(thisModel);
        }