public async Task <IActionResult> MenuE1InterfaceData(string RegisterId, string Passw) { ModelMenuE1_InterfaceData e = await _IDocMenuEService.MenuE1InterfaceDataAsync(RegisterId, Passw); if (e != null) { return(Ok(e)); } else { return(BadRequest()); } }
public async Task <ModelMenuE1_InterfaceData> MenuE1InterfaceDataAsync(string RegisterId, string Passw) { ModelMenuE1_InterfaceData resp = new ModelMenuE1_InterfaceData(); var cultureInfo = new CultureInfo("en-GB"); CultureInfo.DefaultThreadCurrentCulture = cultureInfo; CultureInfo.DefaultThreadCurrentUICulture = cultureInfo; EntityLogSystem user_login = new EntityLogSystem(); user_login.register_id = RegisterId; user_login.userid = "customer"; user_login.passw = Passw; user_login.log_event = "Get Link Login"; user_login.log_date = DateTime.Now; ModelResponseMessageLogin get_login = await _ISystemRepository.LogIn(user_login); // Default resp.Status = false; resp.Message = "ไม่พบสิทธิ์การใช้งานในระบบ!"; resp.docDate = DateTime.Now; resp.docNumber = ""; if (get_login != null && get_login.Status == true) { resp.UserPermission = await _IRegisterUserRepository.GetPermissionPageAsync(RegisterId, "M022"); if (resp.UserPermission != null) { resp.Status = true; resp.Message = "ยินดีต้อนรับเข้าสู่ระบบ."; resp.docDate = DateTime.Now; resp.docNumber = DateTime.Now.ToString("yyMM-XXX"); } } resp.listfaculty = await GetAllFacultyAsync(); return(resp); }