Ejemplo n.º 1
0
        public JsonResult SaveArticle(HQ_Article entity)
        {
            if (entity.ID == 0)
            {
                #region 维护新增数据

                entity.CreateBy = LoginInfo.Current.UserName;
                entity.CreateOn = DateTime.Now;

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

                entity.EditBy = LoginInfo.Current.UserName;
                entity.EditOn = DateTime.Now;

                #endregion
            }

            var r = entity.Save();
            if (r > 0)
            {
                return ExController.JsonNet(entity);
            }
            return ExController.JsonNet(new { ID = 0 });
        }
Ejemplo n.º 2
0
        public long SaveSilderImg(HQ_Article entity)
        {
            if (entity.ID > 0)
            {
                entity.EditBy = LoginInfo.Current.UserName;
                entity.EditOn = DateTime.Now;
            }
            else
            {
                entity.ACategory = (int)EnumArticleCategory.SilderImg;
                entity.CreateBy = LoginInfo.Current.UserName;
                entity.CreateOn = DateTime.Now;
            }

            return entity.Save();
        }
Ejemplo n.º 3
0
        public long SaveArticle(HQ_Article entity)
        {
            if (entity.ID > 0)
            {
                entity.EditBy = LoginInfo.Current.UserName;
                entity.EditOn = DateTime.Now;
            }
            else
            {
                entity.CreateBy = LoginInfo.Current.UserName;
                entity.CreateOn = DateTime.Now;
            }

            return entity.Save();
        }
        public JsonResult SaveDDetailDesc(HQ_Article article)
        {
            if (article.ID == 0)
            {
                article.ACategory = (int)EnumArticleCategory.RoomDesc;
                article.CreateBy = LoginInfo.Current.UserName;
                article.CreateOn = DateTime.Now;
            }
            else
            {
                article.EditBy = LoginInfo.Current.UserName;
                article.EditOn = DateTime.Now;
            }

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