Example #1
0
 protected override bool AskDeleteMultipleEntities(int count)
 {
     using (MessageOkCancel dialog = new MessageOkCancel(
                Translator.GetString("Delete Payments"), string.Empty,
                string.Format(Translator.GetString("Do you want to delete the payments for the selected {0} operations?"), count),
                "Icons.Delete32.png"))
         return(dialog.Run() == ResponseType.Ok);
 }
Example #2
0
 protected override bool AskDeleteSingleEntity(User entity)
 {
     using (MessageOkCancel dialog = new MessageOkCancel(Translator.GetString("Delete User"),
                                                         "Icons.User16.png",
                                                         string.Format(Translator.GetString("Do you want to delete user with name \"{0}\"?"), entity.Name),
                                                         "Icons.Delete32.png"))
         return(dialog.Run() == ResponseType.Ok);
 }
Example #3
0
 protected override bool AskDeleteSingleEntity(ComplexRecipe entity)
 {
     using (MessageOkCancel dialog = new MessageOkCancel(Translator.GetString("Delete Recipe"),
                                                         "Icons.Recipe16.png",
                                                         string.Format(Translator.GetString("Do you want to delete recipe \"{0}\"?"), entity.Name),
                                                         "Icons.Delete32.png"))
         return(dialog.Run() == ResponseType.Ok);
 }
Example #4
0
 protected override bool AskDeleteSingleEntity(PriceRule entity)
 {
     using (MessageOkCancel dialog = new MessageOkCancel(
                Translator.GetString("Delete Price Rule"), string.Empty,
                string.Format(Translator.GetString("Do you want to delete the price rule \"{0}\"?"), entity.Name),
                "Icons.Delete32.png"))
         return(dialog.Run() == ResponseType.Ok);
 }
Example #5
0
 protected override bool AskDeleteMultipleEntities(int count)
 {
     using (MessageOkCancel dialog = new MessageOkCancel(
                Translator.GetString("Delete Company Records"),
                "Icons.CompanyRecord16.png",
                string.Format(Translator.GetString("Do you want to delete the selected {0} company records?"), count),
                "Icons.Delete32.png"))
         return(dialog.Run() == ResponseType.Ok);
 }
Example #6
0
 protected override bool AskDeleteMultipleEntities(int count)
 {
     using (MessageOkCancel dialog = new MessageOkCancel(
                BusinessDomain.AppConfiguration.UseSalesTaxInsteadOfVAT ?
                Translator.GetString("Delete Tax Groups") :
                Translator.GetString("Delete VAT Groups"),
                "Icons.VATGroup16.png",
                string.Format(BusinessDomain.AppConfiguration.UseSalesTaxInsteadOfVAT ?
                              Translator.GetString("Do you want to delete the selected {0} Tax groups?") :
                              Translator.GetString("Do you want to delete the selected {0} VAT groups?"), count),
                "Icons.Delete32.png"))
         return(dialog.Run() == ResponseType.Ok);
 }
Example #7
0
 protected override bool AskDeleteSingleEntity(VATGroup entity)
 {
     using (MessageOkCancel dialog = new MessageOkCancel(
                BusinessDomain.AppConfiguration.UseSalesTaxInsteadOfVAT ?
                Translator.GetString("Delete Tax Group") :
                Translator.GetString("Delete VAT Group"),
                "Icons.VATGroup16.png",
                string.Format(BusinessDomain.AppConfiguration.UseSalesTaxInsteadOfVAT ?
                              Translator.GetString("Do you want to delete tax group \"{0}\"?") :
                              Translator.GetString("Do you want to delete VAT group \"{0}\"?"), entity.Name),
                "Icons.Delete32.png"))
         return(dialog.Run() == ResponseType.Ok);
 }
Example #8
0
        protected override bool AskDeleteSingleEntity(Payment entity)
        {
            if (entity.OperationType == (int)OperationType.AdvancePayment)
            {
                using (MessageOkCancel deletePayments = new MessageOkCancel(
                           Translator.GetString("Delete Advance Payment"), string.Empty,
                           Translator.GetString("Are you sure you want to delete this advance payment?"), "Icons.Delete32.png"))
                    return(deletePayments.Run() == ResponseType.Ok);
            }

            using (MessageOkCancel deletePayments = new MessageOkCancel(
                       Translator.GetString("Delete Payments"), string.Empty,
                       Translator.GetString("Are you sure you want to delete all payments of this operation?"), "Icons.Delete32.png"))
                return(deletePayments.Run() == ResponseType.Ok);
        }