public ResultModel Add([FromBody] WaterMeterAdd add)
        {
            add.User.Create     = User.Identity.GetCurrentUser().UserName;
            add.User.CreateDate = DateTime.Now;
            var id = _bll.Add(add.User, add.WaterMeter, add.List);

            add.WaterMeter.WaterId = id;
            return(GenerateResult(add.WaterMeter, "", id != 0));
        }
 public ResultModel Update([FromBody] WaterMeterAdd add)
 {
     if (add.User != null)
     {
         add.User.Modify     = User.Identity.GetCurrentUser().UserName;
         add.User.ModifyDate = DateTime.Now;
     }
     if (add.WaterMeter != null)
     {
         add.WaterMeter.Modify     = User.Identity.GetCurrentUser().UserName;
         add.WaterMeter.ModifyDate = DateTime.Now;
     }
     return(GenerateResult("", "", _bll.Update(add.User, add.WaterMeter, add.List)));
 }