} // copyGL /// <summary> /// Copy Default /// </summary> /// <param name="targetAS">target</param> private void CopyDefault(MAcctSchema targetAS) { MAcctSchemaDefault source = MAcctSchemaDefault.Get(GetCtx(), _SourceAcctSchema_ID); MAcctSchemaDefault target = new MAcctSchemaDefault(GetCtx(), 0, Get_Trx()); target.SetC_AcctSchema_ID(_TargetAcctSchema_ID); target.SetC_AcctSchema_ID(_TargetAcctSchema_ID); //ArrayList<KeyNamePair> list = source.getAcctInfo(); List <KeyNamePair> list = source.GetAcctInfo(); for (int i = 0; i < list.Count; i++) { //KeyNamePair pp = list.get(i); KeyNamePair pp = list[i]; int sourceC_ValidCombination_ID = pp.GetKey(); String columnName = pp.GetName(); MAccount sourceAccount = MAccount.Get(GetCtx(), sourceC_ValidCombination_ID); MAccount targetAccount = CreateAccount(targetAS, sourceAccount); target.SetValue(columnName, Utility.Util.GetValueOfInt(targetAccount.GetC_ValidCombination_ID())); } if (!target.Save()) { throw new Exception("Could not Save Default"); } } // copyDefault