Example #1
0
 public List<SystemPage> GetAll(bool IsActive)
 {
     SystemPageDAC _systemPageComponent = new SystemPageDAC();
     IDataReader reader = _systemPageComponent.GetAllSystemPage("IsActive="+(IsActive?"1":"0")).CreateDataReader();
     List<SystemPage> _systemPageList = new List<SystemPage>();
     while (reader.Read())
     {
         if (_systemPageList == null)
             _systemPageList = new List<SystemPage>();
         SystemPage _systemPage = new SystemPage();
         if (reader["SystemPageId"] != DBNull.Value)
             _systemPage.SystemPageId = Convert.ToInt32(reader["SystemPageId"]);
         if (reader["Name"] != DBNull.Value)
             _systemPage.Name = Convert.ToString(reader["Name"]);
         if (reader["Path"] != DBNull.Value)
             _systemPage.Path = Convert.ToString(reader["Path"]);
         if (reader["SecurityAccessTypeId"] != DBNull.Value)
             _systemPage.SecurityAccessTypeId = Convert.ToInt32(reader["SecurityAccessTypeId"]);
         if (reader["IsActive"] != DBNull.Value)
             _systemPage.IsActive = Convert.ToBoolean(reader["IsActive"]);
         if (reader["RowGuid"] != DBNull.Value)
             _systemPage.RowGuid = new Guid(reader["RowGuid"].ToString());
         if (reader["ModifiedDate"] != DBNull.Value)
             _systemPage.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
         if (reader["SystemFolderId"] != DBNull.Value)
             _systemPage.SystemFolderId = Convert.ToInt32(reader["SystemFolderId"]);
         _systemPage.NewRecord = false;
         _systemPageList.Add(_systemPage);
     } reader.Close();
     return _systemPageList;
 }
Example #2
0
 public bool Update(SystemPage systempage ,int old_systemPageId)
 {
     SystemPageDAC systempageComponent = new SystemPageDAC();
     return systempageComponent.UpdateSystemPage( systempage.SystemPageId,  systempage.Name,  systempage.Path,  systempage.SecurityAccessTypeId,  systempage.IsActive,  systempage.RowGuid,  DateTime.Now,  systempage.SystemFolderId,  old_systemPageId);
 }
Example #3
0
        public SystemPage GetByPagePath(string PagePath)
        {
            SystemPageDAC _systemPageComponent = new SystemPageDAC();
            IDataReader reader = _systemPageComponent.GetAllSystemPage("Path='" + PagePath+"'").CreateDataReader();
            //List<SystemPage> _systemPageList = new List<SystemPage>();
            SystemPage _systemPage = new SystemPage();
            if (reader.Read())
            {

                if (reader["SystemPageId"] != DBNull.Value)
                    _systemPage.SystemPageId = Convert.ToInt32(reader["SystemPageId"]);
                if (reader["Name"] != DBNull.Value)
                    _systemPage.Name = Convert.ToString(reader["Name"]);
                if (reader["Path"] != DBNull.Value)
                    _systemPage.Path = Convert.ToString(reader["Path"]);
                if (reader["SecurityAccessTypeId"] != DBNull.Value)
                    _systemPage.SecurityAccessTypeId = Convert.ToInt32(reader["SecurityAccessTypeId"]);
                if (reader["IsActive"] != DBNull.Value)
                    _systemPage.IsActive = Convert.ToBoolean(reader["IsActive"]);
                if (reader["RowGuid"] != DBNull.Value)
                    _systemPage.RowGuid = new Guid(reader["RowGuid"].ToString());
                if (reader["ModifiedDate"] != DBNull.Value)
                    _systemPage.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
                if (reader["SystemFolderId"] != DBNull.Value)
                    _systemPage.SystemFolderId = Convert.ToInt32(reader["SystemFolderId"]);
                _systemPage.NewRecord = false;

            } reader.Close();
            return _systemPage; ;
        }
Example #4
0
 public bool Insert(SystemPage systempage)
 {
     SystemPageDAC systempageComponent = new SystemPageDAC();
     return systempageComponent.InsertNewSystemPage( systempage.SystemPageId,  systempage.Name,  systempage.Path,  systempage.SecurityAccessTypeId,  systempage.IsActive,  systempage.RowGuid,  systempage.ModifiedDate,  systempage.SystemFolderId);
 }
Example #5
0
 public SystemPage GetByID(int _systemPageId)
 {
     SystemPageDAC _systemPageComponent = new SystemPageDAC();
      IDataReader reader = _systemPageComponent.GetByIDSystemPage(_systemPageId);
      SystemPage _systemPage = null;
      while(reader.Read())
      {
          _systemPage = new SystemPage();
          if(reader["SystemPageId"] != DBNull.Value)
              _systemPage.SystemPageId = Convert.ToInt32(reader["SystemPageId"]);
          if(reader["Name"] != DBNull.Value)
              _systemPage.Name = Convert.ToString(reader["Name"]);
          if(reader["Path"] != DBNull.Value)
              _systemPage.Path = Convert.ToString(reader["Path"]);
          if(reader["SecurityAccessTypeId"] != DBNull.Value)
              _systemPage.SecurityAccessTypeId = Convert.ToInt32(reader["SecurityAccessTypeId"]);
          if(reader["IsActive"] != DBNull.Value)
              _systemPage.IsActive = Convert.ToBoolean(reader["IsActive"]);
          if(reader["RowGuid"] != DBNull.Value)
              _systemPage.RowGuid = new Guid(reader["RowGuid"].ToString());
          if(reader["ModifiedDate"] != DBNull.Value)
              _systemPage.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
          if(reader["SystemFolderId"] != DBNull.Value)
              _systemPage.SystemFolderId = Convert.ToInt32(reader["SystemFolderId"]);
      _systemPage.NewRecord = false;             }             reader.Close();
      return _systemPage;
 }