Esempio n. 1
0
 public long DeleteProject(GreenLand entity)
 {
     return entity.Delete();
 }
Esempio n. 2
0
        public HttpResponseMessage SaveProject(GreenLand entity)
        {
            if (entity.ID == 0)
            {
                #region 维护新增数据

                entity.CreateOn = DateTime.Now;
                entity.CreateBy = "gkpeng";

                #endregion
            }
            else
            {
                #region 维护修改数据

                entity.EditOn = DateTime.Now;
                entity.EditBy = "gkpeng";

                #endregion
            }

            var r = entity.Save();
            if (r > 0)
            {
                return ExController.JsonMessage(entity);
            }
            return ExController.JsonMessage(new { ID = 0 });
        }