/// <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
예제 #2
0
 /// <summary>
 /// Parent Constructor
 /// </summary>
 /// <param name="client">client</param>
 /// <param name="name">name</param>
 public MOrg(MClient client, String name)
     : this(client.GetCtx(), 0, client.Get_Trx())
 {
     SetAD_Client_ID(client.GetAD_Client_ID());
     SetValue(name);
     SetName(name);
 }
예제 #3
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);
 }
예제 #5
0
 /// <summary>
 ///Full Constructor
 /// </summary>
 /// <param name="client">client</param>
 /// <param name="Name">name</param>
 /// <param name="ElementType">type</param>
 /// <param name="AD_Tree_ID">tree</param>
 public MElement(MClient client, string name, string elementType, int AD_Tree_ID)
     : this(client.GetCtx(), 0, client.Get_TrxName())
 {
     SetClientOrg(client);
     SetName(name);
     SetElementType(elementType);        // A
     SetAD_Tree_ID(AD_Tree_ID);
     SetIsNaturalAccount(ELEMENTTYPE_Account.Equals(elementType));
 }
예제 #6
0
        }       //	get

        /// <summary>
        ///	Get active Web Stores of Clieny
        /// </summary>
        /// <param name="client">client</param>
        /// <returns>array of web stores</returns>
        public static MStore[] GetOfClient(MClient client)
        {
            //ArrayList<MStore> list = new ArrayList<MStore>();
            List <MStore> list = new List <MStore>();
            String        sql  = "SELECT * FROM W_Store WHERE AD_Client_ID=@Param1 AND IsActive='Y'";

            SqlParameter[] Param = new SqlParameter[1];
            DataTable      dt    = null;
            IDataReader    idr   = null;

            try
            {
                Param[0] = new SqlParameter("@Param1", client.GetAD_Client_ID());
                idr      = DataBase.DB.ExecuteReader(sql, Param, client.Get_TrxName());
                dt       = new DataTable();
                dt.Load(idr);
                idr.Close();
                foreach (DataRow dr in dt.Rows)
                {
                    list.Add(new MStore(client.GetCtx(), dr, client.Get_TrxName()));
                }
            }
            //PreparedStatement pstmt = null;
            //try
            //{
            //    pstmt = DataBase.prepareStatement (sql, client.get_TrxName());
            //    pstmt.setInt (1, client.getAD_Client_ID());
            //    ResultSet rs = pstmt.executeQuery ();
            //    while (rs.next ())
            //        list.add (new MStore (client.getCtx(), rs, client.get_TrxName()));
            //    rs.close ();
            //    pstmt.close ();
            //    pstmt = null;
            //}
            catch (Exception e)
            {
                if (idr != null)
                {
                    idr.Close();
                }
                _log.Log(Level.SEVERE, sql, e);
            }
            finally
            {
                dt = null;
                if (idr != null)
                {
                    idr.Close();
                }
            }
            //
            MStore[] retValue = new MStore[list.Count];
            //list.toArray (retValue);
            retValue = list.ToArray();
            return(retValue);
        }       //	getOfClient
예제 #7
0
        }       //	MClientInfo

        /// <summary>
        ///Parent Constructor
        /// </summary>
        /// <param name="client">client</param>
        /// <param name="AD_Tree_Org_ID">org tree</param>
        /// <param name="AD_Tree_BPartner_ID">bp tree</param>
        /// <param name="AD_Tree_Project_ID">project tree</param>
        /// <param name="AD_Tree_SalesRegion_ID">sr tree</param>
        /// <param name="AD_Tree_Product_ID">product tree</param>
        /// <param name="AD_Tree_Campaign_ID">campaign tree</param>
        /// <param name="AD_Tree_Activity_ID">activity tree</param>
        /// <param name="trxName">transaction</param>
        public MClientInfo(MClient client, int AD_Tree_Org_ID, int AD_Tree_BPartner_ID,
                           int AD_Tree_Project_ID, int AD_Tree_SalesRegion_ID, int AD_Tree_Product_ID,
                           int AD_Tree_Campaign_ID, int AD_Tree_Activity_ID, Trx trxName) : base(client.GetCtx(), 0, trxName)
        {
            //super(client.getCtx(), 0, trxName);
            SetAD_Client_ID(client.GetAD_Client_ID());  //	to make sure
            SetAD_Org_ID(0);
            SetIsDiscountLineAmt(false);
            //
            SetAD_Tree_Menu_ID(10);             //	HARDCODED
            //
            SetAD_Tree_Org_ID(AD_Tree_Org_ID);
            SetAD_Tree_BPartner_ID(AD_Tree_BPartner_ID);
            SetAD_Tree_Project_ID(AD_Tree_Project_ID);
            SetAD_Tree_SalesRegion_ID(AD_Tree_SalesRegion_ID);
            SetAD_Tree_Product_ID(AD_Tree_Product_ID);
            SetAD_Tree_Campaign_ID(AD_Tree_Campaign_ID);
            SetAD_Tree_Activity_ID(AD_Tree_Activity_ID);
            //
            SetMatchRequirementI(MATCHREQUIREMENTI_None);
            SetMatchRequirementR(MATCHREQUIREMENTR_None);
            _createNew = true;
        }
예제 #8
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"));
 }