/// <summary>
 ///
 /// </summary>
 /// <param name="client"></param>
 /// <param name="currency"></param>
 public MAcctSchema(MClient client, KeyNamePair currency)
     : this(client.GetCtx(), 0, client.Get_TrxName())
 {
     SetClientOrg(client);
     SetC_Currency_ID(currency.GetKey());
     SetName(client.GetName() + " " + GetGAAP() + "/" + Get_ColumnCount() + " " + currency.GetName());
 }       //	MAcctSchema
Esempio n. 2
0
 /// <summary>
 /// Parent Constructor
 /// </summary>
 /// <param name="client">parent</param>
 /// <param name="Supervisor_ID">admin</param>
 public MAcctProcessor(MClient client, int Supervisor_ID)
     : this(client.GetCtx(), 0, client.Get_TrxName())
 {
     SetClientOrg(client);
     SetName(client.GetName() + " - "
             + Msg.Translate(GetCtx(), "C_AcctProcessor_ID"));
     SetSupervisor_ID(Supervisor_ID);
 }
 /// <summary>
 /// Parent Constructor
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="Supervisor_ID"></param>
 public MRequestProcessor(MClient parent, int Supervisor_ID)
     : this(parent.GetCtx(), 0, parent.Get_TrxName())
 {
     SetClientOrg(parent);
     SetName(parent.GetName() + " - "
             + Msg.Translate(GetCtx(), "R_RequestProcessor_ID"));
     SetSupervisor_ID(Supervisor_ID);
 }
Esempio n. 4
0
        }       //	beforeSave

        /// <summary>
        ///	Create EMail from Request User
        /// </summary>
        /// <param name="toEMail">recipient</param>
        /// <param name="toName">tomail</param>
        /// <param name="subject">subject</param>
        /// <param name="message">message</param>
        /// <returns>Email</returns>
        public EMail CreateEMail(String toEMail, String toName,
                                 String subject, String message)
        {
            if (toEMail == null || toEMail.Length == 0)
            {
                _log.Warning("No To");
                return(null);
            }

            //
            EMail   email  = null;
            MClient client = MClient.Get(GetCtx(), GetAD_Client_ID());

            if (client.IsServerEMail() && Ini.IsClient())
            {
                //MessageBox.Show("Get Connection Problem");
                //Server server = CConnection.get().getServer();

                try
                {
                    //if (server != null)
                    if (!DataBase.DB.IsConnected())
                    {
                        email = CreateEMail(toEMail, toName, subject, message);
                    }

                    //{	//	See ServerBean
                    //    email = server.CreateEMail(GetCtx(), GetAD_Client_ID(),
                    //        toEMail, toName, subject, message);

                    //}
                    else
                    {
                        log.Log(Level.WARNING, "No AppsServer");
                    }
                }
                catch (Exception ex)
                {
                    log.Log(Level.SEVERE, GetName() + " - AppsServer error", ex);
                }
            }
            String from = GetWStoreEMail();

            if (from == null || from.Length == 0)
            {
                from = client.GetRequestEMail();
            }
            if (email == null)
            {
                email = new EMail(client,
                                  from, client.GetName(), toEMail, toName,
                                  subject, message);
            }
            //	Authorizetion
            if (client.IsSmtpAuthorization())
            {
                if (GetWStoreEMail() != null && GetWStoreUser() != null && GetWStoreUserPW() != null)
                {
                    email.CreateAuthenticator(GetWStoreUser(), GetWStoreUserPW());
                }
                else
                {
                    email.CreateAuthenticator(client.GetRequestUser(), client.GetRequestUserPW());
                }
            }
            //	Bcc
            email.AddBcc(from);
            //
            return(email);
        }
Esempio n. 5
0
 /// <summary>
 /// Parent Constructor
 /// </summary>
 /// <param name="client">parent</param>
 public MCalendar(MClient client)
     : base(client.GetCtx(), 0, client.Get_TrxName())
 {
     SetClientOrg(client);
     SetName(client.GetName() + " " + Utility.Msg.Translate(client.GetCtx(), "C_Calendar_ID"));
 }