Esempio n. 1
0
        /// <summary>
        /// 保存表单(新增、修改)
        /// </summary>
        /// <param name="keyValue">主键值</param>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        public void SaveForm(string keyValue, TelphoneLiangSeeEntity entity)
        {
            IRepository db = new RepositoryFactory().BaseRepository().BeginTrans();

            if (!string.IsNullOrEmpty(keyValue))
            {
                entity.Modify(keyValue);
                db.Update(entity);
            }
            else
            {
                entity.Create();
                db.Insert(entity);
                //浏览+1
                orgService.UpdateSeeCount(entity.OrganizeId);
            }
            db.Commit();
        }