Esempio n. 1
0
        public bool Insert(string Name)
        {
            MenuEntityTypeDAC menuentitytypeComponent = new MenuEntityTypeDAC();
            int MenuEntityTypeId = 0;

            return(menuentitytypeComponent.InsertNewMenuEntityType(ref MenuEntityTypeId, Name));
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 5
0
        public void Delete(int Original_MenuEntityTypeId)
        {
            MenuEntityTypeDAC menuentitytypeComponent = new MenuEntityTypeDAC();

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

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

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

            return(menuentitytypecomponent.UpdateDataset(dataset));
        }