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); }
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); }