Esempio n. 1
0
 public List<EmployeeDocument> GetAll()
 {
     EmployeeDocumentDAC _employeeDocumentComponent = new EmployeeDocumentDAC();
      IDataReader reader =  _employeeDocumentComponent.GetAllEmployeeDocument().CreateDataReader();
      List<EmployeeDocument> _employeeDocumentList = new List<EmployeeDocument>();
      while(reader.Read())
      {
      if(_employeeDocumentList == null)
          _employeeDocumentList = new List<EmployeeDocument>();
          EmployeeDocument _employeeDocument = new EmployeeDocument();
          if(reader["EmployeeDocumentID"] != DBNull.Value)
              _employeeDocument.EmployeeDocumentID = Convert.ToInt32(reader["EmployeeDocumentID"]);
          if(reader["EmployeeDocumentTypeID"] != DBNull.Value)
              _employeeDocument.EmployeeDocumentTypeID = Convert.ToInt32(reader["EmployeeDocumentTypeID"]);
          if(reader["EmployeeID"] != DBNull.Value)
              _employeeDocument.EmployeeID = Convert.ToInt32(reader["EmployeeID"]);
          if(reader["Name"] != DBNull.Value)
              _employeeDocument.Name = Convert.ToString(reader["Name"]);
          if(reader["Path"] != DBNull.Value)
              _employeeDocument.Path = Convert.ToString(reader["Path"]);
      _employeeDocument.NewRecord = false;
      _employeeDocumentList.Add(_employeeDocument);
      }             reader.Close();
      return _employeeDocumentList;
 }
Esempio n. 2
0
 public EmployeeDocument GetByID(int _employeeDocumentID)
 {
     EmployeeDocumentDAC _employeeDocumentComponent = new EmployeeDocumentDAC();
      IDataReader reader = _employeeDocumentComponent.GetByIDEmployeeDocument(_employeeDocumentID);
      EmployeeDocument _employeeDocument = null;
      while(reader.Read())
      {
          _employeeDocument = new EmployeeDocument();
          if(reader["EmployeeDocumentID"] != DBNull.Value)
              _employeeDocument.EmployeeDocumentID = Convert.ToInt32(reader["EmployeeDocumentID"]);
          if(reader["EmployeeDocumentTypeID"] != DBNull.Value)
              _employeeDocument.EmployeeDocumentTypeID = Convert.ToInt32(reader["EmployeeDocumentTypeID"]);
          if(reader["EmployeeID"] != DBNull.Value)
              _employeeDocument.EmployeeID = Convert.ToInt32(reader["EmployeeID"]);
          if(reader["Name"] != DBNull.Value)
              _employeeDocument.Name = Convert.ToString(reader["Name"]);
          if(reader["Path"] != DBNull.Value)
              _employeeDocument.Path = Convert.ToString(reader["Path"]);
      _employeeDocument.NewRecord = false;             }             reader.Close();
      return _employeeDocument;
 }
Esempio n. 3
0
 public bool Insert( ref int EmployeeDocumentID,  int EmployeeDocumentTypeID,  int EmployeeID,  string Name,  string Path)
 {
     EmployeeDocumentDAC employeedocumentComponent = new EmployeeDocumentDAC();
     return employeedocumentComponent.InsertNewEmployeeDocument( ref EmployeeDocumentID,  EmployeeDocumentTypeID,  EmployeeID,  Name,  Path);
 }
Esempio n. 4
0
 public bool Insert(EmployeeDocument employeedocument)
 {
     int autonumber = 0;
     EmployeeDocumentDAC employeedocumentComponent = new EmployeeDocumentDAC();
     bool endedSuccessfuly = employeedocumentComponent.InsertNewEmployeeDocument( ref autonumber,  employeedocument.EmployeeDocumentTypeID,  employeedocument.EmployeeID,  employeedocument.Name,  employeedocument.Path);
     if(endedSuccessfuly)
     {
         employeedocument.EmployeeDocumentID = autonumber;
     }
     return endedSuccessfuly;
 }
Esempio n. 5
0
 public void Delete(int Original_EmployeeDocumentID)
 {
     EmployeeDocumentDAC employeedocumentComponent = new EmployeeDocumentDAC();
     employeedocumentComponent.DeleteEmployeeDocument(Original_EmployeeDocumentID);
 }
Esempio n. 6
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     EmployeeDocumentDAC employeedocumentcomponent = new EmployeeDocumentDAC();
     return employeedocumentcomponent.UpdateDataset(dataset);
 }
Esempio n. 7
0
 public bool Update( int EmployeeDocumentTypeID,  int EmployeeID,  string Name,  string Path,  int Original_EmployeeDocumentID)
 {
     EmployeeDocumentDAC employeedocumentComponent = new EmployeeDocumentDAC();
     return employeedocumentComponent.UpdateEmployeeDocument( EmployeeDocumentTypeID,  EmployeeID,  Name,  Path,  Original_EmployeeDocumentID);
 }
Esempio n. 8
0
 public bool Update(EmployeeDocument employeedocument ,int old_employeeDocumentID)
 {
     EmployeeDocumentDAC employeedocumentComponent = new EmployeeDocumentDAC();
     return employeedocumentComponent.UpdateEmployeeDocument( employeedocument.EmployeeDocumentTypeID,  employeedocument.EmployeeID,  employeedocument.Name,  employeedocument.Path,  old_employeeDocumentID);
 }