Exemple #1
0
        internal DOMAIN GetDomain(int id)
        {
            var domain = new DOMAIN();

            using (var connection = MySqlDbConnection.NewConnection)
            {
                _statement = string.Format(MySQLquery.GetDomain, id);
                using (var command = MySqlDbConnection.Command(connection, _statement))
                {
                    using (var reader = command.ExecuteReader())
                    {
                        if (reader.HasRows)
                        {
                            while (reader.Read())
                            {
                                domain.DOM_ID      = UtilityDL.CheckNull <int>(reader["DOM_ID"]);
                                domain.NAME        = UtilityDL.CheckNull <string>(reader["NAME"]);
                                domain.DESCRIPTION = UtilityDL.CheckNull <string>(reader["DESCRIPTION"]);
                                domain.ORGL_STAMP  = UtilityDL.CheckNull <DateTime>(reader["ORGL_STAMP"]);
                                domain.ORGL_USER   = UtilityDL.CheckNull <string>(reader["ORGL_USER"]);
                                domain.UPDT_STAMP  = UtilityDL.CheckNull <DateTime>(reader["UPDT_STAMP"]);
                                domain.UPDT_USER   = UtilityDL.CheckNull <string>(reader["UPDT_USER"]);
                                domain.DEL_FLG     = UtilityDL.CheckNull <string>(reader["DEL_FLG"]);
                            }
                        }
                    }
                }
            }

            return(domain);
        }
        internal List <DOCUMENT_MASTER> GetDocumentMaster(int id)
        {
            var documentMaster = new List <DOCUMENT_MASTER>();
            var document       = new DOCUMENT_MASTER();

            using (var connection = MySqlDbConnection.NewConnection)
            {
                _statement = string.Format(MySQLquery.GetDocumentMaster, id);
                using (var command = MySqlDbConnection.Command(connection, _statement))
                {
                    using (var reader = command.ExecuteReader())
                    {
                        if (reader.HasRows)
                        {
                            while (reader.Read())
                            {
                                document.DM_ID      = UtilityDL.CheckNull <int>(reader["DM_ID"]);
                                document.SUB_DOM_ID = UtilityDL.CheckNull <int>(reader["SUB_DOM_ID"]);
                                document.CONTENT    = UtilityDL.CheckNull <string>(reader["CONTENT"]);

                                documentMaster.Add(document);
                            }
                        }
                    }
                }
            }

            return(documentMaster);
        }
Exemple #3
0
        internal List <QUESTION_ITEM> GetQuestionItem(int sqcId)
        {
            var QuestionItem = new List <QUESTION_ITEM>();

            using (var connection = MySqlDbConnection.NewConnection)
            {
                _statement = string.Format(MySQLquery.GetQuestionItem,
                                           sqcId > 0 ? Convert.ToString(sqcId) : "SQC_ID");
                //sqcId);
                using (var command = MySqlDbConnection.Command(connection, _statement))
                {
                    using (var reader = command.ExecuteReader())
                    {
                        if (reader.HasRows)
                        {
                            while (reader.Read())
                            {
                                var questItem = new QUESTION_ITEM();

                                questItem.QI_ID       = UtilityDL.CheckNull <int>(reader["QI_ID"]);
                                questItem.SQC_ID      = UtilityDL.CheckNull <int>(reader["SQC_ID"]);
                                questItem.QC_ID       = UtilityDL.CheckNull <int>(reader["QC_ID"]);
                                questItem.DOM_ID      = UtilityDL.CheckNull <int>(reader["DOM_ID"]);
                                questItem.SUB_DOM_ID  = UtilityDL.CheckNull <int>(reader["SUB_DOM_ID"]);
                                questItem.NAME        = UtilityDL.CheckNull <string>(reader["NAME"]);
                                questItem.DESCRIPTION = UtilityDL.CheckNull <string>(reader["DESCRIPTION"]);
                                questItem.SEQ_NO      = UtilityDL.CheckNull <int>(reader["SEQ_NO"]);


                                questItem.ORGL_STAMP = UtilityDL.CheckNull <DateTime>(reader["ORGL_STAMP"]);
                                questItem.ORGL_USER  = UtilityDL.CheckNull <string>(reader["ORGL_USER"]);
                                questItem.UPDT_STAMP = UtilityDL.CheckNull <DateTime>(reader["UPDT_STAMP"]);
                                questItem.UPDT_USER  = UtilityDL.CheckNull <string>(reader["UPDT_USER"]);
                                questItem.DEL_FLG    = UtilityDL.CheckNull <string>(reader["DEL_FLG"]);

                                QuestionItem.Add(questItem);
                            }
                        }
                    }
                }

                return(QuestionItem);
            }
        }
        internal List <SUB_QUESTION_CATEGORY> GetSubQuestionCategory(int qcId)
        {
            var SubQuestionCategory = new List <SUB_QUESTION_CATEGORY>();

            using (var connection = MySqlDbConnection.NewConnection)
            {
                _statement = string.Format(MySQLquery.GetSubQuestionCat,
                                           qcId > 0 ? Convert.ToString(qcId) : "QC_ID");
                //qcId);
                using (var command = MySqlDbConnection.Command(connection, _statement))
                {
                    using (var reader = command.ExecuteReader())
                    {
                        if (reader.HasRows)
                        {
                            while (reader.Read())
                            {
                                var subQuestCat = new SUB_QUESTION_CATEGORY();

                                subQuestCat.SQC_ID      = UtilityDL.CheckNull <int>(reader["SQC_ID"]);
                                subQuestCat.QC_ID       = UtilityDL.CheckNull <int>(reader["QC_ID"]);
                                subQuestCat.DOM_ID      = UtilityDL.CheckNull <int>(reader["DOM_ID"]);
                                subQuestCat.SUB_DOM_ID  = UtilityDL.CheckNull <int>(reader["SUB_DOM_ID"]);
                                subQuestCat.NAME        = UtilityDL.CheckNull <string>(reader["NAME"]);
                                subQuestCat.DESCRIPTION = UtilityDL.CheckNull <string>(reader["DESCRIPTION"]);
                                subQuestCat.SEQ_NO      = UtilityDL.CheckNull <int>(reader["SEQ_NO"]);

                                subQuestCat.ORGL_STAMP = UtilityDL.CheckNull <DateTime>(reader["ORGL_STAMP"]);
                                subQuestCat.ORGL_USER  = UtilityDL.CheckNull <string>(reader["ORGL_USER"]);
                                subQuestCat.UPDT_STAMP = UtilityDL.CheckNull <DateTime>(reader["UPDT_STAMP"]);
                                subQuestCat.UPDT_USER  = UtilityDL.CheckNull <string>(reader["UPDT_USER"]);
                                subQuestCat.DEL_FLG    = UtilityDL.CheckNull <string>(reader["DEL_FLG"]);

                                SubQuestionCategory.Add(subQuestCat);
                            }
                        }
                    }
                }

                return(SubQuestionCategory);
            }
        }
        internal List <CONTROL_MASTER> GetAllControlMaster()
        {
            var ControlMaster = new List <CONTROL_MASTER>();

            using (var connection = MySqlDbConnection.NewConnection)
            {
                _statement = string.Format(MySQLquery.GetControlMaster);
                using (var command = MySqlDbConnection.Command(connection, _statement))
                {
                    using (var reader = command.ExecuteReader())
                    {
                        if (reader.HasRows)
                        {
                            while (reader.Read())
                            {
                                var controlMas = new CONTROL_MASTER();

                                controlMas.CM_ID       = UtilityDL.CheckNull <int>(reader["CM_ID"]);
                                controlMas.CONTROL_TYP = UtilityDL.CheckNull <string>(reader["CONTROL_TYP"]);
                                controlMas.NAME        = UtilityDL.CheckNull <string>(reader["NAME"]);
                                controlMas.LABEL       = UtilityDL.CheckNull <string>(reader["LABEL"]);
                                controlMas.SAMPLE_PIC  = UtilityDL.CheckNull <string>(reader["SAMPLE_PIC"]);
                                controlMas.ORGL_STAMP  = UtilityDL.CheckNull <DateTime>(reader["ORGL_STAMP"]);
                                controlMas.ORGL_USER   = UtilityDL.CheckNull <string>(reader["ORGL_USER"]);
                                controlMas.UPDT_STAMP  = UtilityDL.CheckNull <DateTime>(reader["UPDT_STAMP"]);
                                controlMas.UPDT_USER   = UtilityDL.CheckNull <string>(reader["UPDT_USER"]);
                                controlMas.DEL_FLG     = UtilityDL.CheckNull <string>(reader["DEL_FLG"]);

                                ControlMaster.Add(controlMas);
                            }
                        }
                    }
                }

                return(ControlMaster);
            }
        }
Exemple #6
0
        internal List <SUB_DOMAIN> GetAllSubDomains()
        {
            var subDomains = new List <SUB_DOMAIN>();

            using (var connection = MySqlDbConnection.NewConnection)
            {
                _statement = string.Format(MySQLquery.GetAllSubDomain);
                using (var command = MySqlDbConnection.Command(connection, _statement)) // MySQLquery.GetAllSubDomain))
                {
                    using (var reader = command.ExecuteReader())
                    {
                        if (reader.HasRows)
                        {
                            while (reader.Read())
                            {
                                var subDomain = new SUB_DOMAIN();

                                subDomain.SUB_DOM_ID  = UtilityDL.CheckNull <int>(reader["SUB_DOM_ID"]);
                                subDomain.DOM_ID      = UtilityDL.CheckNull <int>(reader["DOM_ID"]);
                                subDomain.NAME        = UtilityDL.CheckNull <string>(reader["NAME"]);
                                subDomain.DESCRIPTION = UtilityDL.CheckNull <string>(reader["DESCRIPTION"]);
                                subDomain.ORGL_STAMP  = UtilityDL.CheckNull <DateTime>(reader["ORGL_STAMP"]);
                                subDomain.ORGL_USER   = UtilityDL.CheckNull <string>(reader["ORGL_USER"]);
                                subDomain.UPDT_STAMP  = UtilityDL.CheckNull <DateTime>(reader["UPDT_STAMP"]);
                                subDomain.UPDT_USER   = UtilityDL.CheckNull <string>(reader["UPDT_USER"]);
                                subDomain.DEL_FLG     = UtilityDL.CheckNull <string>(reader["DEL_FLG"]);

                                subDomains.Add(subDomain);
                            }
                        }
                    }
                }
            }

            return(subDomains);
        }
Exemple #7
0
        internal List <QUESTION_CONTROL_AND_CONTROL_MASTER> GetQuestionControlAndMaster(int qiId)
        {
            var QuestionControlAndMaster = new List <QUESTION_CONTROL_AND_CONTROL_MASTER>();

            using (var connection = MySqlDbConnection.NewConnection)
            {
                _statement = string.Format(MySQLquery.GetQuestionControlAndMaster,
                                           qiId > 0 ? Convert.ToString(qiId) : "QI_ID");
                //qiId);
                using (var command = MySqlDbConnection.Command(connection, _statement))
                {
                    using (var reader = command.ExecuteReader())
                    {
                        if (reader.HasRows)
                        {
                            while (reader.Read())
                            {
                                var questControlMaster = new QUESTION_CONTROL_AND_CONTROL_MASTER();

                                questControlMaster.QCT_ID = UtilityDL.CheckNull <int>(reader["QCT_ID"]);
                                questControlMaster.QI_ID  = UtilityDL.CheckNull <int>(reader["QI_ID"]);
                                questControlMaster.SQC_ID = UtilityDL.CheckNull <int>(reader["SQC_ID"]);
                                questControlMaster.QC_ID  = UtilityDL.CheckNull <int>(reader["QC_ID"]);

                                questControlMaster.DOM_ID = UtilityDL.CheckNull <int>(reader["DOM_ID"]);

                                questControlMaster.SUB_DOM_ID = UtilityDL.CheckNull <int>(reader["SUB_DOM_ID"]);

                                questControlMaster.NAME = UtilityDL.CheckNull <string>(reader["NAME"]);

                                questControlMaster.LABEL = UtilityDL.CheckNull <string>(reader["LABEL"]);

                                questControlMaster.HINT = UtilityDL.CheckNull <string>(reader["HINT"]);

                                questControlMaster.OTHDESC = UtilityDL.CheckNull <string>(reader["OTHDESC"]);

                                questControlMaster.LISTOFVAL = UtilityDL.CheckNull <string>(reader["LISTOFVAL"]);

                                questControlMaster.CONTROL_ID = UtilityDL.CheckNull <int>(reader["CONTROL_ID"]);

                                questControlMaster.SEQ_NO = UtilityDL.CheckNull <int>(reader["SEQ_NO"]);



                                questControlMaster.CONTROL_TYP = UtilityDL.CheckNull <string>(reader["CONTROL_TYP"]);

                                questControlMaster.CONTROL_NAME = UtilityDL.CheckNull <string>(reader["CONTROL_NAME"]);

                                questControlMaster.CONTROL_LABEL = UtilityDL.CheckNull <string>(reader["CONTROL_LABEL"]);

                                questControlMaster.SAMPLE_PIC = UtilityDL.CheckNull <string>(reader["SAMPLE_PIC"]);



                                QuestionControlAndMaster.Add(questControlMaster);
                            }
                        }
                    }
                }

                return(QuestionControlAndMaster);
            }
        }
Exemple #8
0
        internal List <QUESTION_CONTROL> GetQuestionControl(int qiId)
        {
            var QuestionControl = new List <QUESTION_CONTROL>();

            using (var connection = MySqlDbConnection.NewConnection)
            {
                _statement = string.Format(MySQLquery.GetQuestionControl,
                                           qiId > 0 ? Convert.ToString(qiId) : "QI_ID");
                //qiId);
                using (var command = MySqlDbConnection.Command(connection, _statement))
                {
                    using (var reader = command.ExecuteReader())
                    {
                        if (reader.HasRows)
                        {
                            while (reader.Read())
                            {
                                var questControl = new QUESTION_CONTROL();

                                questControl.QCT_ID = UtilityDL.CheckNull <int>(reader["QCT_ID"]);
                                questControl.QI_ID  = UtilityDL.CheckNull <int>(reader["QI_ID"]);
                                questControl.SQC_ID = UtilityDL.CheckNull <int>(reader["SQC_ID"]);
                                questControl.QC_ID  = UtilityDL.CheckNull <int>(reader["QC_ID"]);

                                questControl.DOM_ID = UtilityDL.CheckNull <int>(reader["DOM_ID"]);

                                questControl.SUB_DOM_ID = UtilityDL.CheckNull <int>(reader["SUB_DOM_ID"]);

                                questControl.NAME = UtilityDL.CheckNull <string>(reader["NAME"]);

                                questControl.LABEL = UtilityDL.CheckNull <string>(reader["LABEL"]);

                                questControl.HINT = UtilityDL.CheckNull <string>(reader["HINT"]);

                                questControl.OTHDESC = UtilityDL.CheckNull <string>(reader["OTHDESC"]);

                                questControl.LISTOFVAL = UtilityDL.CheckNull <string>(reader["LISTOFVAL"]);

                                questControl.CONTROL_ID = UtilityDL.CheckNull <int>(reader["CONTROL_ID"]);

                                questControl.SEQ_NO = UtilityDL.CheckNull <int>(reader["SEQ_NO"]);

                                questControl.DEL_FLG = UtilityDL.CheckNull <string>(reader["DEL_FLG"]);

                                questControl.ORGL_USER = UtilityDL.CheckNull <string>(reader["ORGL_USER"]);

                                questControl.ORGL_STAMP = UtilityDL.CheckNull <DateTime>(reader["ORGL_STAMP"]);

                                questControl.UPDT_USER = UtilityDL.CheckNull <string>(reader["UPDT_USER"]);

                                questControl.UPDT_STAMP = UtilityDL.CheckNull <DateTime>(reader["UPDT_STAMP"]);

                                QuestionControl.Add(questControl);
                            }
                        }
                    }
                }

                return(QuestionControl);
            }
        }