public static StationCashSr CreateFromDataRow(DataRow dr)
        {
            StationCashSr scs = new StationCashSr();

            scs.FillFromDataRow(dr);

            return(scs);
        }
        public static List <StationCashSr> GetStationCashListByQuery(string sQuery, List <IDbDataParameter> lParams)
        {
            List <StationCashSr> lResult = new List <StationCashSr>();

            using (DataTable dt = DataCopy.GetDataTableWithSqlParams(sQuery, lParams))
            {
                if (dt != null)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        StationCashSr tqs = StationCashSr.CreateFromDataRow(dr);

                        lResult.Add(tqs);
                    }
                }
            }

            return(lResult);
        }
        public static StationCashSr[] GetStartDates()
        {
            try
            {
                List <StationCashSr> lStationCash = StationCashSr.GetStationCashListByQuery("SELECT * FROM StationCash where StationCash.CashCheckPoint = 1 order by DateModified desc", new List <IDbDataParameter>());

                List <StationCashSr> cashin = StationCashSr.GetStationCashListByQuery("SELECT * FROM StationCash where StationCash.MoneyIn = 1 order by DateModified asc", new List <IDbDataParameter>());

                if (cashin.Count > 0)
                {
                    cashin[0].DateModified = cashin[0].DateModified.AddSeconds(-1);
                    lStationCash.Add(cashin[0]);
                }
                return(lStationCash.ToArray());
            }
            catch (Exception)
            {
            }
            return(null);
        }