protected override bool DownPL35(DownParameter param) { SQLServer.PL35.DwNumberBiz biz = new SQLServer.PL35.DwNumberBiz(param.Category.DbName); DateTime startDate = biz.GetLatestDate(); for (DateTime date = startDate; date <= DateTime.Now; date = date.AddDays(1)) { if (!this.DownPL35(param, biz, date)) return false; } return true; }
protected override bool DownPL35(DownParameter param) { SQLServer.PL35.DwNumberBiz biz = new SQLServer.PL35.DwNumberBiz(param.Category.DbName); DateTime startDate = biz.GetLatestDate(); for (DateTime date = startDate; date <= DateTime.Now; date = date.AddDays(1)) { if (!this.DownPL35(param, biz, date)) { return(false); } } return(true); }
protected override bool DownPL35(DownParameter param) { SQLServer.PL35.DwNumberBiz biz = new SQLServer.PL35.DwNumberBiz(param.Category.DbName); DateTime lastDate = biz.GetLatestDate(); int endIndex = this.GetEndIndex(param, lastDate); if (endIndex <= 0) { return(false); } var numbers = this.GetNumbers(param, endIndex); if (numbers.Count == 0) { return(false); } long lastP = biz.GetLatestPeroid(); foreach (var numberInfo in numbers) { char[] digits = numberInfo.Number.ToArray(); string code = string.Join(",", digits); DateTime datetime = DateTime.Parse(numberInfo.DateTime); int dateint = int.Parse(datetime.ToString("yyyyMMdd")); long p = int.Parse(numberInfo.Peroid); int n = int.Parse(numberInfo.Peroid.Substring(numberInfo.Peroid.Length - 3)); if (p <= lastP) { continue; } if (biz.Add(p, n, code, dateint, numberInfo.DateTime)) { continue; } return(false); } return(true); }
protected override bool DownPL35(DownParameter param) { SQLServer.PL35.DwNumberBiz biz = new SQLServer.PL35.DwNumberBiz(param.Category.DbName); DateTime lastDate = biz.GetLatestDate(); int endIndex = this.GetEndIndex(param, lastDate); if (endIndex <= 0) return false; var numbers = this.GetNumbers(param, endIndex); if (numbers.Count == 0) return false; long lastP = biz.GetLatestPeroid(); foreach (var numberInfo in numbers) { char[] digits = numberInfo.Number.ToArray(); string code = string.Join(",", digits); DateTime datetime = DateTime.Parse(numberInfo.DateTime); int dateint = int.Parse(datetime.ToString("yyyyMMdd")); long p = int.Parse(numberInfo.Peroid); int n = int.Parse(numberInfo.Peroid.Substring(numberInfo.Peroid.Length - 3)); if (p <= lastP) continue; if (biz.Add(p, n, code, dateint, numberInfo.DateTime)) continue; return false; } return true; }