Exemple #1
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public static int UpdateBulletion(BulletinVO entity)
        {
            var cmd = new DataCommand("InfoManage.UpdateBulletin");

            cmd.SetParameter(entity);
            int result = cmd.ExecuteNonQuery();

            return(result);
        }
        public ActionResult BulletinModel()
        {
            var result = new BulletinVO()
            {
                is_delete   = 0,
                create_time = DateTime.Now,
                user_id     = CurrUser.UserID
            };

            return(Json(new AjaxResult()
            {
                Success = true, Data = result
            }, JsonRequestBehavior.AllowGet));
        }
 public ActionResult SaveBulletin(BulletinVO entity)
 {
     entity.id = entity.bulleid;
     if (entity.id > 0)
     {
         var result = _basisService.UpdateBulletion(entity);
         return(Json(new AjaxResult()
         {
             Success = true, Message = string.Format("修改成功!")
         }, JsonRequestBehavior.AllowGet));
     }
     else
     {
         entity.user_id = CurrUser.UserID;
         var result = _basisService.InsertBulletion(entity);
         return(Json(new AjaxResult()
         {
             Success = true, Message = string.Format("修改成功!")
         }, JsonRequestBehavior.AllowGet));
     }
 }
 public int InsertBulletion(BulletinVO entity)
 {
     entity.create_time = DateTime.Now;
     entity.is_delete   = 0;
     return(InfoManageDA.InsertBulletion(entity));
 }
 /// <summary>
 /// 修改
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int UpdateBulletion(BulletinVO entity)
 {
     return(InfoManageDA.UpdateBulletion(entity));
 }