public static AccessMethod GetAccessMethodByAccessMethodId(int AccessMethodId)
        {
            Database  db         = DatabaseFactory.CreateDatabase("SPARInsightManagement");
            string    sqlCommand = "GetAccessMethodByAccessMethodId";
            DbCommand dbCommand  = db.GetStoredProcCommand(sqlCommand);

            db.AddInParameter(dbCommand, "@AccessMethodId", DbType.Int32, AccessMethodId);
            db.AddOutParameter(dbCommand, "@Description", DbType.String, 50);
            db.ExecuteNonQuery(dbCommand);
            AccessMethod AccessMethod = new AccessMethod();

            AccessMethod.AccessMethodId = AccessMethodId;
            AccessMethod.Description    = db.GetParameterValue(dbCommand, "Description").ToString();
            return(AccessMethod);
        }
        public static List <AccessMethod> GetAccessMethodList()
        {
            List <AccessMethod> list = new List <AccessMethod>();

            Database  db         = DatabaseFactory.CreateDatabase("SPARInsightManagement");
            string    sqlCommand = "GetAccessMethodList";
            DbCommand dbCommand  = db.GetStoredProcCommand(sqlCommand);

            using (IDataReader dataReader = db.ExecuteReader(dbCommand))
            {
                while (dataReader.Read())
                {
                    AccessMethod AccessMethod = new AccessMethod();
                    AccessMethod.AccessMethodId = Convert.ToInt32(dataReader["AccessMethodId"]);
                    AccessMethod.Description    = dataReader["Description"].ToString();
                    list.Add(AccessMethod);
                }
            }
            return(list);
        }