Beispiel #1
0
 public List<SectionFiles> GetAll()
 {
     SectionFilesDAC _sectionFilesComponent = new SectionFilesDAC();
      IDataReader reader =  _sectionFilesComponent.GetAllSectionFiles().CreateDataReader();
      List<SectionFiles> _sectionFilesList = new List<SectionFiles>();
      while(reader.Read())
      {
      if(_sectionFilesList == null)
          _sectionFilesList = new List<SectionFiles>();
          SectionFiles _sectionFiles = new SectionFiles();
          if(reader["SectionFileId"] != DBNull.Value)
              _sectionFiles.SectionFileId = Convert.ToInt32(reader["SectionFileId"]);
          if(reader["SectionFileName"] != DBNull.Value)
              _sectionFiles.SectionFileName = Convert.ToString(reader["SectionFileName"]);
          if(reader["SectionFilePath"] != DBNull.Value)
              _sectionFiles.SectionFilePath = Convert.ToString(reader["SectionFilePath"]);
          if(reader["SectionId"] != DBNull.Value)
              _sectionFiles.SectionId = Convert.ToInt32(reader["SectionId"]);
          if(reader["SecurityAccessTypeId"] != DBNull.Value)
              _sectionFiles.SecurityAccessTypeId = Convert.ToInt32(reader["SecurityAccessTypeId"]);
      _sectionFiles.NewRecord = false;
      _sectionFilesList.Add(_sectionFiles);
      }             reader.Close();
      return _sectionFilesList;
 }
Beispiel #2
0
 public SectionFiles GetByID(int _sectionFileId)
 {
     SectionFilesDAC _sectionFilesComponent = new SectionFilesDAC();
      IDataReader reader = _sectionFilesComponent.GetByIDSectionFiles(_sectionFileId);
      SectionFiles _sectionFiles = null;
      while(reader.Read())
      {
          _sectionFiles = new SectionFiles();
          if(reader["SectionFileId"] != DBNull.Value)
              _sectionFiles.SectionFileId = Convert.ToInt32(reader["SectionFileId"]);
          if(reader["SectionFileName"] != DBNull.Value)
              _sectionFiles.SectionFileName = Convert.ToString(reader["SectionFileName"]);
          if(reader["SectionFilePath"] != DBNull.Value)
              _sectionFiles.SectionFilePath = Convert.ToString(reader["SectionFilePath"]);
          if(reader["SectionId"] != DBNull.Value)
              _sectionFiles.SectionId = Convert.ToInt32(reader["SectionId"]);
          if(reader["SecurityAccessTypeId"] != DBNull.Value)
              _sectionFiles.SecurityAccessTypeId = Convert.ToInt32(reader["SecurityAccessTypeId"]);
      _sectionFiles.NewRecord = false;             }             reader.Close();
      return _sectionFiles;
 }
Beispiel #3
0
 public bool Update(SectionFiles sectionfiles ,int old_sectionFileId)
 {
     SectionFilesDAC sectionfilesComponent = new SectionFilesDAC();
     return sectionfilesComponent.UpdateSectionFiles( sectionfiles.SectionFileId,  sectionfiles.SectionFileName,  sectionfiles.SectionFilePath,  sectionfiles.SectionId,  sectionfiles.SecurityAccessTypeId,  old_sectionFileId);
 }
Beispiel #4
0
 public bool Insert( int SectionFileId,  string SectionFileName,  string SectionFilePath,  int SectionId,  int SecurityAccessTypeId)
 {
     SectionFilesDAC sectionfilesComponent = new SectionFilesDAC();
     return sectionfilesComponent.InsertNewSectionFiles( SectionFileId,  SectionFileName,  SectionFilePath,  SectionId,  SecurityAccessTypeId);
 }
Beispiel #5
0
 public bool Insert(SectionFiles sectionfiles)
 {
     SectionFilesDAC sectionfilesComponent = new SectionFilesDAC();
     return sectionfilesComponent.InsertNewSectionFiles( sectionfiles.SectionFileId,  sectionfiles.SectionFileName,  sectionfiles.SectionFilePath,  sectionfiles.SectionId,  sectionfiles.SecurityAccessTypeId);
 }
Beispiel #6
0
 public void Delete(int Original_SectionFileId)
 {
     SectionFilesDAC sectionfilesComponent = new SectionFilesDAC();
     sectionfilesComponent.DeleteSectionFiles(Original_SectionFileId);
 }
Beispiel #7
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     SectionFilesDAC sectionfilescomponent = new SectionFilesDAC();
     return sectionfilescomponent.UpdateDataset(dataset);
 }
Beispiel #8
0
 public bool Update( int SectionFileId,  string SectionFileName,  string SectionFilePath,  int SectionId,  int SecurityAccessTypeId,  int Original_SectionFileId)
 {
     SectionFilesDAC sectionfilesComponent = new SectionFilesDAC();
     return sectionfilesComponent.UpdateSectionFiles( SectionFileId,  SectionFileName,  SectionFilePath,  SectionId,  SecurityAccessTypeId,  Original_SectionFileId);
 }