Exemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 public DiscountTypeController(IDiscountTypeService discountTypeService)
 {
     if (discountTypeService == null)
     {
         throw new ArgumentNullException("discountTypeService");
     }
     this.discountTypeService = discountTypeService;
 }
Exemplo n.º 2
0
        public PropertyLineController(IPropertyLineService PropertyLineService, IExceptionHandler exec, IPropertyHeaderService PropertyHeaderService, IJobOrderSettingsService jobOrderSettingsServ, IDiscountTypeService DiscountTypeService
                                      , IDocumentValidation validator)
        {
            _PropertyLineService     = PropertyLineService;
            _PropertyHeaderService   = PropertyHeaderService;
            _jobOrderSettingsService = jobOrderSettingsServ;
            _DiscountTypeService     = DiscountTypeService;
            _exception = exec;
            _validator = validator;

            UserRoles = (List <string>)System.Web.HttpContext.Current.Session["Roles"];
        }
        public DiscountTypeController(IDiscountTypeService DiscountTypeService, IDocumentTypeService DocumentTypeService, IExceptionHandler exec,
                                      ILogger log, IModificationCheck modificationCheck, IDocumentValidation DocValidation)
        {
            _DiscountTypeService = DiscountTypeService;
            _DocumentTypeService = DocumentTypeService;
            _exception           = exec;
            _documentValidation  = DocValidation;
            _logger            = log;
            _modificationCheck = modificationCheck;

            UserRoles            = (List <string>)System.Web.HttpContext.Current.Session["Roles"];
            logVm.SessionId      = 0;
            logVm.ControllerName = System.Web.HttpContext.Current.Request.RequestContext.RouteData.GetRequiredString("controller");
            logVm.ActionName     = System.Web.HttpContext.Current.Request.RequestContext.RouteData.GetRequiredString("action");
            logVm.User           = System.Web.HttpContext.Current.Request.RequestContext.HttpContext.User.Identity.Name;
        }