コード例 #1
0
        public void createGJ(GJ oGJ)
        {
            string sCons = string.Empty;

            try
            {
                string query = MapeoQuerySql.ObtenerPorId("AdminGeneralJournal.createGJ");

                sCons = string.Format(query
                                      , oGJ.ID, oGJ.GJ_DATE, oGJ.DESCRIPTION, oGJ.POSTING_DATE, oGJ.TOTAL_DR_AMOUNT
                                      , oGJ.TOTAL_CR_AMOUNT, oGJ.SELL_RATE, oGJ.BUY_RATE, oGJ.SITE_ID, oGJ.CREATE_DATE
                                      , oGJ.USER_ID, oGJ.CURRENCY_ID, oGJ.POST_ALL_TRACKING, oGJ.POST_AS_NATIVE, oGJ.USER_EXCH_RATE, oGJ.POSTING_CANDIDATE);

                _trace.AppendLine(sCons);
                _oSQL.EjecutarDML(sCons);
            }

            catch (Exception ex)
            {
                if (ex.Message.Contains("Violation of PRIMARY KEY constraint 'PK_GJ'"))
                {
                    createGJ_cont_exSQL += 1;
                    oGJ.getNext_ID(oGJ.SITE_ID, createGJ_cont_exSQL);
                    if (createGJ_cont_exSQL < 10)
                    {
                        createGJ(oGJ);
                    }
                }
                else
                {
                    throw new Exception("Error al insertar en GJ. Detalle: " + ex.Message);
                }
            }

            if (createGJ_cont_exSQL != 0)
            {
                createGJ_cont_exSQL = 0;
            }
        }
コード例 #2
0
        public GJ getGJ()
        {
            GJ oGJ = new GJ();

            oGJ.ID                = ID;
            oGJ.GJ_DATE           = GJ_DATE;
            oGJ.DESCRIPTION       = DESCRIPTION;
            oGJ.POSTING_DATE      = POSTING_DATE;
            oGJ.TOTAL_DR_AMOUNT   = TOTAL_DR_AMOUNT;
            oGJ.TOTAL_CR_AMOUNT   = TOTAL_CR_AMOUNT;
            oGJ.SELL_RATE         = SELL_RATE;
            oGJ.BUY_RATE          = BUY_RATE;
            oGJ.ENTITY_ID         = ENTITY_ID;
            oGJ.CREATE_DATE       = CREATE_DATE;
            oGJ.USER_ID           = USER_ID;
            oGJ.CURRENCY_ID       = CURRENCY_ID;
            oGJ.POST_ALL_TRACKING = POST_ALL_TRACKING;
            oGJ.POST_AS_NATIVE    = POST_AS_NATIVE;
            oGJ.USER_EXCH_RATE    = USER_EXCH_RATE;
            oGJ.POSTING_CANDIDATE = POSTING_CANDIDATE;

            return(oGJ);
        }
コード例 #3
0
        public GJ getGJ()
        {
            GJ oGJ = new GJ();

            oGJ.ID                = _ID;
            oGJ.GJ_DATE           = _GJ_Date;
            oGJ.DESCRIPTION       = _Description;
            oGJ.POSTING_DATE      = _PostingDate;
            oGJ.TOTAL_DR_AMOUNT   = _Total_DR_Amount;
            oGJ.TOTAL_CR_AMOUNT   = _Total_CR_Amount;
            oGJ.SELL_RATE         = _Sell_Rate;
            oGJ.BUY_RATE          = _Buy_Rate;
            oGJ.ENTITY_ID         = _EntityID;
            oGJ.CREATE_DATE       = _Create_Date;
            oGJ.USER_ID           = _UserID;
            oGJ.CURRENCY_ID       = _CurrencyID;
            oGJ.POST_ALL_TRACKING = _Post_All_Tracking;
            oGJ.POST_AS_NATIVE    = _Post_As_Native;
            oGJ.USER_EXCH_RATE    = _User_Exch_Rate;
            oGJ.POSTING_CANDIDATE = _Posting_Candidate;

            return(oGJ);
        }