void ActionTransferOperationJournal_Activated(object sender, System.EventArgs e) { tdiMain.OpenTab( PermissionControlledRepresentationJournal.GenerateHashName <TransferOperationsVM>(), () => new PermissionControlledRepresentationJournal(new TransferOperationsVM()).CustomTabName("Переносы между точками доставки") ); }
void ActionClientBalance_Activated(object sender, System.EventArgs e) { tdiMain.OpenTab( PermissionControlledRepresentationJournal.GenerateHashName <ClientEquipmentBalanceVM>(), () => { var journal = new PermissionControlledRepresentationJournal(new ClientEquipmentBalanceVM()); journal.CustomTabName("Оборудование у клиентов"); return(journal); } ); }
void ActionPremiumJournal_Activated(object sender, System.EventArgs e) { tdiMain.OpenTab( PermissionControlledRepresentationJournal.GenerateHashName <PremiumVM>(), () => { Buttons buttons = ServicesConfig.CommonServices.CurrentPermissionService.ValidatePresetPermission("can_delete_fines") ? Buttons.All : (Buttons.Add | Buttons.Edit); return(new PermissionControlledRepresentationJournal(new PremiumVM(), buttons).CustomTabName("Журнал премий")); } ); }
void ActionRouteListTable_Activated(object sender, System.EventArgs e) { tdiMain.OpenTab( PermissionControlledRepresentationJournal.GenerateHashName <RouteListsVM>(), () => { var vm = new RouteListsVM(); vm.Filter.SetAndRefilterAtOnce(x => x.SetFilterDates(System.DateTime.Today.AddMonths(-2), System.DateTime.Today)); Buttons buttons = Buttons.Add | Buttons.Edit; return(new PermissionControlledRepresentationJournal(vm, buttons)); } ); }
void ActionFinesJournal_Activated(object sender, System.EventArgs e) { tdiMain.OpenTab( PermissionControlledRepresentationJournal.GenerateHashName <FinesVM>(), () => { FinesVM vm = new FinesVM(); vm.Filter.SetAndRefilterAtOnce(f => f.SetFilterDates(System.DateTime.Today.AddMonths(-2), System.DateTime.Today)); Buttons buttons = ServicesConfig.CommonServices.CurrentPermissionService.ValidatePresetPermission("can_delete_fines") ? Buttons.All : (Buttons.Add | Buttons.Edit); return(new PermissionControlledRepresentationJournal(vm, buttons).CustomTabName("Журнал штрафов")); } ); }