Пример #1
0
        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();
            }
        }
Пример #2
0
 public IEnumerable <object> GetList(FilterParameterCollection filters, int pageIndex, int pageSize, SortParameterCollection orderBy)
 {
     return(_rep.GetList(filters, pageIndex, pageSize, orderBy).Cast <object>().ToList());
 }