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"); }
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); }
//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"); }
static public HostingUnit UserInputHostingUnit() { HostingUnit hUnit = new HostingUnit(); Host Owner = new Host(); BankAccunt bank = new BankAccunt(); bool[,] diary = new bool[31, 12]; // hUnit.HostingUnitKey = configurition.GetHostingUnitKey(); // Owner.HostKey = 123456874; Owner.PrivateName = "david"; Owner.FamilyName = "miz"; Owner.phoneNumber = "0544644141"; Owner.MailAddress = "*****@*****.**"; // bank.BankNumber = 1; bank.BankName = "Leumi"; bank.BranchNumber = 747; bank.BranchAddress = "Hayarkot st"; bank.BranchCity = "Tel aviv"; // Owner.BankAccountNumber = 98754; Owner.BankBranchDetails = bank; Owner.CollectionClearance = true; // hUnit.Owner = Owner; hUnit.HostingUnitName = "kk"; hUnit.Diary = diary; //hUnit.Area = enums.CountryAreas.Center; //hUnit.Type = enums.HostingUnitType.Etc; //hUnit.Pool = enums.LuxusOption.notInterested; //hUnit.Jacuzzi = enums.LuxusOption.notInterested; //hUnit.Garden = enums.LuxusOption.necessary; //hUnit.ChildrensAttractions = enums.LuxusOption.necessary; // return(hUnit); }