private void CopyInterface(ISearchAcc source, ISearchAcc dest) { foreach (PropertyInfo info in typeof(ISearchAcc) .GetProperties(BindingFlags.Instance | BindingFlags.Public)) { info.SetValue(dest, info.GetValue(source, null), null); } }
internal static IEnumerable <Conto> GetNextConto(int firmaId, ISearchAcc pSearcAcc) { List <Conto> allConto = new List <Conto>(); var dbman = new DBManager(DataProvider.Firebird); dbman.ConnectionString = Entrence.ConnectionString; try { dbman.Open(); StringBuilder sb = new StringBuilder(); sb.Append(string.Format("select First 1 * from \"conto\" c")); sb.Append(" inner join \"accounts\" a on a.\"Id\"= c.\"CreditAccount\""); sb.Append(" inner join \"accounts\" b on b.\"Id\"= c.\"DebitAccount\""); //sb.Append(" left outer join DDSDNEV d on d.NOM=c.\"Id\""); sb.AppendFormat(" where \"FirmId\"={0}", firmaId); sb.AppendFormat( pSearcAcc.TypeDate == 1 ? " and \"Date\">='{0}.{1}.{2}' and \"Date\"<='{3}.{4}.{5}'" : " AND \"Date\">='{0}.{1}.{2}' and \"Date\"<='{3}.{4}.{5}'", pSearcAcc.FromDate.Day, pSearcAcc.FromDate.Month, pSearcAcc.FromDate.Year, pSearcAcc.ToDate.Day, pSearcAcc.ToDate.Month, pSearcAcc.ToDate.Year); if (!String.IsNullOrWhiteSpace(pSearcAcc.Id)) { sb.AppendFormat(" AND c.\"Id\">'{0}'", pSearcAcc.Id); } if (!String.IsNullOrWhiteSpace(pSearcAcc.UserId)) { sb.AppendFormat(" AND c.USERID='{0}'", pSearcAcc.UserId); } sb.AppendFormat(" order by c.\"Id\""); string s = sb.ToString(); dbman.ExecuteReader(CommandType.Text, s); LoadConto(allConto, dbman); } catch (Exception ex) { Logger.Instance().WriteLogError(ex.Message, "internal static IEnumerable<Conto> GetAllConto(int p, Interface.ISearchAcc pSearcAcc)"); } finally { dbman.Dispose(); } return(allConto); }
public IEnumerable <Conto> GetAllConto(int p, ISearchAcc pSearcAcc) { return(RealDataContext.GetAllConto(p, pSearcAcc)); }
public IEnumerable <Conto> GetAllContoOrfiltered(int firmaId, ISearchAcc pSearcAcc) { return(RealDataContext.GetAllContoOrfiltered(firmaId, pSearcAcc)); }
public IEnumerable <Conto> GetPrevConto(int firmaId, ISearchAcc pSearcAcc) { return(RealDataContext.GetPrevConto(firmaId, pSearcAcc)); }
public IEnumerable <Conto> GetAllConto(int firmaId, ISearchAcc pSearcAccint, int startingIndex, int numberOfRecords) { return(RealDataContext.GetAllConto(firmaId, pSearcAccint, startingIndex, numberOfRecords)); }