Files
BeWoPlaner/BeWoPlanerMobil/Controllers/AbstractBaseController.cs

37 lines
1.6 KiB
C#
Raw Normal View History

using System.Web.Mvc;
2016-06-27 01:45:38 +02:00
using System.Web.Security;
using BeWo.Service.ServiceContracts;
using BeWoPlanerMobil.Service;
using BS.Shared.DataContracts;
2016-06-27 01:45:38 +02:00
namespace BeWoPlanerMobil.Controllers
{
public abstract class AbstractBaseController : Controller
{
2016-06-27 01:45:38 +02:00
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;
2019-07-25 14:56:11 +02:00
protected const string _LeerzeichenFuerGetMethoden = " ";
2016-06-27 01:45:38 +02:00
protected static readonly log4net.ILog Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
2016-06-27 01:45:38 +02:00
protected ActionResult Logout()
{
MobileSessionFacade.LogUserOut();
FormsAuthentication.SignOut();
return RedirectToActionPermanent("Index", "Login", new {tenant = MobileSessionFacade.Tenant});
2016-06-27 01:45:38 +02:00
}
protected UserDC GetUser()
{
return UserService.LoadUser(MobileSessionFacade.LoggedInUser.Oid.Value);
}
2016-06-27 01:45:38 +02:00
}
}