コード例 #1
0
        /// <summary>
        /// Edit_News
        /// </summary>
        /// <param name="request">Edit_NewsRequest</param>
        /// <returns></returns>
        public async Task <bool> Edit_News(Edit_NewsRequest request)
        {
            bool result = false;

            try
            {
                var param = new EditNewsParameter()
                {
                    ID              = request.ID,
                    NameNews        = request.NameNews,
                    IDCreater       = request.IDCreater,
                    Date            = DateTime.Now,
                    ImageNews       = request.ImageNews,
                    ImageNewDetail  = request.ImageNewDetail,
                    ViewMax         = request.ViewMax,
                    DescriptionNews = request.DescriptionNews,
                };
                _dataAccess.Edit_News(param);
                result = true;
                return(result);
            }
            catch (Exception ex)
            {
                result = false;
                return(result);
            }
            return(await Task.FromResult(result));
        }
コード例 #2
0
        public IHttpActionResult EditNews(Edit_NewsRequest RequestData)
        {
            var result = _businessLogic.Edit_News(RequestData);

            return(new ActionResult <bool>(result.Result, Request));
        }