37 lines
1.6 KiB
C#
37 lines
1.6 KiB
C#
using System.Web.Mvc;
|
|
using System.Web.Security;
|
|
using BeWo.Service.ServiceContracts;
|
|
|
|
using BeWoPlanerMobil.Service;
|
|
using BS.Shared.DataContracts;
|
|
|
|
namespace BeWoPlanerMobil.Controllers
|
|
{
|
|
public abstract class AbstractBaseController : Controller
|
|
{
|
|
protected readonly ICustomerService CustomerService = new MobileSessionFacade().CustomerService;
|
|
protected readonly IOperationsService OperationsService = new MobileSessionFacade().OperationsService;
|
|
protected readonly IEmployeeService EmployeeService = new MobileSessionFacade().EmployeeService;
|
|
protected readonly IValueListService ValueListService = new MobileSessionFacade().ValueListService;
|
|
protected readonly IResourceService KalenderService = new MobileSessionFacade().ResourceService;
|
|
protected readonly IAnalysisService AnalysisService = new MobileSessionFacade().AnalysisService;
|
|
protected readonly IUserService UserService = new MobileSessionFacade().UserService;
|
|
protected const string _LeerzeichenFuerGetMethoden = " ";
|
|
|
|
protected static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
|
|
|
protected ActionResult Logout()
|
|
{
|
|
MobileSessionFacade.LogUserOut();
|
|
FormsAuthentication.SignOut();
|
|
|
|
return RedirectToActionPermanent("Index", "Login", new {tenant = MobileSessionFacade.Tenant});
|
|
}
|
|
|
|
protected UserDC GetUser()
|
|
{
|
|
return UserService.LoadUser(MobileSessionFacade.LoggedInUser.Oid.Value);
|
|
}
|
|
}
|
|
}
|