示例#1
0
        public bool Insert(string Name)
        {
            MenuEntityTypeDAC menuentitytypeComponent = new MenuEntityTypeDAC();
            int MenuEntityTypeId = 0;

            return(menuentitytypeComponent.InsertNewMenuEntityType(ref MenuEntityTypeId, Name));
        }
示例#2
0
        public List <MenuEntityType> GetAll()
        {
            MenuEntityTypeDAC     _menuEntityTypeComponent = new MenuEntityTypeDAC();
            IDataReader           reader = _menuEntityTypeComponent.GetAllMenuEntityType().CreateDataReader();
            List <MenuEntityType> _menuEntityTypeList = new List <MenuEntityType>();

            while (reader.Read())
            {
                if (_menuEntityTypeList == null)
                {
                    _menuEntityTypeList = new List <MenuEntityType>();
                }
                MenuEntityType _menuEntityType = new MenuEntityType();
                if (reader["MenuEntityTypeId"] != DBNull.Value)
                {
                    _menuEntityType.MenuEntityTypeId = Convert.ToInt32(reader["MenuEntityTypeId"]);
                }
                if (reader["Name"] != DBNull.Value)
                {
                    _menuEntityType.Name = Convert.ToString(reader["Name"]);
                }
                _menuEntityType.NewRecord = false;
                _menuEntityTypeList.Add(_menuEntityType);
            }
            reader.Close();
            return(_menuEntityTypeList);
        }
示例#3
0
        public bool Insert(MenuEntityType menuentitytype)
        {
            int autonumber = 0;
            MenuEntityTypeDAC menuentitytypeComponent = new MenuEntityTypeDAC();
            bool endedSuccessfuly = menuentitytypeComponent.InsertNewMenuEntityType(ref autonumber, menuentitytype.Name);

            if (endedSuccessfuly)
            {
                menuentitytype.MenuEntityTypeId = autonumber;
            }
            return(endedSuccessfuly);
        }
示例#4
0
        public MenuEntityType GetByID(int _menuEntityTypeId)
        {
            MenuEntityTypeDAC _menuEntityTypeComponent = new MenuEntityTypeDAC();
            IDataReader       reader          = _menuEntityTypeComponent.GetByIDMenuEntityType(_menuEntityTypeId);
            MenuEntityType    _menuEntityType = null;

            while (reader.Read())
            {
                _menuEntityType = new MenuEntityType();
                if (reader["MenuEntityTypeId"] != DBNull.Value)
                {
                    _menuEntityType.MenuEntityTypeId = Convert.ToInt32(reader["MenuEntityTypeId"]);
                }
                if (reader["Name"] != DBNull.Value)
                {
                    _menuEntityType.Name = Convert.ToString(reader["Name"]);
                }
                _menuEntityType.NewRecord = false;
            }
            reader.Close();
            return(_menuEntityType);
        }
示例#5
0
        public void Delete(int Original_MenuEntityTypeId)
        {
            MenuEntityTypeDAC menuentitytypeComponent = new MenuEntityTypeDAC();

            menuentitytypeComponent.DeleteMenuEntityType(Original_MenuEntityTypeId);
        }
示例#6
0
        public bool Update(string Name, int Original_MenuEntityTypeId)
        {
            MenuEntityTypeDAC menuentitytypeComponent = new MenuEntityTypeDAC();

            return(menuentitytypeComponent.UpdateMenuEntityType(Name, Original_MenuEntityTypeId));
        }
示例#7
0
        public bool Update(MenuEntityType menuentitytype, int old_menuEntityTypeId)
        {
            MenuEntityTypeDAC menuentitytypeComponent = new MenuEntityTypeDAC();

            return(menuentitytypeComponent.UpdateMenuEntityType(menuentitytype.Name, old_menuEntityTypeId));
        }
示例#8
0
        public int UpdateDataset(System.Data.DataSet dataset)
        {
            MenuEntityTypeDAC menuentitytypecomponent = new MenuEntityTypeDAC();

            return(menuentitytypecomponent.UpdateDataset(dataset));
        }