示例#1
0
        /// <summary>
        /// To LoadMNEGoalElement
        /// </summary>
        /// <returns></returns>
        public MNEGoalElementList LoadMNEGoalElement()
        {
            string           con = AppConfiguration.ConnectionString;
            OracleConnection cnn;
            OracleCommand    cmd;
            string           proc = string.Empty;

            cnn             = new OracleConnection(AppConfiguration.ConnectionString);
            proc            = "USP_LOAD_MNEGOALELEMENTS";
            cmd             = new OracleCommand(proc, cnn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output;
            cmd.Connection.Open();
            OracleDataReader   dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            MNEGoalElementBOL  objMNEGoalElementBOL = null;
            MNEGoalElementList MNEGoalEvalElements  = new MNEGoalElementList();

            while (dr.Read())
            {
                objMNEGoalElementBOL = new MNEGoalElementBOL();
                if (!dr.IsDBNull(dr.GetOrdinal("ID")))
                {
                    objMNEGoalElementBOL.GoalElementID = dr.GetInt32(dr.GetOrdinal("ID"));
                }
                if (!dr.IsDBNull(dr.GetOrdinal("Name")))
                {
                    objMNEGoalElementBOL.GoalElement = dr.GetString(dr.GetOrdinal("Name"));
                }

                MNEGoalEvalElements.Add(objMNEGoalElementBOL);
            }
            dr.Close();
            return(MNEGoalEvalElements);
        }
示例#2
0
        /// <summary>
        /// To Get All MNE Goal Element Details
        /// </summary>
        /// <returns></returns>
        public MNEGoalElementList GetAllMNEGoalElementDetails()
        {
            OracleConnection cnn = new OracleConnection(AppConfiguration.ConnectionString);
            OracleCommand    cmd;
            string           proc = " USP_MST_MNE_GET_ALLELEMENTS ";


            cmd             = new OracleCommand(proc, cnn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("Sp_recordset", OracleDbType.RefCursor).Direction = ParameterDirection.Output;

            cmd.Connection.Open();
            OracleDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);

            MNEGoalElementBOL  MNEGoalElementBOLObj  = null;
            MNEGoalElementList MNEGoalElementListObj = new MNEGoalElementList();

            MNEGoalElementBOLObj = new MNEGoalElementBOL();
            while (dr.Read())
            {
                MNEGoalElementBOLObj = new MNEGoalElementBOL();
                MNEGoalElementBOLObj.GoalElementID = Convert.ToInt32(dr.GetValue(dr.GetOrdinal("GOAL_ELEMENTID")));
                MNEGoalElementBOLObj.GoalElement   = dr.GetString(dr.GetOrdinal("GOAL_ELEMENTNAME"));
                MNEGoalElementBOLObj.ISDELETED     = dr.GetString(dr.GetOrdinal("ISDELETED"));
                MNEGoalElementListObj.Add(MNEGoalElementBOLObj);
            }
            dr.Close();
            return(MNEGoalElementListObj);
        }