private void pictureBox4_Click_1(object sender, EventArgs e)
 {
     SubMenuConfig.Visible = true;
     SubMenuConfig.BringToFront();
     panelSubMenuNavBar.Visible = false;
     DisableButton();
 }
Ejemplo n.º 2
0
        private SubMenuConfigDTO ToDTO(SubMenuConfig entity)
        {
            SubMenuConfigDTO dto = new SubMenuConfigDTO()
            {
                MenuName       = entity.MenuName,
                MenuOrder      = entity.MenuOrder,
                Type           = entity.Type,
                KeyUrlMediaId  = entity.KeyUrlMediaId,
                ParentMenuID   = entity.ParentMenuID,
                ParentMenuName = entity.ParentMenuConfig.MenuName
            };

            return(dto);
        }
Ejemplo n.º 3
0
        public async Task <long> AddNew(string type, string menuName, string keyUrlMediaId, long parentMenuID,
                                        int menuOrder)
        {
            var entity = new SubMenuConfig()
            {
                Type          = type,
                MenuName      = menuName,
                KeyUrlMediaId = keyUrlMediaId,
                ParentMenuID  = parentMenuID,
                MenuOrder     = menuOrder
            };

            using (var db = new WeixinDbContext())
            {
                db.SubMenuConfig.Add(entity);
                await db.SaveChangesAsync();

                return(entity.Id);
            }
        }