Example #1
0
        public int InitialCopySave()
        {
            //Saves the new line it can now be edited

            CDbBudgetPCN dbDt = new CDbBudgetPCN();
            string       tmpDat;
            int          retVal;

            tmpDat = GetDataString();

            retVal  = dbDt.SaveNew(tmpDat);
            base.ID = retVal;
            dbDt    = null;

            return(retVal);
        }
Example #2
0
        public int Save()
        {
            CDbBudgetPCN dbDt = new CDbBudgetPCN();
            string       tmpDat;
            int          retVal;

            tmpDat = GetDataString();


            if (base.ID > 0)
            {
                dbDt.SavePrev(tmpDat);
                retVal = base.ID;
            }
            else
            {
                retVal  = dbDt.SaveNew(tmpDat);
                base.ID = retVal;
            }

            dbDt = null;

            return(retVal);
        }