Ejemplo n.º 1
0
 public static bool Update(IDalSession session, PredefinedBeneficiary obj)
 {
     bool blnSuccess = session.InsertOrUpdate(obj);
     return blnSuccess;
 }
Ejemplo n.º 2
0
        public static void SavePredefinedBeneficiary(ref bool blnSaveSuccess, ref PredefinedBeneficiariesDetails pbd)
        {
            IDalSession session = NHSessionFactory.CreateSession();
            int predBenefKey = pbd.Key;

            try
            {
                PredefinedBeneficiary predBenef = null;

                if (predBenefKey != 0)
                {
                    predBenef = PredefinedBeneficiaryMapper.GetPredefinedBeneficiary(session, predBenefKey);
                }
                else
                {
                    predBenef = new PredefinedBeneficiary();
                }

                predBenef.SwiftAddress = pbd.SwiftAddress;
                predBenef.BenefBankAcctNr = pbd.BankAcctNr;
                predBenef.NarBenef1 = pbd.NarBenef1;
                predBenef.NarBenef2 = pbd.NarBenef2;
                predBenef.NarBenef3 = pbd.NarBenef3;
                predBenef.NarBenef4 = pbd.NarBenef4;

                predBenef.Description1 = pbd.Description1;
                predBenef.Description2 = pbd.Description2;
                predBenef.Description3 = pbd.Description3;
                predBenef.Description4 = pbd.Description4;
                predBenef.CostIndication = (IndicationOfCosts)pbd.CostIndicationKey;

                blnSaveSuccess = PredefinedBeneficiaryMapper.Update(session, predBenef);

            }
            finally
            {
                session.Close();
            }
        }