예제 #1
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="theData">保存的数据</param>
        public ActionResult SaveData(Base_DatabaseLink theData)
        {
            if (theData.Id.IsNullOrEmpty())
            {
                theData.Id = Guid.NewGuid().ToSequentialGuid();

                _base_DatabaseLinkBusiness.AddData(theData);
            }
            else
            {
                _base_DatabaseLinkBusiness.UpdateData(theData);
            }

            return(Success());
        }
예제 #2
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="theData">保存的数据</param>
        public ActionResult SaveData(Base_DatabaseLink theData)
        {
            if (theData.Id.IsNullOrEmpty())
            {
                theData.Id = IdHelper.GetId();

                _dbLinkBus.AddData(theData);
            }
            else
            {
                _dbLinkBus.UpdateData(theData);
            }

            return(Success());
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="theData">保存的数据</param>
        public ActionResult SaveData(Base_DatabaseLink theData)
        {
            AjaxResult res;

            if (theData.Id.IsNullOrEmpty())
            {
                theData.Id = IdHelper.GetId();

                res = _dbLinkBus.AddData(theData);
            }
            else
            {
                res = _dbLinkBus.UpdateData(theData);
            }

            return(JsonContent(res.ToJson()));
        }