Ejemplo n.º 1
0
        public CPApiController(ILogs logs
                               , IConfiguration configuration
                               , SysTemplateDetailService templateDetailService
                               , SysTemplateService templateService
                               , SysTemplatePropertyService templatePropertyService
                               , CPMenuService menuService
                               , CPUserService userService
                               , CPRoleService roleService
                               , CPLangService langService
                               , Security security)
        {
            _configuration          = configuration;
            _logs                   = logs;
            _menu                   = new WebMenu();
            _security               = security;
            _templateDetailsService = templateDetailService;
            _templateService        = templateService;
            _menuService            = menuService;
            _propertyService        = templatePropertyService;
            _userService            = userService;
            _roleService            = roleService;
            _langService            = langService;

            _currentLang = StartUp.CurrentLang;
        }
Ejemplo n.º 2
0
        //<div class="mdc-select">
        //    <i class="mdc-select__dropdown-icon"></i>
        //    <select class="mdc-select__native-control">
        //        <option value = "" disabled selected></option>
        //        <option value = "grains" >
        //            Bread, Cereal, Rice, and Pasta
        //        </option>
        //        <option value = "vegetables" >
        //            Vegetables
        //        </ option >
        //        < option value="fruit">
        //            Fruit
        //        </option>
        //    </select>
        //    <label class="mdc-floating-label">Pick a Food Group</label>
        //    <div class="mdc-line-ripple"></div>
        //</div>
        public static IHtmlContent GetMenuForWeb(string type, int menuID, int langID)
        {
            string keyCache = type + "_ChuyenMuc_" + langID;
            var    cache    = CacheExtends.GetDataFromCache <IHtmlContent>(keyCache);

            if (cache != null)
            {
                return(cache);
            }
            else
            {
                var    chuyenmuc = new CPMenuService();
                var    data      = chuyenmuc.GetItemByType(type, langID);
                string Html      = "<div class=\"mdc-select\"><i class=\"mdc-select__dropdown-icon\"></i><select name=\"MenuID\" class=\"mdc-select__native-control\"><option value=\"\">------ Chọn chuyên mục -----</option>";
                for (int i = 0; data != null && i < data.Count; i++)
                {
                    var item = data[i];
                    if (menuID > 0 && menuID == item.ID)
                    {
                        Html += "<option value =" + item.ID + " selected>" + item.Name + "</option>";
                    }
                    else
                    {
                        Html += "<option value =" + item.ID + ">" + item.Name + "</option>";
                    }
                }
                Html += "</select></div>";
                return(new HtmlString(Html));
            }
        }
Ejemplo n.º 3
0
 public CPApiController(ILogs logs
                        , IConfiguration configuration
                        , CPMenuService menuService
                        , CPUserService userService
                        , CPRoleService roleService
                        , CPLangService langService
                        , Security security
                        , ModLessonService lessonService
                        , ModLessonPartService lessonPartService
                        , ModLessonExtendService lessonExtendService
                        , ModLessonPartAnswerService answerService
                        , CPLoginLogService loginLogService
                        , FileProcess fileProcess)
 {
     _configuration        = configuration;
     _logs                 = logs;
     _menu                 = new WebMenu();
     _security             = security;
     _menuService          = menuService;
     _userService          = userService;
     _roleService          = roleService;
     _langService          = langService;
     _lessionService       = lessonService;
     _lessionPartService   = lessonPartService;
     _lessionExtendService = lessonExtendService;
     _loginLogService      = loginLogService;
     _answerService        = answerService;
     _fileProcess          = fileProcess;
     _currentLang          = StartUp.CurrentLang;
     _currentUser          = StartUp.CurrentUser;
 }
Ejemplo n.º 4
0
 public CPApiController(ILogs logs, IConfiguration configuration)
 {
     _configuration          = configuration;
     _logs                   = logs;
     _menu                   = new WebMenu();
     _templateDetailsService = new SysTemplateDetailsService();
     _templateService        = new SysTemplateService();
     _menuService            = new CPMenuService();
     _propertyService        = new SysPropertyService();
     currentLang             = StartUp.CurrentLang;
 }
Ejemplo n.º 5
0
 public CPMenuController(CPMenuService menuService)
 {
     _service = menuService;
 }
Ejemplo n.º 6
0
 public CPMenuController()
 {
     _service = new CPMenuService();
 }