public void ImportFromExcel(string excelFileName, string dataSheet, Model.Enums.InsuranceType insType, bool isCashFlow) { XlsObject <AssetValue> parser; if (isCashFlow) { parser = new AssetsCashXlsObject(_govRep.GetList(null, 0, int.MaxValue, new SortParameterCollection()), insType, excelFileName, dataSheet); } else { parser = new AssetsValXlsObject(_govRep.GetList(null, 0, int.MaxValue, new SortParameterCollection()), insType, excelFileName, dataSheet); } using (var trans = Transactions.StartNew()) { foreach (var o in parser.SelectAll()) { this.Create(o); } trans.Complete(); } }
public IEnumerable <object> GetList(FilterParameterCollection filters, int pageIndex, int pageSize, SortParameterCollection orderBy) { return(_rep.GetList(filters, pageIndex, pageSize, orderBy).Cast <object>().ToList()); }