Ejemplo n.º 1
0
        public int UpdateAgpsTownStat(AgpsCoverageTown stat)
        {
            var item =
                _agpsTownRepository.FirstOrDefault(
                    x =>
                    x.StatDate == stat.StatDate && x.District == stat.District && x.Town == stat.Town &&
                    x.Operator == stat.Operator);

            if (item != null)
            {
                item.Count        = stat.Count;
                item.GoodCount    = stat.GoodCount;
                item.GoodCount100 = stat.GoodCount100;
                item.GoodCount105 = stat.GoodCount105;
            }
            else
            {
                _agpsTownRepository.Insert(stat);
            }
            return(_agpsTownRepository.SaveChanges());
        }
Ejemplo n.º 2
0
 public int Post(AgpsCoverageTown stat)
 {
     return(_agpsService.UpdateAgpsTownStat(stat));
 }