Beispiel #1
0
        public IEnumerable <BE.BankBranch> GetBankBranchList()
        {
            string BankAccuntPath_temp = BE.Tools.BankAccuntPath;

            if (!File.Exists(BE.Tools.BankAccuntPath) || BE.Configuration.BanksXmlFinish == false)
            {
                BankAccuntPath_temp = "atmTemp.xml";
            }
            else
            {
                long length = new FileInfo(BE.Tools.BankAccuntPath).Length;
                if (length < 10000)
                {
                    BankAccuntPath_temp = "atmTemp.xml";
                }
            }
            try
            {
                bankAccuntsRoot = XElement.Load(BankAccuntPath_temp);
            }
            catch { }

            bankAccuntsList = BE.Tools.XmlToBankAccunt(bankAccuntsRoot);


            var IenumBank = from BankAccunt in bankAccuntsList
                            select BankAccunt.Clone();

            return(IenumBank);
        }
Beispiel #2
0
        public IEnumerable <BankBranch> getAllBankBranches()
        {
            string BankAccuntPath_temp = Tools.BankAccuntPath;

            if (!File.Exists(Tools.BankAccuntPath))
            {
                BankAccuntPath_temp = "atmTemp.xml";
            }
            else
            {
                long length = new FileInfo(Tools.BankAccuntPath).Length;
                if (length < 10000)
                {
                    BankAccuntPath_temp = "atmTemp.xml";
                }
            }
            try
            {
                bankAccuntsRoot = XElement.Load(Tools.BankAccuntPath);
            }
            catch { }

            bankAccuntsList = saveBankBranches(Tools.BankAccuntPath);
            //SaveToXML(bankAccunts, "banks.xml");
            return(from BankAccunt in bankAccuntsList

                   select BankAccunt.Clone());

            // throw new Exception("banks file problem");
        }
Beispiel #3
0
        //getAllBankBranches function  return all All Bank Branches from flie BankAccuntPath or atm1.xml.
        public IEnumerable <BankAccunt> getAllBankBranches()
        {
            string BankAccuntPath_temp = BankAccuntPath;

            if (!File.Exists(BankAccuntPath) || configurition.BanksXmlFinish == false)
            {
                BankAccuntPath_temp = "atm1.xml";
            }
            else
            {
                long length = new FileInfo(BankAccuntPath).Length;
                if (length < 10000)
                {
                    BankAccuntPath_temp = "atm1.xml";
                }
            }
            try
            {
                bankAccuntsRoot = XElement.Load(BankAccuntPath_temp);
            }
            catch { }

            bankAccunts = XmlToBankAccunt(bankAccuntsRoot);
            //SaveToXML(bankAccunts, "banks.xml");
            return(from BankAccunt in bankAccunts

                   select BankAccunt.Clone());

            // throw new Exception("banks file problem");
        }