コード例 #1
0
 public bool Insert(EmailAddressType emailaddresstype)
 {
     int autonumber = 0;
     EmailAddressTypeDAC emailaddresstypeComponent = new EmailAddressTypeDAC();
     bool endedSuccessfuly = emailaddresstypeComponent.InsertNewEmailAddressType( ref autonumber,  emailaddresstype.Name,  emailaddresstype.ModifiedDate);
     if(endedSuccessfuly)
     {
         emailaddresstype.EmailAddressTypeId = autonumber;
     }
     return endedSuccessfuly;
 }
コード例 #2
0
 public EmailAddressType GetByID(int _emailAddressTypeId)
 {
     EmailAddressTypeDAC _emailAddressTypeComponent = new EmailAddressTypeDAC();
      IDataReader reader = _emailAddressTypeComponent.GetByIDEmailAddressType(_emailAddressTypeId);
      EmailAddressType _emailAddressType = null;
      while(reader.Read())
      {
          _emailAddressType = new EmailAddressType();
          if(reader["EmailAddressTypeId"] != DBNull.Value)
              _emailAddressType.EmailAddressTypeId = Convert.ToInt32(reader["EmailAddressTypeId"]);
          if(reader["Name"] != DBNull.Value)
              _emailAddressType.Name = Convert.ToString(reader["Name"]);
          if(reader["ModifiedDate"] != DBNull.Value)
              _emailAddressType.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _emailAddressType.NewRecord = false;             }             reader.Close();
      return _emailAddressType;
 }
コード例 #3
0
 public List<EmailAddressType> GetAll()
 {
     EmailAddressTypeDAC _emailAddressTypeComponent = new EmailAddressTypeDAC();
      IDataReader reader =  _emailAddressTypeComponent.GetAllEmailAddressType().CreateDataReader();
      List<EmailAddressType> _emailAddressTypeList = new List<EmailAddressType>();
      while(reader.Read())
      {
      if(_emailAddressTypeList == null)
          _emailAddressTypeList = new List<EmailAddressType>();
          EmailAddressType _emailAddressType = new EmailAddressType();
          if(reader["EmailAddressTypeId"] != DBNull.Value)
              _emailAddressType.EmailAddressTypeId = Convert.ToInt32(reader["EmailAddressTypeId"]);
          if(reader["Name"] != DBNull.Value)
              _emailAddressType.Name = Convert.ToString(reader["Name"]);
          if(reader["ModifiedDate"] != DBNull.Value)
              _emailAddressType.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _emailAddressType.NewRecord = false;
      _emailAddressTypeList.Add(_emailAddressType);
      }             reader.Close();
      return _emailAddressTypeList;
 }
コード例 #4
0
        public bool Insert( string Name,  DateTime ModifiedDate)
        {
            EmailAddressTypeDAC emailaddresstypeComponent = new EmailAddressTypeDAC();
            int EmailAddressTypeId = 0;

            return emailaddresstypeComponent.InsertNewEmailAddressType( ref EmailAddressTypeId,  Name,  ModifiedDate);
        }
コード例 #5
0
 public void Delete(int Original_EmailAddressTypeId)
 {
     EmailAddressTypeDAC emailaddresstypeComponent = new EmailAddressTypeDAC();
     emailaddresstypeComponent.DeleteEmailAddressType(Original_EmailAddressTypeId);
 }
コード例 #6
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     EmailAddressTypeDAC emailaddresstypecomponent = new EmailAddressTypeDAC();
     return emailaddresstypecomponent.UpdateDataset(dataset);
 }
コード例 #7
0
 public bool Update( string Name,  DateTime ModifiedDate,  int Original_EmailAddressTypeId)
 {
     EmailAddressTypeDAC emailaddresstypeComponent = new EmailAddressTypeDAC();
     return emailaddresstypeComponent.UpdateEmailAddressType( Name,  ModifiedDate,  Original_EmailAddressTypeId);
 }
コード例 #8
0
 public bool Update(EmailAddressType emailaddresstype ,int old_emailAddressTypeId)
 {
     EmailAddressTypeDAC emailaddresstypeComponent = new EmailAddressTypeDAC();
     return emailaddresstypeComponent.UpdateEmailAddressType( emailaddresstype.Name,  emailaddresstype.ModifiedDate,  old_emailAddressTypeId);
 }