예제 #1
0
        public bool Insert(string Name, Guid RowGuid, DateTime ModifiedDate)
        {
            SecurityAccessTypeDAC securityaccesstypeComponent = new SecurityAccessTypeDAC();
            int SecurityAccessTypeId = 0;

            return(securityaccesstypeComponent.InsertNewSecurityAccessType(ref SecurityAccessTypeId, Name, RowGuid, ModifiedDate));
        }
예제 #2
0
        public List <SecurityAccessType> GetAll()
        {
            SecurityAccessTypeDAC     _securityAccessTypeComponent = new SecurityAccessTypeDAC();
            IDataReader               reader = _securityAccessTypeComponent.GetAllSecurityAccessType().CreateDataReader();
            List <SecurityAccessType> _securityAccessTypeList = new List <SecurityAccessType>();

            while (reader.Read())
            {
                if (_securityAccessTypeList == null)
                {
                    _securityAccessTypeList = new List <SecurityAccessType>();
                }
                SecurityAccessType _securityAccessType = new SecurityAccessType();
                if (reader["SecurityAccessTypeId"] != DBNull.Value)
                {
                    _securityAccessType.SecurityAccessTypeId = Convert.ToInt32(reader["SecurityAccessTypeId"]);
                }
                if (reader["Name"] != DBNull.Value)
                {
                    _securityAccessType.Name = Convert.ToString(reader["Name"]);
                }
                if (reader["RowGuid"] != DBNull.Value)
                {
                    _securityAccessType.RowGuid = new Guid(reader["RowGuid"].ToString());
                }
                if (reader["ModifiedDate"] != DBNull.Value)
                {
                    _securityAccessType.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
                }
                _securityAccessType.NewRecord = false;
                _securityAccessTypeList.Add(_securityAccessType);
            }
            reader.Close();
            return(_securityAccessTypeList);
        }
예제 #3
0
        public SecurityAccessType GetByID(int _securityAccessTypeId)
        {
            SecurityAccessTypeDAC _securityAccessTypeComponent = new SecurityAccessTypeDAC();
            IDataReader           reader = _securityAccessTypeComponent.GetByIDSecurityAccessType(_securityAccessTypeId);
            SecurityAccessType    _securityAccessType = null;

            while (reader.Read())
            {
                _securityAccessType = new SecurityAccessType();
                if (reader["SecurityAccessTypeId"] != DBNull.Value)
                {
                    _securityAccessType.SecurityAccessTypeId = Convert.ToInt32(reader["SecurityAccessTypeId"]);
                }
                if (reader["Name"] != DBNull.Value)
                {
                    _securityAccessType.Name = Convert.ToString(reader["Name"]);
                }
                if (reader["RowGuid"] != DBNull.Value)
                {
                    _securityAccessType.RowGuid = new Guid(reader["RowGuid"].ToString());
                }
                if (reader["ModifiedDate"] != DBNull.Value)
                {
                    _securityAccessType.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
                }
                _securityAccessType.NewRecord = false;
            }
            reader.Close();
            return(_securityAccessType);
        }
예제 #4
0
        public bool Insert(SecurityAccessType securityaccesstype)
        {
            int autonumber = 0;
            SecurityAccessTypeDAC securityaccesstypeComponent = new SecurityAccessTypeDAC();
            bool endedSuccessfuly = securityaccesstypeComponent.InsertNewSecurityAccessType(ref autonumber, securityaccesstype.Name, securityaccesstype.RowGuid, securityaccesstype.ModifiedDate);

            if (endedSuccessfuly)
            {
                securityaccesstype.SecurityAccessTypeId = autonumber;
            }
            return(endedSuccessfuly);
        }
예제 #5
0
        public bool Update(string Name, Guid RowGuid, DateTime ModifiedDate, int Original_SecurityAccessTypeId)
        {
            SecurityAccessTypeDAC securityaccesstypeComponent = new SecurityAccessTypeDAC();

            return(securityaccesstypeComponent.UpdateSecurityAccessType(Name, RowGuid, ModifiedDate, Original_SecurityAccessTypeId));
        }
예제 #6
0
        public bool Update(SecurityAccessType securityaccesstype, int old_securityAccessTypeId)
        {
            SecurityAccessTypeDAC securityaccesstypeComponent = new SecurityAccessTypeDAC();

            return(securityaccesstypeComponent.UpdateSecurityAccessType(securityaccesstype.Name, securityaccesstype.RowGuid, securityaccesstype.ModifiedDate, old_securityAccessTypeId));
        }
예제 #7
0
        public int UpdateDataset(System.Data.DataSet dataset)
        {
            SecurityAccessTypeDAC securityaccesstypecomponent = new SecurityAccessTypeDAC();

            return(securityaccesstypecomponent.UpdateDataset(dataset));
        }
예제 #8
0
        public void Delete(int Original_SecurityAccessTypeId)
        {
            SecurityAccessTypeDAC securityaccesstypeComponent = new SecurityAccessTypeDAC();

            securityaccesstypeComponent.DeleteSecurityAccessType(Original_SecurityAccessTypeId);
        }