public RESPONSE_MODEL GetApplicationMenu(int menu_id)
        {
            try
            {
                var data = ctx.APPLICATION_MENUS
                           .Where(o => o.MENU_ID == menu_id).FirstOrDefault();

                var menu = new APPLICATION_MENU_MODEL();
                menu.MENU_ID     = data.MENU_ID;
                menu.PARENT_ID   = data.PARENT_ID;
                menu.PARENT_NAME = ctx.APPLICATION_MENUS
                                   .Where(o => o.MENU_ID == data.PARENT_ID)
                                   .FirstOrDefault()
                                   .MENU_NAME;
                menu.APP_ID      = data.APP_ID;
                menu.MENU_NAME   = data.MENU_NAME;
                menu.MENU_LEVEL  = data.MENU_LEVEL;
                menu.MENU_SEQ    = data.MENU_SEQ;
                menu.MENU_STATUS = data.MENU_STATUS;
                resp.OUTPUT_DATA = menu;
            }
            catch (Exception ex)
            {
                resp = ErrorCollection(ex);
            }
            return(resp);
        }
        public RESPONSE_MODEL UpdateApplicationMenu(APPLICATION_MENU_MODEL source)
        {
            try
            {
                var menu = ctx.APPLICATION_MENUS.Where(o => o.MENU_ID == source.MENU_ID).FirstOrDefault();

                menu.MENU_NAME   = source.MENU_NAME;
                menu.MENU_STATUS = source.MENU_STATUS;
                menu.MENU_SEQ    = source.MENU_SEQ;

                ctx.SaveChanges();
            }
            catch (Exception ex)
            {
                resp = ErrorCollection(ex);
            }
            return(resp);
        }
        public RESPONSE_MODEL AddApplicationMenu(APPLICATION_MENU_MODEL source)
        {
            try
            {
                var menu = new APPLICATION_MENUS();
                menu.MENU_NAME   = source.MENU_NAME;
                menu.MENU_STATUS = source.MENU_STATUS;
                menu.MENU_SEQ    = source.MENU_SEQ;
                menu.MENU_LEVEL  = source.MENU_LEVEL;
                menu.PARENT_ID   = source.PARENT_ID;
                menu.APP_ID      = source.APP_ID;

                ctx.APPLICATION_MENUS.Add(menu);
                ctx.SaveChanges();
            }
            catch (Exception ex)
            {
                resp = ErrorCollection(ex);
            }
            return(resp);
        }
 public JsonResult UpdateApplicationMenu(APPLICATION_MENU_MODEL source)
 {
     resp = menuService.UpdateApplicationMenu(source);
     return(Json(resp, JsonRequestBehavior.AllowGet));
 }