protected ChooseOperationBase(bool highlightEntities, DocumentChoiceType choiceType, OperationType operationType = OperationType.Any) : base(choiceType) { this.highlightEntities = highlightEntities; this.operationType = operationType; Initialize(); }
public ChooseComplexProduction(DocumentChoiceType choiceType) : base(choiceType) { }
public ChooseIssuedInvoice(DocumentChoiceType choiceType) : base(choiceType) { }
protected virtual string GetQueryStateKey(DocumentChoiceType choice) { return(string.Format("{0}_{1}", typeof(T).FullName, choice)); }
protected Choose(DocumentChoiceType choiceType) : base(choiceType) { queryStateKey = GetQueryStateKey(choiceType); }
public ChooseTransfer(DocumentChoiceType choiceType) : base(choiceType) { }
public static bool ShowMessageHasInvoice <TOper> (TOper oper, long invNum, string icon, out bool allowView, bool annulling = false, DocumentChoiceType choiceType = DocumentChoiceType.Choose) where TOper : Operation { string message = null; allowView = false; if (annulling) { if (oper.OperationType == OperationType.Purchase) { message = Translator.GetString("Document No.{0} cannot be annulled because the received invoice " + "No.{1} is attached to it. Please, void the invoice before annulling this document."); } else { message = Translator.GetString("Document No.{0} cannot be annulled because the issued invoice " + "No.{1} is attached to it. Please, void the invoice before annulling this document."); } } else if (choiceType == DocumentChoiceType.CreateChildDocument) { if (oper.OperationType == OperationType.Purchase) { message = Translator.GetString("Document No.{0} cannot be attached to invoice because the received invoice " + "No.{1} is already attached to it. Please, void the invoice before attaching another invoice to this document."); } else { message = Translator.GetString("Document No.{0} cannot be attached to another invoice because the issued invoice " + "No.{1} is already attached to it. Please, void the invoice before attaching another invoice to this document."); } } if (message == null) { allowView = true; if (BusinessDomain.LoggedUser.UserLevel > UserAccessLevel.Operator) { return(ShowMessageHasInvoiceChangeUser(oper, invNum, icon, out allowView)); } if (oper.OperationType == OperationType.Consignment) { message = Translator.GetString("Consignment No.{0} cannot be edited because the issued invoice " + "No.{1} is attached to a sale on it. Please, void the invoice before editing this consignment."); } else if (oper.OperationType != OperationType.Purchase) { message = Translator.GetString("Document No.{0} cannot be edited because the issued invoice " + "No.{1} is attached to it. Please, void the invoice before editing this document."); } else { message = Translator.GetString("Document No.{0} cannot be edited because the received invoice " + "No.{1} is attached to it. Please, void the invoice before editing this document."); } } using (MessageError msg = new MessageError(string.Format(message, Operation.GetFormattedOperationNumber(oper.Id), Operation.GetFormattedOperationNumber(invNum)), icon, ErrorSeverity.Warning, null)) msg.Run(); return(false); }
public ChooseAdvancePayment(DocumentChoiceType choiceType) : base(choiceType) { Initialize(); }
protected ChooseOperationBase(DocumentChoiceType choiceType) : this(false, choiceType) { }
protected ChooseOperation(DocumentChoiceType choiceType) : base(choiceType) { }
protected ChooseOperation(bool highlightEntities, DocumentChoiceType choiceType, OperationType operationType = OperationType.Any) : base(highlightEntities, choiceType, operationType) { }
public ChooseSale(bool showInvoiceInfo, DocumentChoiceType choiceType, OperationType operationType = OperationType.Any) : base(showInvoiceInfo, choiceType, operationType) { this.operationType = operationType; }
public ChoosePurchase(bool showInvoiceInfo, DocumentChoiceType choiceType) : base(showInvoiceInfo, choiceType) { }
public ChooseStockTaking(DocumentChoiceType choiceType) : base(choiceType) { }
public ChooseWaste(DocumentChoiceType choiceType) : base(choiceType) { }
protected ChooseInvoice(DocumentChoiceType choiceType) : base(choiceType) { }