Exemplo n.º 1
0
 public PriceListDao()
 {
     ValidatorRegistry.RegisterSaveValidator(new MenuItemPriceDefinitionSaveValidator());
 }
 protected virtual string CanDeleteItem(TModel model)
 {
     return(ValidatorRegistry.GetDeleteErrorMessage(model));
 }
Exemplo n.º 3
0
 public UserDao()
 {
     ValidatorRegistry.RegisterDeleteValidator(new UserDeleteValidator());
     ValidatorRegistry.RegisterDeleteValidator(new UserRoleDeleteValidator());
     ValidatorRegistry.RegisterSaveValidator(new UserSaveValidator());
 }
Exemplo n.º 4
0
 public AutomationDao()
 {
     ValidatorRegistry.RegisterDeleteValidator <AppAction>(x => Dao.Exists <ActionContainer>(y => y.AppActionId == x.Id), Resources.Action, Resources.Rule);
     ValidatorRegistry.RegisterSaveValidator(new AppActionSaveValidator());
 }
Exemplo n.º 5
0
 public CacheDao()
 {
     ValidatorRegistry.RegisterDeleteValidator <Department>(
         x => Dao.Exists <UserRole>(y => y.DepartmentId == x.Id), Resources.Department, Resources.UserRole);
 }
Exemplo n.º 6
0
 public MenuDao()
 {
     ValidatorRegistry.RegisterSaveValidator(new NonDuplicateSaveValidator <MenuItem>(string.Format(Resources.SaveErrorDuplicateItemName_f, Resources.MenuItem)));
     ValidatorRegistry.RegisterDeleteValidator(new MenuItemDeleteValidator());
     ValidatorRegistry.RegisterDeleteValidator(new ScreenMenuDeleteValidator());
 }
Exemplo n.º 7
0
 public SettingDao()
 {
     ValidatorRegistry.RegisterDeleteValidator(new NumeratorDeleteValidator());
 }
Exemplo n.º 8
0
 public TicketDao()
 {
     ValidatorRegistry.RegisterDeleteValidator <TicketType>(x => Dao.Exists <EntityScreen>(y => y.TicketTypeId == x.Id), Resources.TicketType, Resources.EntityScreen);
     ValidatorRegistry.RegisterConcurrencyValidator(new TicketConcurrencyValidator());
 }
 protected virtual string GetSaveErrorMessage()
 {
     return(ValidatorRegistry.GetSaveErrorMessage(Model));
 }
Exemplo n.º 10
0
 public PrinterDao()
 {
     ValidatorRegistry.RegisterDeleteValidator(new PrinterDeleteValidator());
     ValidatorRegistry.RegisterDeleteValidator(new PrinterTemplateDeleteValidator());
 }
Exemplo n.º 11
0
 public MenuDao()
 {
     ValidatorRegistry.RegisterDeleteValidator(new MenuItemDeleteValidator());
     ValidatorRegistry.RegisterDeleteValidator <ScreenMenu>(x => Dao.Exists <TicketType>(y => y.ScreenMenuId == x.Id), Resources.Menu, Resources.TicketType);
 }
Exemplo n.º 12
0
 public InventoryDao()
 {
     ValidatorRegistry.RegisterSaveValidator(new NonDuplicateSaveValidator <InventoryItem>(string.Format(Resources.SaveErrorDuplicateItemName_f, Resources.InventoryItem)));
     ValidatorRegistry.RegisterDeleteValidator <InventoryItem>(x => Dao.Exists <PeriodicConsumptionItem>(y => y.InventoryItemId == x.Id), Resources.InventoryItem, Resources.EndOfDayRecord);
     ValidatorRegistry.RegisterSaveValidator(new RecipeSaveValidator());
 }
Exemplo n.º 13
0
 public MenuService()
 {
     ValidatorRegistry.RegisterDeleteValidator(new MenuItemDeleteValidator());
     ValidatorRegistry.RegisterDeleteValidator <ScreenMenu>(x => Dao.Exists <Department>(y => y.ScreenMenuId == x.Id), Resources.Menu, Resources.Department);
 }
Exemplo n.º 14
0
 public MenuDao()
 {
     ValidatorRegistry.RegisterSaveValidator(new NonDuplicateSaveValidator <MenuItem>(string.Format(Resources.SaveErrorDuplicateItemName_f, Resources.MenuItem)));
     ValidatorRegistry.RegisterDeleteValidator(new MenuItemDeleteValidator());
     ValidatorRegistry.RegisterDeleteValidator <ScreenMenu>(x => Dao.Exists <TicketType>(y => y.ScreenMenuId == x.Id), Resources.Menu, Resources.TicketType);
 }