Beispiel #1
0
        public void LogSuccessfulLogout()
        {
#if DEBUG
            if (id > 0)
            {
                return;
            }
#endif
            ApplicationLogEntry.AddNew(Translator.GetString("Logout successful."), id);
        }
Beispiel #2
0
        public void LogFailedLogin()
        {
#if DEBUG
            if (id > 0)
            {
                return;
            }
#endif
            string    hostName    = null;
            IPAddress hostAddress = null;
            try {
                hostName    = Dns.GetHostName();
                hostAddress = Dns.GetHostAddresses(hostName).FirstOrDefault(a => a.AddressFamily == AddressFamily.InterNetwork);
            } catch (Exception ex) {
                ErrorHandling.LogException(ex);
            }

            ApplicationLogEntry.AddNew(string.Format(Translator.GetString("Login failed! Workstation: \"{0}\" ({1}). Product version: {2}"),
                                                     hostName ?? "Unknown",
                                                     hostAddress != null ? hostAddress.ToString() : "Unknown",
                                                     BusinessDomain.ApplicationVersionString), id);
        }
Beispiel #3
0
        public static void Delete(long invoiceNumber)
        {
            BusinessDomain.DataAccessProvider.DeleteInvoice(invoiceNumber);

            ApplicationLogEntry.AddNew(string.Format(Translator.GetString("Void invoice No.{0}"), Operation.GetFormattedOperationNumber(invoiceNumber)));
        }