Esempio n. 1
0
        public bool Insert(string Name, DateTime ModifiedDate)
        {
            EmailAddressTypeDAC emailaddresstypeComponent = new EmailAddressTypeDAC();
            int EmailAddressTypeId = 0;

            return(emailaddresstypeComponent.InsertNewEmailAddressType(ref EmailAddressTypeId, Name, ModifiedDate));
        }
Esempio n. 2
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);
        }
Esempio n. 3
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);
        }
Esempio n. 4
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);
        }
Esempio n. 5
0
        public bool Update(string Name, DateTime ModifiedDate, int Original_EmailAddressTypeId)
        {
            EmailAddressTypeDAC emailaddresstypeComponent = new EmailAddressTypeDAC();

            return(emailaddresstypeComponent.UpdateEmailAddressType(Name, ModifiedDate, Original_EmailAddressTypeId));
        }
Esempio n. 6
0
        public bool Update(EmailAddressType emailaddresstype, int old_emailAddressTypeId)
        {
            EmailAddressTypeDAC emailaddresstypeComponent = new EmailAddressTypeDAC();

            return(emailaddresstypeComponent.UpdateEmailAddressType(emailaddresstype.Name, emailaddresstype.ModifiedDate, old_emailAddressTypeId));
        }
Esempio n. 7
0
        public int UpdateDataset(System.Data.DataSet dataset)
        {
            EmailAddressTypeDAC emailaddresstypecomponent = new EmailAddressTypeDAC();

            return(emailaddresstypecomponent.UpdateDataset(dataset));
        }
Esempio n. 8
0
        public void Delete(int Original_EmailAddressTypeId)
        {
            EmailAddressTypeDAC emailaddresstypeComponent = new EmailAddressTypeDAC();

            emailaddresstypeComponent.DeleteEmailAddressType(Original_EmailAddressTypeId);
        }