Exemple #1
0
 void ActionTransferOperationJournal_Activated(object sender, System.EventArgs e)
 {
     tdiMain.OpenTab(
         PermissionControlledRepresentationJournal.GenerateHashName <TransferOperationsVM>(),
         () => new PermissionControlledRepresentationJournal(new TransferOperationsVM()).CustomTabName("Переносы между точками доставки")
         );
 }
Exemple #2
0
 void ActionClientBalance_Activated(object sender, System.EventArgs e)
 {
     tdiMain.OpenTab(
         PermissionControlledRepresentationJournal.GenerateHashName <ClientEquipmentBalanceVM>(),
         () => {
         var journal = new PermissionControlledRepresentationJournal(new ClientEquipmentBalanceVM());
         journal.CustomTabName("Оборудование у клиентов");
         return(journal);
     }
         );
 }
Exemple #3
0
 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("Журнал премий"));
     }
         );
 }
Exemple #4
0
 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));
     }
         );
 }
Exemple #5
0
 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("Журнал штрафов"));
     }
         );
 }